/* ================= Element → Mattermost look =================
   Served in-cluster at element.algonomia.com/element-custom.css
   (53-element-assets.yaml ConfigMap — kubectl apply + ~1min propagation,
   hard-reload Element to see). Formerly on the apex Apache, where a site
   redeploy silently wiped it (2026-08-25). Sections are independent. */

/* --- 1. E2EE indicators: gone (encryption force-disabled) --- */
.mx_MessageComposer_e2eIcon, .mx_MessageComposer_e2eIconWrapper,
.mx_E2EIcon, .mx_RoomHeader .mx_E2EIcon { display: none !important; }

/* --- 2. Geometry: MM is square-ish, radius 4 everywhere --- */
.mx_BaseAvatar_image, .mx_BaseAvatar { border-radius: 4px !important; }
.mx_AccessibleButton_kind_primary, .mx_AccessibleButton_kind_primary_outline,
.mx_Dialog, .mx_ContextualMenu { border-radius: 4px !important; }

/* --- 3. Message density + row hover, MM style --- */
.mx_EventTile_line { padding-top: 1px; padding-bottom: 1px; }
.mx_EventTile:hover .mx_EventTile_line { background: rgba(127,127,127,.08); }
.mx_DisambiguatedProfile { font-weight: 600; }
.mx_MessageTimestamp { font-size: 11px; }

/* --- 4. Room list: MM density (tight rows, small avatars, small text) --- */
.mx_RoomTile { padding: 1px 4px; min-height: 28px; border-radius: 4px; }
.mx_RoomTile_title { font-size: 13px; line-height: 1.25; }
.mx_RoomTile .mx_DecoratedRoomAvatar,
.mx_RoomTile .mx_BaseAvatar,
.mx_RoomTile .mx_BaseAvatar_image { width: 20px !important; height: 20px !important; }
.mx_RoomTile[aria-selected="true"], .mx_RoomTile_selected {
  box-shadow: inset 3px 0 0 var(--cpd-color-text-action-accent, #5d89ea);
}
.mx_RoomSublist { margin-top: 4px; }
.mx_RoomSublist_headerContainer { min-height: 20px; padding-bottom: 0; }
.mx_RoomSublist_headerText { text-transform: uppercase; font-size: 11px; letter-spacing: .02em; }

/* --- 5. Space switcher: hidden (2026-08-25). One company Space containing
       every channel = the switcher is redundant (MM one-team feel). ONLY
       the space tree is hidden — the rail keeps the avatar/user menu, the
       Threads Activity Centre and the settings cog (v1.12 moved them in
       here, so hiding the whole .mx_SpacePanel removed settings — v1 bug).
       The injected script pins mx_active_space to "home-space" so nobody
       is stuck in a space-filtered view. Delete block to restore spaces. */
.mx_SpacePanel .mx_SpaceTreeLevel { display: none !important; }
.mx_SpacePanel_toggleCollapse { display: none !important; }
/* Create-space "+" button — one Space only (was an injected inline <style>,
   moved here 2026-09-11 when the inline injection was dropped for CSP). */
.mx_SpaceButton_new { display: none !important; }

/* --- 6. EXPERIMENTAL (uncomment to try): '#' instead of room avatars,
       like MM channels. Affects group DMs too — taste call. */
/* .mx_RoomTile .mx_DecoratedRoomAvatar { display: none; }
   .mx_RoomTile_titleContainer::before { content: "# "; opacity: .6; } */
