/* Goldberg Weather - Live: map add-ons. Loaded only on pages with a radar. Page colours come from
   the app.css tokens, which switch with the theme; map colours (--map-*) never do (D62). */
.map-frame { position: relative; }
.radar-fold { margin: var(--s-5) 0; }
.tot-places { margin: var(--s-4) 0; }
.radar-fold > summary, .tot-places > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--link); }
.radar-fold > summary::before, .tot-places > summary::before { content: "▸"; margin-right: var(--s-2); }
.radar-fold[open] > summary::before, .tot-places[open] > summary::before { content: "▾"; }
.tot-places > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.radar-map { margin: var(--s-3) 0 0; }
.radar-map .map-frame { max-width: 900px; }
.radar-layer { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1000 / 571.4; overflow: hidden; pointer-events: none; }
.radar-layer img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.radar-layer img.on { opacity: 1; }
.radar-states .border { fill: none; stroke: var(--map-border); stroke-width: .75px; stroke-opacity: .6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.radar-states { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.radar-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); line-height: 1.3; font-size: var(--t-sm); background: var(--surface); color: var(--ink); border-top: 2px solid var(--ink); }
.radar-ctl[hidden], .radar-status[hidden], .radar[hidden] { display: none; }
.radar-play, .radar-show { min-height: var(--tap); min-width: 5rem; padding: 0 var(--s-3); font: inherit; font-weight: 600; color: var(--ink); background: var(--bg); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer; }
.radar-play:focus-visible, .radar-show:focus-visible, .radar-range:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.radar-range { flex: 1 1 8rem; min-width: 6rem; min-height: var(--tap); accent-color: var(--primary); }
.radar-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 6.5rem; }
.radar-credit { flex: 1 1 100%; color: var(--link); }
.radar-status { margin: 0; padding: var(--s-2) var(--s-3); line-height: 1.3; background: var(--surface); }
.radar-show { margin: var(--s-2) 0 0; min-width: 0; min-height: 0; padding: var(--s-1) 0; border: 0; background: none; color: var(--link); font-weight: 500; font-size: var(--t-sm); text-decoration: underline; }
@media (pointer: coarse) { .radar-show { min-height: var(--tap); } }
.radar-show[hidden] { display: none; }
@media (min-width: 600px) { .radar-credit { flex-basis: auto; margin-left: auto; text-align: right; } }

/* Totals map (/maps, D27; desk style D62). Its colours (the map picture and the key strip) are
   drawn on the server from wxdesk.mapstyle, so no CSS colour feature changes them, and they stay
   the same in both themes. */
.tot-pick { display: flex; gap: var(--s-2); margin: var(--s-3) 0; }
.tot-pick label { flex: 1 1 0; min-width: 0; }
.tot-pick select, .tot-go { width: 100%; min-height: var(--tap); padding: 0 var(--s-2); font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 6px; }
.tot-go { flex: none; width: auto; padding: 0 var(--s-3); cursor: pointer; }
@media (max-width: 479px) {
  .tot-pick { flex-wrap: wrap; }
  .tot-pick select { padding: 0 var(--s-2); font-size: var(--t-sm); text-overflow: ellipsis; }
  /* Rain or snow and Region share a row; the window (with its dates) gets a row of its own. */
  .tot-pick label { flex: 1 1 40%; }
  .tot-pick label:nth-of-type(2) { flex-basis: 100%; order: 2; }
  .tot-pick label:nth-of-type(3) { order: 1; }
  .tot-pick label:nth-of-type(1) { order: 0; }
  .tot-go { order: 3; flex: 1 1 100%; }
}
.tot-pick.js .tot-go { display: none; }
.tot-pick select:focus-visible, .tot-go:focus-visible, .tot-pin:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tot-dry { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90%, 28rem); margin: 0; padding: var(--s-3); text-align: center; line-height: 1.35; background: var(--surface); border: 2px solid var(--ink); border-radius: 6px; }
.tot-window { margin: var(--s-2) 0 var(--s-3); }
.tot-sum { margin: var(--s-3) 0; font-size: var(--t-md); line-height: 1.4; }
.tot-fig { max-width: 900px; }
.tot-b { fill: none; stroke: var(--bs, none); stroke-width: .9px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.tot-bl { --bs: rgb(21 34 51 / .45); }
.tot-fig .map-frame .land, .tot-fig .map-frame .county { fill: var(--map-land); stroke: var(--map-border); stroke-opacity: .6; stroke-width: .75px; vector-effect: non-scaling-stroke; cursor: default; }
.tot-fig .map-frame .county:hover { stroke-width: .75px; stroke-opacity: .6; }
.tot-state { fill: none; stroke: #152233; stroke-opacity: .88; stroke-width: 1.3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.tot-edge { fill: none; stroke: #6b7480; stroke-opacity: .6; stroke-width: .75px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.tot-pin { cursor: pointer; }
.tot-box { fill: #fff; stroke: #8a93a0; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.tot-pv { font-weight: 700; fill: #152233; text-anchor: middle; }
.tot-name { font-size: .92em; font-weight: 600; fill: #152233; stroke: #fff; stroke-width: .2em; stroke-linejoin: round; paint-order: stroke; }
.tot-dot { fill: #152233; stroke: #fff; stroke-width: .08em; }
.tot-pin:hover .tot-box { stroke: #152233; }
/* Labels are sized for a 390 px screen; wider maps shrink each one around its own dot. */
@media (min-width: 600px) { .tot-lab { transform: scale(.7); } }
@media (min-width: 800px) { .tot-lab { transform: scale(.55); } }
@media (min-width: 1000px) { .tot-lab { transform: scale(.45); } }
.tot-key { display: block; width: 100%; height: 1.1rem; margin: var(--s-3) 0 2px; } /* server-drawn blend */
.tot-legend { display: flex; list-style: none; margin: 0 0 var(--s-2); padding: 0; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.tot-legend li { flex: 1 1 0; min-width: 0; white-space: nowrap; }
@media (max-width: 479px) { .v-rain .tot-legend li:nth-child(even) { color: transparent; } } /* 13 labels do not fit at 390 px */
.tot-unit, .tot-src { margin: var(--s-1) 0; font-size: var(--t-sm); }
.tot-note { margin: var(--s-3) 0 0; padding: var(--s-3); background: var(--surface); border-left: 4px solid var(--rule); }
.tot-empty { padding: var(--s-4); }
.tot-scroll { overflow-x: auto; }
.tot-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tot-table th, .tot-table td { padding: var(--s-2); text-align: left; border-bottom: 1px solid var(--rule); }
.tot-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-snowmap { margin: var(--s-2) 0 0; font-size: var(--t-sm); font-weight: 600; }
@media (max-width: 599px) {
  .tot-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tot-table, .tot-table tbody, .tot-table tr { display: block; }
  .tot-table tr { padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); }
  .tot-table th, .tot-table td { display: block; padding: var(--s-1) 0; border: 0; }
  .tot-table td[data-label] { display: flex; justify-content: space-between; gap: var(--s-3); }
  .tot-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--ink-muted); }
}
