/* THE SESSION NOTES HEADER CONTROL, and the one screen it belongs on.
 *
 * WHY A SCREEN GATE AT ALL. `.controls` mounts on every screen, including
 * the launchpad and the auth screen, where "notes for this session" names
 * nothing: there is no session. So this is the same allow-list shape the
 * two session-scoped kebab rows carry in client/css/header-menu.css -
 * hidden everywhere by default, on an id selector so it beats
 * `.btn-icon`'s own `display: flex`, and revealed only while
 * `#terminal-screen` is the active screen. Hidden is the default, which is
 * the fail-closed direction: a screen nobody remembered shows no control.
 *
 * WHY IT IS NOW IN terminal-grid.css's HIDE LIST TOO (2026-09-22). That file
 * takes the folder, search and session icons off the header once the grid is
 * mounted, because each cell then carries its own controls; the notes icon
 * joined `web/src/opscenter/cells/terminal-live/toolbar.ts`'s per-cell
 * toolbar the same day, so it has a door there now and the header copy would
 * be a second, redundant one drawn over the terminal it is supposed to be
 * a tool for. Below 1024px no cell toolbar mounts at all
 * (`docs/opscenter-spec/PHONE.md`), so this rule here is still what shows the button on
 * that width - the gate below is unchanged, only the WIDER-than-1024px case
 * changed hands.
 *
 * THE PRESSED STATE IS THE CELL'S PRESENCE, NOT A LOCAL FLAG.
 * `aria-pressed` is written by web/src/lib/notes-header/mount-notes.ts from
 * the layout store, so the control and the surface can never disagree about
 * whether the notepad is up. The tint below is drawn from that attribute
 * for the same reason: one fact, one source.
 */

#sessionNotesBtn {
    display: none;
}

body.ps-terminal-active #sessionNotesBtn {
    display: flex;
}

/* Pressed reads as "this is on screen", so it borrows the accent wash every
 * other active header control uses rather than inventing a second one. */
#sessionNotesBtn[aria-pressed='true'] {
    background: var(--oc-orange-tint, transparent);
    color: var(--oc-orange-bright, currentColor);
}

/* THE NOTEPAD'S DRAWER. Until 2026-09-24 this was a full-bleed panel over
 * the terminal below 1024 and a grid cell above it. The owner then asked for
 * "the notes popup to behave the same way as the files one", so at every
 * width it is the right drawer now, shared with the file browser: docked
 * beside the page above 700px, an overlay on a phone. Its box lives in
 * client/css/right-drawer.css with the file browser's, because the two are
 * one slot. It is still its own container, created on open and removed on
 * close, and it still never sits in flow beside `.terminal-container`: the
 * docked page makes room through the screen's padding, and the page
 * terminal refits through the one fit path. */

