/* css/sheets.css — Braun redesign modal sheets (v3.0): Settings / Cue / Shortcuts / Share.
   One overlay primitive .sheet. Imported into `components`.
   Authoritative values: design_handoff_show_clock/rd-styles.css §"SHARE SHEET" + "CUE MESSAGES"
   + "KEYBOARD SHORTCUTS". */

/* Review P4: z-index 220 — ABOVE the timetable panel + slot modal (200),
   below toasts (250). At the old z-50 the global C/? shortcuts opened the
   Cue/Shortcuts sheet BEHIND the full-screen panel with its focus trap active
   — the UI appeared dead until Esc. Ladder: HUD=100, panel/modal=200,
   sheet=220, toast=250, QR=300, shortcut=400, cue=500. */
.sheet { position: fixed; inset: 0; z-index: 220; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet__card { width: min(420px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.sheet__head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet__head h3 { font-size: 17px; font-weight: 600; margin: 0; }
.sheet__body { padding: 16px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.sheet__lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.sheet__toggles { display: flex; flex-direction: column; gap: 8px; }

.shtoggle { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); transition: var(--transition); cursor: pointer; }
.shtoggle.on { border-color: color-mix(in oklab, var(--amber) 40%, transparent); background: color-mix(in oklab, var(--amber) 7%, transparent); }
.shtoggle__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shtoggle__txt b { font-size: 14px; font-weight: 600; color: var(--fg); }
.shtoggle__txt small { font-size: 12px; color: var(--muted); }
.shtoggle__sw { flex-shrink: 0; position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.shtoggle.on .shtoggle__sw { background: var(--amber); }
.shtoggle__sw i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.shtoggle.on .shtoggle__sw i { transform: translateX(18px); }

.sheet__preview { font-size: 13px; color: var(--muted); line-height: 1.55; border-left: 2px solid color-mix(in oklab, var(--amber) 50%, transparent); padding: 2px 0 2px 12px; }
.sheet__link { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-ctrl); padding: 6px 6px 6px 13px; }
.sheet__link .url { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; color: var(--amber-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__foot { display: flex; align-items: center; gap: 10px; }
.sheet__qr { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 14px; padding: 16px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-ctrl); }
.sheet__qr span { font-size: 12px; color: #5b5b53; letter-spacing: .02em; }
/* Cap the DISPLAY size: renderQrToCanvas auto-fits the canvas to 256px×DPR of
   intrinsic resolution (the {size:150} passed in sheets.js isn't a recognised
   option), and with no CSS width the canvas painted at that full intrinsic size
   — far too large in the sheet. A fixed display size keeps it crisp + compact. */
.sheet__qr canvas { display: block; width: 180px; height: 180px; image-rendering: pixelated; }

/* settings sheet */
.set__fs { width: 100%; justify-content: center; margin-top: 4px; }
.set__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.set__app { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.set__app .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.set__ver { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .03em; }

/* cue composer */
.cue__live { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: var(--r-card); background: color-mix(in oklab, var(--amber) 12%, transparent); border: 1px solid color-mix(in oklab, var(--amber) 32%, transparent); }
.cue__livedot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.cue__livetxt { flex: 1; min-width: 0; font-size: 13px; color: var(--fg); }
.cue__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cue__preset { height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-ctrl); background: var(--surface-2); color: var(--fg); font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .08em; transition: .13s; cursor: pointer; }
.cue__preset:hover { border-color: var(--amber); background: color-mix(in oklab, var(--amber) 12%, transparent); color: var(--amber); }
.cue__custom { display: flex; gap: 8px; }
.cue__input { flex: 1; min-width: 0; height: 42px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-ctrl); color: var(--fg); font-size: 14px; padding: 0 12px; outline: none; transition: var(--transition); font-family: var(--sans); }
.cue__input:focus { border-color: var(--amber); }
/* Review P4: restore a visible keyboard-focus cue (outline was suppressed;
   a 1px border-color change is not a sufficient focus indicator) */
.cue__input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.cue__custom .btn { height: 42px; }
.cue__note { font-size: 12px; color: var(--faint); line-height: 1.5; margin-top: 2px; }

/* cue banner (clock + viewer overlay) */
.cuebanner { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--amber); color: var(--ink-on-accent); font-family: var(--mono); } /* AUD-F41 */
.cuebanner__eyebrow { flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.cuebanner__txt { flex: 1; min-width: 0; text-align: center; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: clamp(17px, 3.2vw, 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuebanner__x { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .14); color: var(--ink-on-accent); font-size: 13px; line-height: 1; transition: .12s; border: none; cursor: pointer; position: relative; }
/* Review P4: 44px hit area on coarse pointers without growing the visual */
@media (pointer: coarse) {
  .cuebanner__x::after { content: ''; position: absolute; inset: -7px; }
}
.cuebanner__x:hover { background: rgba(0, 0, 0, .28); }
.cuebanner--guest { position: relative; border-radius: var(--r-card); }
@media (prefers-reduced-motion: no-preference) {
  .cuebanner.is-flash { animation: cueflash 1.05s ease-in-out infinite; }
}
@keyframes cueflash { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* keyboard shortcuts */
.kbd__list { display: flex; flex-direction: column; gap: 2px; }
.kbd__row { display: flex; align-items: center; gap: 14px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.kbd__row:last-child { border-bottom: 0; }
.kbd { flex-shrink: 0; min-width: 64px; text-align: center; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; padding: 5px 9px; }
.kbd__d { font-size: 13.5px; color: var(--muted); }
