/* page-scale.css - desktop text scale (2026-11-17). js/page-scale.js puts data-mam-scale and --mam-z
   on <html> from 1100 px wide; nothing here applies below that, so phones and tablets are unchanged.

   CSS zoom also multiplies viewport units (100vw paints z times the window), so every rule that sizes
   something against the window on a base_page page is divided back by the zoom below. Add a line here
   when a new page sizes by vw/vh. */
html[data-mam-scale] { zoom: var(--mam-z); }

/* app.css: body is one window tall */
html[data-mam-scale] body { height: calc(100vh / var(--mam-z)); height: calc(100dvh / var(--mam-z));
  min-height: calc(100vh / var(--mam-z)); min-height: calc(100dvh / var(--mam-z)); }

/* site-chrome.css: the Explore dropdown */
@media (min-width: 900px) {
  html[data-mam-scale] .sc-panel { width: min(1100px, calc(100vw / var(--mam-z) - 48px));
    max-height: calc(100vh / var(--mam-z) - var(--sc-h) - 24px); max-height: calc(100dvh / var(--mam-z) - var(--sc-h) - 24px); }
}

/* dialogs and cards capped at a share of the window */
html[data-mam-scale] .mam-fb-card { max-height: calc(90vh / var(--mam-z)); }
html[data-mam-scale] .oc-dialog { width: calc(100vw / var(--mam-z) - 24px); max-height: calc(100vh / var(--mam-z) - 24px); }

/* sensors.css: from 1024 px the sensor panel docks beside the map, one window tall */
@media (min-width: 1024px) {
  html[data-mam-scale] .sn-stage.sn-open { width: min(1360px, calc(100vw / var(--mam-z) - 64px));
    margin-left: calc(50% - min(680px, calc(50vw / var(--mam-z) - 32px))); }
  html[data-mam-scale] .sn-stage.sn-open > .sn-mapsec,
  html[data-mam-scale] .sn-stage.sn-open > .sn-sheet {
    height: calc(100vh / var(--mam-z) - var(--sc-h) - 16px); height: calc(100dvh / var(--mam-z) - var(--sc-h) - 16px); }
}

/* the page maps (fire, tour, venues, Big Sur, live traffic, free, enforcement, Flock, car spotter):
   a share of the window tall, within px limits */
html[data-mam-scale] .fim-wrap, html[data-mam-scale] .bsm-wrap, html[data-mam-scale] .tr-wrap,
html[data-mam-scale] .vn-wrap, html[data-mam-scale] .ltm-wrap {
  height: clamp(460px, calc(74vh / var(--mam-z)), 820px); height: clamp(460px, calc(74dvh / var(--mam-z)), 820px); }
html[data-mam-scale] .enf-wrap, html[data-mam-scale] .fkm-wrap {
  height: clamp(460px, calc(70vh / var(--mam-z)), 780px); height: clamp(460px, calc(70dvh / var(--mam-z)), 780px); }
html[data-mam-scale] .frm-wrap {
  height: clamp(440px, calc(62vh / var(--mam-z)), 720px); height: clamp(440px, calc(62dvh / var(--mam-z)), 720px); }
html[data-mam-scale] .csm-wrap {
  height: clamp(440px, calc(68vh / var(--mam-z)), 760px); height: clamp(440px, calc(68dvh / var(--mam-z)), 760px); }
/* /fire's full-screen button: the whole window */
html[data-mam-scale] .fim-wrap.is-full { height: calc(100vh / var(--mam-z)); height: calc(100dvh / var(--mam-z)); }

/* ---------- Text size control (site header; desktop band only) ---------- */
.sc-textsize { display: none; }
html[data-mam-desk] .sc-textsize {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--c-line-2); border-radius: var(--r-pill); background: var(--c-surface-2);
}
.sc-textsize button {
  min-width: 34px; height: 34px; padding: 0 6px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--c-text-2); font: 700 14px/1 var(--f-sans); cursor: pointer;
}
.sc-textsize button[data-ts="-1"] { font-size: 12px; }
.sc-textsize button[data-ts="1"] { font-size: 17px; }
.sc-textsize button:hover { color: var(--c-text); background: var(--c-surface-3); }
.sc-textsize button[aria-disabled="true"] { opacity: .4; cursor: default; }
.sc-textsize button[aria-pressed="false"][data-ts="0"] { color: var(--c-accent); }
.sc-textsize button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.sc-textsize-now { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The header at the narrow end of the band lays out 944-1280 CSS px wide and now carries the control:
   keep every nav label on one line by dropping the nav icons there. */
html[data-mam-desk] .sc-primary a { white-space: nowrap; }
@media (max-width: 1599.98px) {
  html[data-mam-desk] .sc-primary a .sc-i { display: none; }
  html[data-mam-desk] .sc-header { gap: 16px; }
}
