/* geodesk-ui.css — the shared header pieces of every geodesk app (served at /_gds/geodesk-ui.css).
   Spec: shared-resources/docs/superpowers/specs/2026-10-14-geodesk-sso-design.md, addendum D7-D8.
   Sits on the black chrome bar (--chrome); the menu panel follows the page theme tokens from
   brand/_theme.html, with fallbacks for a page that has none. Drawn by GeodeskSSO.mountBar(). */

/* ── brand: GDS · App · version ─────────────────────────────────────────────────────── */
.gds-brand{display:inline-flex;align-items:baseline;gap:8px;text-decoration:none;flex-shrink:0;min-width:0;
  font-family:var(--sans,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif);line-height:1.2}
.gds-brand b{color:var(--brand,#95191b);font-weight:800;font-size:17px;letter-spacing:-.4px}
.gds-brand span{color:#cbd5e1;font-size:13px;font-weight:400;white-space:nowrap}
.gds-brand small{color:#7c8899;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.gds-brand:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:2px}

/* ── the bar: name · role · theme · language · ⋯ ───────────────────────────────────── */
.gds-bar{display:flex;align-items:center;gap:10px;margin-left:auto;min-width:0;color:#e2e8f0;
  font-family:var(--sans,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif);font-size:14px;line-height:1.4}
.gds-bar .gds-who{font-size:12px;color:#94a3b8;min-width:0;max-width:28ch;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.gds-bar .gds-chip{font-size:10px;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap;
  border:1px solid rgba(148,163,184,.5);border-radius:4px;padding:1px 5px;color:#cbd5e1}
.gds-bar .gds-inline{display:flex;align-items:center;gap:10px}

/* theme and language are the same kind of choice, so they look the same */
.gds-bar .gds-theme,.gds-bar .gds-lang{display:inline-flex;border:1px solid rgba(148,163,184,.35);
  border-radius:6px;overflow:hidden;flex-shrink:0;background:var(--chrome,#0c0c0c)}
.gds-bar .gds-theme button,.gds-bar .gds-lang button{border:none;background:transparent;color:#cbd5e1;
  font-family:inherit;font-size:11px;font-weight:600;line-height:1;padding:11px 9px;margin:0;cursor:pointer;
  border-radius:0;min-height:0}
.gds-bar .gds-lang button{min-width:36px;letter-spacing:.3px}
.gds-bar .gds-theme button+button,.gds-bar .gds-lang button+button{border-left:1px solid rgba(148,163,184,.25)}
.gds-bar .gds-theme button:hover,.gds-bar .gds-lang button:hover{background:rgba(148,163,184,.15);color:#fff}
.gds-bar .gds-theme button.active,.gds-bar .gds-lang button.on{background:var(--accent,#2563eb);color:#fff}
.gds-bar .gds-theme button:focus-visible,.gds-bar .gds-lang button:focus-visible{outline:2px solid #fff;outline-offset:-2px}

/* the ⋯ button and the initials bubble */
.gds-bar .gds-menu-wrap{position:relative;flex-shrink:0}
@media (min-width:721px){.gds-bar .gds-menu-wrap.gds-narrow-only{display:none}}
.gds-bar .gds-menu-btn{display:inline-flex;align-items:center;justify-content:center;min-height:34px;min-width:34px;
  padding:0 10px;margin:0;border-radius:6px;border:1px solid rgba(148,163,184,.35);background:transparent;
  color:#e2e8f0;font-family:inherit;font-size:16px;font-weight:700;line-height:1;cursor:pointer}
.gds-bar .gds-menu-btn:hover{background-color:rgba(148,163,184,.15)}
.gds-bar .gds-menu-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
/* 36px circle drawn inside a 44px tap target (gloves, one hand) */
.gds-bar .gds-avatar{width:44px;height:44px;min-width:44px;padding:4px;border-radius:50%;border:0;
  background:var(--accent,#2563eb);background-clip:content-box;color:#fff;font-size:13px;letter-spacing:.3px}
.gds-bar .gds-avatar:hover{background-color:var(--accent,#2563eb);filter:brightness(1.12)}

/* the menu panel follows the page theme */
.gds-bar .gds-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:1000;display:flex;flex-direction:column;
  gap:2px;min-width:220px;max-width:calc(100vw - 16px);padding:6px;border-radius:8px;
  background:var(--surface-raised,var(--surface,#1e293b));color:var(--text,#e2e8f0);
  border:1px solid var(--border,#334155);box-shadow:0 12px 32px rgba(0,0,0,.25);text-align:left}
.gds-bar .gds-menu[hidden]{display:none}
.gds-bar .gds-menu-item{display:flex;align-items:center;gap:8px;width:100%;min-height:var(--tap,44px);padding:0 12px;
  margin:0;border:0;border-radius:6px;background:transparent;color:var(--text,#e2e8f0);font-family:inherit;
  font-size:14px;font-weight:400;text-align:left;text-decoration:none;cursor:pointer;box-sizing:border-box}
.gds-bar .gds-menu-item:hover{background:var(--hover,rgba(148,163,184,.15))}
.gds-bar .gds-menu-item:focus-visible{outline:2px solid var(--accent,#2563eb);outline-offset:-2px}
.gds-bar .gds-menu-item[hidden]{display:none}
.gds-bar .gds-sep{height:1px;margin:4px 6px;background:var(--border,#334155)}
.gds-bar .gds-menu-id{display:flex;flex-direction:column;gap:2px;padding:8px 12px 10px;margin-bottom:4px;
  border-bottom:1px solid var(--border,#334155)}
.gds-bar .gds-menu-id b{font-size:14px;font-weight:600;overflow-wrap:anywhere}
.gds-bar .gds-menu-id span{font-size:12px;color:var(--muted,#94a3b8);overflow-wrap:anywhere}
.gds-bar .gds-menu-id .gds-chip{align-self:flex-start;margin-top:4px;color:var(--muted,#94a3b8);border-color:var(--border,#334155)}
.gds-bar .gds-menu-prefs{display:none;flex-direction:column;align-items:flex-start;gap:6px;padding:6px 8px 10px;
  margin-bottom:4px;border-bottom:1px solid var(--border,#334155)}
.gds-bar .gds-menu-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--muted,#94a3b8)}
.gds-bar .gds-menu-label+*{margin-bottom:4px}

/* in a menu (phones: the bubble, or the folded bar) theme and language are full-width rows of
   44px buttons, and a long menu scrolls instead of running off a short screen */
.gds-bar .gds-menu{max-height:calc(100dvh - 72px);overflow-y:auto}
.gds-bar .gds-menu-prefs{align-items:stretch}
.gds-bar .gds-menu .gds-theme,.gds-bar .gds-menu .gds-lang{display:flex;width:100%}
.gds-bar .gds-menu .gds-theme button,.gds-bar .gds-menu .gds-lang button{flex:1;min-height:44px;font-size:13px}

/* the bubble: everything lives in the panel */
.gds-bar.gds-bubble-mode .gds-menu-prefs{display:flex}
.gds-bar.gds-bubble-mode .gds-menu{width:300px}

/* phones and narrow windows: theme and language fold into the ⋯ menu */
@media (max-width:720px){
  .gds-bar .gds-inline{display:none}
  .gds-bar .gds-menu-prefs{display:flex}
  .gds-bar .gds-who{max-width:40vw}
  .gds-brand small{display:none}
}
