/* Shared sessions (web/session.mjs). The session panel itself is room.mjs + room.css; the EW
 * labels and track card moved to ew.css with the rest of the EW picture.
 * Here: the #session host corner, the classic-layout status chip (the console hides it and
 * opens the panel from the strip), and api.mjs's signed-out "Sign in" control in the strip.
 * Tokens: --cx-* with DESIGN.md fallbacks; body.nvg re-points them (theme.css palette). */

body {
  --pb-panel: var(--cx-panel, #1c2127);
  --pb-hover: var(--cx-hover, #2f343c);
  --pb-line: var(--cx-line, rgba(255, 255, 255, .10));
  --pb-ink: var(--cx-ink, #f6f7f9);
  --pb-dim: var(--cx-dim, #abb3bf);
  --pb-mute: var(--cx-mute, #8f99a8);
  --pb-warn: var(--cx-warn, #ec9a3c);
  --pb-font: var(--cx-font, "Public Sans", system-ui, sans-serif);
  --pb-r: var(--cx-r, 2px);
  --pb-shadow: var(--cx-shadow, 0 6px 20px rgba(0, 0, 0, .45));
}
body.nvg {
  --pb-panel: var(--cx-panel, var(--panel)); --pb-raised: var(--cx-raised, var(--panel-2)); --pb-hover: var(--cx-hover, var(--hover));
  --pb-line: var(--cx-line, var(--line)); --pb-line-hi: var(--cx-line-hi, var(--line-hi));
  --pb-ink: var(--cx-ink, var(--text)); --pb-dim: var(--cx-dim, var(--dim)); --pb-mute: var(--cx-mute, var(--mute));
  --pb-sel: var(--cx-select, var(--hi)); --pb-sel-ink: var(--cx-select-ink, var(--hi-ink)); --pb-focus: var(--cx-focus, var(--hi));
  --pb-ok: var(--cx-ok, var(--ok)); --pb-warn: var(--cx-warn, var(--warn)); --pb-bad: var(--cx-bad, var(--bad));
  --pb-field: #000; --pb-shadow: none;
}

/* The host corner index.html reserves (room.mjs mounts its chip here). */
#session {
  position: absolute;
  z-index: 26;
  top: calc(var(--bar-h, 0px) + var(--safe-t, 0px) + 8px);
  right: calc(var(--panel-w, 0px) + var(--safe-r, 0px) + 10px);
  pointer-events: none;
}
#session .rm-root > * { pointer-events: auto; }

/* Status chip (classic layout; adaptive.css hides #session .ss-bar in the console). */
.ss-bar { display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; }
.ss-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  color: var(--pb-ink); background: var(--pb-panel);
  border: 1px solid var(--pb-line); border-radius: var(--pb-r);
  box-shadow: var(--pb-shadow);
  font: 500 13px/1 var(--pb-font); letter-spacing: 0; text-transform: none;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.ss-pill:hover { background: var(--pb-hover); }
:root:is([data-input="touch"], [data-input="pen"]) .ss-pill { height: 44px; }

/* ———————————— signed-out hint (api.mjs, status strip): a quiet strip button ———————————— */
#status .api-signin {
  padding: 0 8px; white-space: nowrap;
  color: var(--pb-ink); background: transparent;
  border: 0; border-radius: var(--pb-r);
  font: 500 13px/1 var(--pb-font); letter-spacing: 0; text-transform: none;
}
#status .api-signin:hover { color: var(--pb-ink); background: var(--pb-hover); }
#status .api-signin[hidden] { display: none !important; }
/* Phone strip has no room for a text button: #btn-session carries the hint instead
 * (amber dot; tapping it while signed out opens the sign-in sheet). */
:root[data-form="phone"] #status .api-signin { display: none !important; }
:root[data-auth="signed-out"] #btn-session .ad-dot { background: var(--pb-warn) !important; }
