/* css/04-header-sheets-controls.css — Signal/Controls header sheets incl. .sheet.ctl.
   Split from the index.html <style> block (REFACTOR-PLAN Phase 2). Load order = cascade order; do not reorder. */
/* ---------- header sheets: Signal readout + Controls ---------- */
.sheet{position:fixed;inset:0;z-index:58;display:grid;place-items:start center;padding-top:calc(var(--header-h) + 8px);background:rgba(7,10,11,.55);backdrop-filter:blur(4px);opacity:0;visibility:hidden;transition:opacity .2s var(--ease),visibility .2s}
.sheet.on{opacity:1;visibility:visible}
.sheet .box{width:min(420px,94vw);background:var(--glass-solid);border:1px solid var(--hair2);border-radius:var(--r-lg);padding:18px;box-shadow:var(--sh-lg);transform:translateY(8px);transition:transform .2s var(--ease);-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur)}
.sheet.on .box{transform:translateY(0)}
.sheet h3{margin:0 0 12px;font-size:var(--fz-card-lg);font-weight:750;letter-spacing:-.02em}
.srowi{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--hair)}
.srowi:first-of-type{border-top:0}
.srowi .lb{flex:1;min-width:0}
.srowi .lb b{display:block;font-size:var(--fz-md);font-weight:700}
.srowi .lb span{display:block;font-size:var(--fz-body);color:var(--tx3)}
.seg{display:flex;gap:8px;flex:0 0 auto}
.seg button{height:48px;min-width:64px;padding:0 14px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid var(--hair);color:var(--tx2);font-size:var(--fz-body);font-weight:700}
.seg button[aria-pressed="true"]{background:var(--acc-dim);border-color:rgba(34,200,130,.45);color:var(--acc)}
.sheet .close{width:100%;height:52px;margin-top:14px;border-radius:16px;background:rgba(255,255,255,.06);border:1px solid var(--hair2);color:var(--tx);font-size:var(--fz-md);font-weight:700}
/* ---------- wave11 Fix 5: the Controls dialog is the app's settings surface,
   so it gets its own scale and a staged Cancel / Save footer ---------- */
.sheet.ctl{place-items:center center;padding-top:0}
.sheet.ctl .box{width:min(920px,94vw);min-height:min(520px,calc(100vh - var(--header-h) - 32px));
  margin:auto;padding:32px;display:flex;flex-direction:column;
  max-height:calc(100vh - var(--header-h) - 32px);overflow:hidden}
.sheet.ctl h3{font-size:var(--fz-ttl-lg);font-weight:700;margin:0 0 8px;flex:0 0 auto}
/* the rows scroll if the head-unit is short; the footer never leaves the box */
/* the scrollbar is hidden everywhere in the cockpit, so the cut edge is the
   ONLY thing that can say "there is more below" — a 26 px fade at the foot of
   the scroller turns a half-sliced 52 px segmented control into a deliberate
   "keeps going" instead of a clipping bug */
.ctlrows{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(#000 calc(100% - 26px),rgba(0,0,0,0));
  mask-image:linear-gradient(#000 calc(100% - 26px),rgba(0,0,0,0))}
.ctlrows::-webkit-scrollbar{display:none}
.sheet.ctl .srowi{gap:16px;padding:12px 0;min-height:72px}
.sheet.ctl .srowi .lb b{font-size:var(--fz-card-lg);font-weight:600}
.sheet.ctl .srowi .lb span{font-size:var(--fz-body)}
.sheet.ctl .seg button{height:52px;min-width:108px;font-size:var(--fz-md)}
.ctlfoot{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid var(--hair)}
.ctlfoot .close{margin-top:0;height:56px;background:transparent;border:1px solid rgba(255,255,255,.18);color:#fff;font-size:var(--fz-btn);font-weight:600}
.ctlfoot .save{height:56px;border-radius:16px;background:var(--acc);color:var(--on-acc);font-size:var(--fz-btn);font-weight:600;border:0;transition:opacity .15s}
.ctlfoot .save[disabled]{background:rgba(255,255,255,.07);color:var(--tx3);cursor:default}
@media (max-width: 900px) and (orientation: landscape){.sheet.ctl .box{width:94vw;padding:20px}}
@media (orientation: portrait){.sheet.ctl .box{width:94vw;height:auto;min-height:0;padding:20px}}


/* revamp 11 (client): the basemap attribution moved off the map stage (it ran
   across the bottom of every screen) and sits at the foot of this sheet — a
   licence credit, not a readout. --tx3, centred, no interaction. */
.ctlattr{margin:14px 0 0;text-align:center;direction:ltr;unicode-bidi:isolate;
  font-size:11px;line-height:1.4;color:var(--tx3);opacity:.75}
