/* ─── The live stations' shared styles: the station card and the filters ───
   Loaded by the public app (index.html, after main.css) and by the admin's Stations tab (its partial), which draws the
   app's own station markers, card and filters (decisions/admin-reorganisation.md → 2026-11-17). Design-system tokens
   only, so light mode needs no override block. Moved out of main.css on 2026-11-17. */

/* A station card's head bits: the provider's last check and the next reading, at the end of the second line */
.marker-card-checked, .marker-card-next { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.marker-card-checked::before { content: "\00a0·\00a0"; }
.marker-card-checked[data-tone="warn"] { color: var(--warn-ink); }

/* The tapped marker while its sheet is open (MarkerSheet adds the class to the icon element) */
.leaflet-marker-icon.marker-selected { border-radius: var(--r-pill); outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent-glow); }

/* Station: the reading now, its age, the recent wind, the other values, the operator's page */
.station-sheet { display: flex; flex-direction: column; gap: var(--sp-3); }
.station-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.station-now-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.station-now-value { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.station-now-value b { font-weight: 600; }
.station-now-value small { font-size: var(--fs-sm); font-weight: 400; color: var(--ink-2); }
/* The wind speed underlined in the map's colour for that speed (--wind, set from windSpeedColor) */
.station-now [data-field="speed"] { text-decoration: underline 3px var(--wind, transparent); text-underline-offset: 5px; }
.station-dir-arrow { display: inline-block; }
.station-sheet.is-stale .station-now-value { color: var(--muted); }
/* The reading's age under the wind figure: the unit's size, in the freshness pill's colours (the design
   system's good / warn / bad inks; docs/decisions/ui-ux.md → The reading's age on the card) */
.marker-card-age { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marker-card-age[data-tone="good"] { color: var(--good-ink); }
.marker-card-age[data-tone="warn"] { color: var(--warn-ink); }
.marker-card-age[data-tone="bad"] { color: var(--bad-ink); }
.marker-card-age[data-tone="muted"] { color: var(--muted); }
/* A source's credit at the card's foot (Pioupiou's OpenWindMap, config credits.stations) */
.station-credit { margin: 0; }
.station-history-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
/* The chart's box keeps its height in every state: no jump when the chart arrives */
.station-history-chart { position: relative; height: 160px; border-radius: var(--r-sm); }
.station-history-canvas { position: absolute; inset: 0; }
.station-history-canvas canvas { display: block; }
.station-history-msg { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-3); color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.station-history-chart:not([data-state="ready"]) .station-history-msg { display: flex; }
.station-history-chart:not([data-state="ready"]) .station-history-canvas { visibility: hidden; }
.station-history-chart[data-state="loading"] { background: linear-gradient(90deg, var(--panel-2) 0%, var(--line) 50%, var(--panel-2) 100%) 0 0 / 200% 100%;
  animation: station-skeleton 1.4s ease-in-out infinite; }
@keyframes station-skeleton { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .station-history-chart[data-state="loading"] { animation: none; } }
.station-history-note { min-height: calc(var(--fs-sm) * var(--lh)); margin: var(--sp-1) 0 0; }   /* one line reserved */
.station-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-1) var(--sp-4); margin: 0; }
.station-facts > div { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-sm); }
.station-facts dt { color: var(--muted); }
.station-facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
/* The station's id: one line across the grid, cut with an ellipsis; a link to its page at the provider where there is one.
   The link's padding is its tap height (the row is not clipped, the link is) */
.station-facts > .station-fact-wide { grid-column: 1 / -1; justify-content: flex-start; align-items: center; }
.station-fact-wide dd { display: flex; min-width: 0; }
.station-fact-wide dd > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-id { padding: var(--sp-2) 0; margin: calc(-1 * var(--sp-2)) 0; color: var(--accent-2); text-decoration: none; }
@media (hover: hover) { .station-id:hover { text-decoration: underline; } }


/* The live stations' filters (components/station-filters.js → StationFilters.render, the app's Live Stations panel and
   the admin's Stations tab): the design system's .ds-chip, .on = pressed, a label above each group, the chips wrapping */
.filter-groups .filter-group { display: flex; flex-direction: column; gap: var(--sp-1); }
.filter-groups .filter-group + .filter-group { margin-top: var(--sp-2); }
.filter-label { color: var(--muted); font-size: var(--fs-xs); }
/* A folded group (Provider): the line is the label and the choice in force, the chips come under it when unfolded */
.filter-groups details.filter-fold { display: block; }
.filter-fold > summary { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--ctl-h); border-radius: var(--r-sm); cursor: pointer; list-style: none; }
.filter-fold > summary::-webkit-details-marker { display: none; }
.filter-fold > summary::after { content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; margin-right: var(--sp-2); border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform var(--t-fast) var(--ease); }
.filter-fold[open] > summary::after { transform: rotate(-135deg); }
.filter-fold > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.filter-fold-value { color: var(--ink-2); font-size: var(--fs-sm); }
.filter-fold > .filter-chips { margin-top: var(--sp-1); }
@media (pointer: coarse) { .filter-fold > summary { min-height: var(--tap); } }
@media (prefers-reduced-motion: reduce) { .filter-fold > summary::after { transition: none; } }
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
/* A value's dot: the colour its station source states (inline, station-filters.js), the design system's --unknown without one (CR-48) */
.filter-chips .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--unknown); }
@media (pointer: coarse) { .filter-chips { gap: var(--sp-2); } }   /* the chips' tap areas (.ds-chip::before) do not overlap */
