/* Authenticated-only app chrome - HIDDEN BY DEFAULT.
 *
 * See client/js/screen-chrome.js for the whole argument. The short
 * version: the login screen used to be kept clean by naming every
 * control that had to disappear, in four separate places in app.js, and
 * a control nobody remembered to name rendered on the login screen with
 * no error anywhere. This file inverts that. The marker
 * `body.is-authenticated` is written ONLY by ScreenChrome.apply() and
 * only for the authenticated screens, so its ABSENCE - the state the
 * page is in at first paint, before any script has run, and the state it
 * returns to on logout - hides the chrome. A control added to the header
 * tomorrow is covered by this file the moment it is added, with no line
 * written anywhere.
 *
 * OPTING IN. A control that genuinely belongs on the login screen carries
 * `data-show-on-auth` in its markup. That is a deliberate, visible,
 * per-control statement, and it is the only way onto that screen.
 *
 * `!important` is load-bearing and not laziness. The case that proved
 * it was the slash-commands FAB, shown by an inline
 * `style.display = 'flex'` its module wrote, because an inline style
 * beats any selector that is not important: without this, the file was
 * correct about everything except the button the user actually reported.
 * That FAB is deleted now (its key moved into the in-flow row under the
 * pane), but the rule stays important - the next runtime-injected
 * control to set an inline display is the one this is for. */

/* THE HEADER'S RIGHT-HAND CLUSTER, BY CONTAINER, NOT BY NAME. This is
 * the rule that does the real work: everything inside `.controls` is
 * gone on the login screen unless it says otherwise, including
 * #header-menu-toggle (the kebab, injected at runtime by
 * client/js/header-menu.js and therefore not present in index.html for
 * anyone to remember) and #header-menu-panel, which is where
 * header-menu.js re-parents #logoutBtn and #settingsBtn (both stay
 * hidden by id, see header-actions.css). Hiding the panel hides its
 * contents with it. */
body:not(.is-authenticated) .header .controls > *:not([data-show-on-auth]) {
    display: none !important;
}

/* FLOATING CHROME THAT DOES NOT LIVE IN A SHARED CONTAINER. The
 * slash-commands button and the d-pad button are appended straight to
 * <body> by their own modules, so there is no ancestor to gate them on.
 * They carry `data-auth-only` at the point they are created - one
 * declarative token beside the element itself, rather than a second
 * enumeration in a screen-transition function that has already proven it
 * can be short. #session-sidebar-toggle carries the same token in
 * index.html. */
body:not(.is-authenticated) [data-auth-only] {
    display: none !important;
}

/* THE SOLO-TERMINAL WINDOW (R1-12, #2330) has no agents drawer, no rail and no drawer toggle: it shows one pane.
 * `data-solo` is stamped on <html> by client/js/solo-window.js. The dock offset the drawer and the rail set on <body> is
 * zeroed so the screens do not leave room for a drawer that is not there. */
html[data-solo] #session-sidebar-toggle,
html[data-solo] #session-sidebar-panel,
html[data-solo] #session-sidebar-backdrop,
html[data-solo] #session-sidebar-rail {
    display: none !important;
}

html[data-solo] body {
    --dock-offset: 0px !important;
}
