/* ==== Weather (/weather): current conditions, forecast and temperature comparison of a site (wx-) ====
   Same look as the rest of OneStop (app.css: panels, panel-head, hint, error, empty). Loaded by Components\App.razor for
   every page, after app.css. Pages: TTech.Platform.Client\Apps\Weather. Classes built in code (grep the prefix):
   wx-ok / wx-caution / wx-warning and their -text (Wx.LevelClass, the gust colours), day / night (WxNow, WxHours),
   new-day, today, weekend, the wx-ico-... parts of WeatherIcon. Phones: one column under 1000px, sideways scroll of the
   48 hours. */
:root {
  --wx-ok: #2f7d32;
  --wx-ok-soft: #e6f2e6;
  --wx-caution: #a15c00;
  --wx-caution-soft: #fdf0d8;
  --wx-warning: #b23b2e;
  --wx-warning-soft: #fbe7e4;
  --wx-rain: #4a7bb7;
  --wx-snow: #7aa7d6;
  --wx-cloud: #9ca3af;
  --wx-night: #2f3b52;
  --wx-now-from: #fbf3d5;       /* the "now" header by day: gold to beige to white */
  --wx-now-mid: #f4f1e8;
  --wx-now-to: #ffffff;
  --wx-hour-night: #f3f4f7;
}
/* Dark theme (html[data-theme="dark"]): the levels lightened, the day header and the night hours darkened */
:root[data-theme="dark"] {
  --wx-ok: #5cc260;
  --wx-ok-soft: #1d3420;
  --wx-caution: #e8a54e;
  --wx-caution-soft: #3b2c16;
  --wx-warning: #ee8a7e;
  --wx-warning-soft: #3e2220;
  --wx-rain: #6f9fd8;
  --wx-snow: #9cc0e6;
  --wx-now-from: #3a3217;
  --wx-now-mid: #2d291f;
  --wx-now-to: #221f1a;
  --wx-hour-night: #1b1e26;
}

.wx-page { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wx-h { display: flex; align-items: center; gap: 6px; }
.panel h3.wx-h { margin: 0; }

/* ---- Where: the site and the site buttons (Platform next release P5: no search, no coordinates) ---- */
.wx-place { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.wx-place-main { min-width: 0; }
.wx-eyebrow { color: var(--accent); font-size: 0.7rem; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.panel h2.wx-place-name { margin: 2px 0 4px; font-size: 1.45rem; font-weight: 900; overflow-wrap: anywhere; }
.wx-place-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 0.82rem; }
.wx-place-meta span + span::before { margin-right: 14px; margin-left: -8px; color: var(--faint); content: "·"; }
.wx-place-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wx-inline { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; min-width: 0; }
.wx-inline > * { flex: 1 1 220px; min-width: 0; }

.wx-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--btn);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.wx-btn:hover:not(:disabled) { background: var(--btn-hover); }
.wx-btn.primary { border-color: var(--os-accent-fill); background: var(--os-accent-fill); color: var(--os-on-accent-fill); }
.wx-btn.primary:hover:not(:disabled) { background: var(--os-accent-fill-hover); }
.wx-btn:disabled { cursor: not-allowed; opacity: 0.55; }

/* ---- A source that could not be read (WxError) and one being read (Platform batch 3, Q6: each loads on its own) ---- */
.wx-error { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wx-error-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.panel .wx-error { margin-top: 10px; }
.wx-wait { display: flex; flex-direction: column; gap: 8px; }
.wx-loading { margin-top: 12px; }

.wx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.wx-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 0.82rem;
  font-weight: 700;
}
.wx-chip .mud-icon-root { color: var(--brand-gold); }
.wx-chip.mine { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.wx-chip.mine .mud-icon-root { color: var(--accent); }
.wx-chip.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
a.wx-chip { padding-right: 12px; color: inherit; text-decoration: none; }
a.wx-chip.mine { color: var(--accent); }
.wx-chip .wx-chip-tag { margin-left: 2px; color: var(--muted); font-size: 1rem; }

/* ---- Temperature comparison (WxCompare) ---- */
.wx-compare-site, .wx-compare-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.wx-compare-site .mud-icon-root { color: var(--brand-gold); }
.wx-compare-verdict { padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); font-weight: 600; }
.wx-compare-verdict .mud-icon-root { color: var(--accent); }
.wx-compare-table td.num, .wx-compare-table th.num { text-align: right; white-space: nowrap; }
.wx-compare-table tr.wx-closest td { background: var(--accent-soft); }
.wx-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.wx-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--os-accent);
  color: var(--os-on-accent);
  font-size: 0.7rem;
  font-weight: 800;
  vertical-align: middle;
}

/* ---- The sites' editor (WeatherSitesPanel: the Sites dialog, Administration > Clients) ---- */
.wx-sites { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wx-site-form { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.wx-site-form h4 { margin: 0 0 8px; }

/* ---- Now and site operations ---- */
/* Now (left) and the site operations (right, its checks in two columns when there is room) side by side */
.wx-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; align-items: stretch; }

.wx-now { overflow: hidden; padding: 0; }
.wx-now-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, var(--wx-now-from) 0%, var(--wx-now-mid) 60%, var(--wx-now-to) 100%);
}
.wx-now.night .wx-now-head { background: linear-gradient(135deg, #2f3b52 0%, #46526b 70%, #5b6680 100%); color: #f3f4f6; }
.wx-now-main { min-width: 0; }
.wx-now-temp { font-size: 2.6rem; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.wx-now-desc { margin-top: 4px; font-size: 1.05rem; font-weight: 800; }
.wx-now-feels { margin-top: 2px; color: var(--muted); font-size: 0.88rem; }
.wx-now.night .wx-now-feels { color: #cfd5e1; }
.wx-daynight {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 75%, transparent);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 800;
}
.wx-now.day .wx-daynight .mud-icon-root { color: #c49a1a; }
.wx-now.night .wx-daynight { background: rgba(255, 255, 255, 0.15); color: #f3f4f6; }
.wx-now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); border-top: 1px solid var(--rule); }
.wx-metric { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.wx-metric .label { color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; }
.wx-metric b { display: inline-flex; align-items: center; gap: 5px; font-size: 1.05rem; font-weight: 800; }
.wx-metric .sub { color: var(--muted); font-size: 0.76rem; }
.wx-min { color: var(--muted); font-weight: 700; }
.wx-metric b.wx-sun { font-size: 0.95rem; white-space: nowrap; }
.wx-sun .mud-icon-root { color: #c49a1a; }

.wx-ops-summary { margin-bottom: 8px; padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.wx-ops-summary.wx-ok { background: var(--wx-ok-soft); color: var(--wx-ok); }
.wx-ops-summary.wx-caution { background: var(--wx-caution-soft); color: var(--wx-caution); }
.wx-ops-summary.wx-warning { background: var(--wx-warning-soft); color: var(--wx-warning); }
.wx-ops-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.wx-op { display: flex; gap: 10px; padding: 8px 10px; border-left: 4px solid var(--wx-ok); border-radius: 6px; background: var(--panel-2); }
.wx-op.wx-caution { border-left-color: var(--wx-caution); background: color-mix(in srgb, var(--wx-caution-soft) 50%, var(--panel)); }
.wx-op.wx-warning { border-left-color: var(--wx-warning); background: color-mix(in srgb, var(--wx-warning-soft) 50%, var(--panel)); }
.wx-op-icon { flex: 0 0 auto; padding-top: 1px; color: var(--muted); }
.wx-op.wx-caution .wx-op-icon { color: var(--wx-caution); }
.wx-op.wx-warning .wx-op-icon { color: var(--wx-warning); }
.wx-op-body { min-width: 0; flex: 1; }
.wx-op-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wx-op-title { margin-right: auto; font-weight: 800; }
.wx-op-detail { margin-top: 2px; font-size: 0.88rem; }
.wx-op-advice { margin-top: 3px; font-size: 0.85rem; font-weight: 600; }
.wx-op-rule { margin-top: 3px; font-size: 0.74rem; }
.wx-ops-note { margin-bottom: 0; font-size: 0.76rem; }
.wx-level { padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
.wx-level.wx-ok { background: var(--wx-ok-soft); color: var(--wx-ok); }
.wx-level.wx-caution { background: var(--wx-caution-soft); color: var(--wx-caution); }
.wx-level.wx-warning { background: var(--wx-warning-soft); color: var(--wx-warning); }
.wx-level.now { border: 1px solid currentColor; background: var(--panel); text-transform: uppercase; }
.wx-caution-text { color: var(--wx-caution); font-weight: 800; }
.wx-warning-text { color: var(--wx-warning); font-weight: 800; }

/* ---- Next 48 hours: a strip that scrolls sideways ---- */
.wx-hours { display: flex; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.wx-hour {
  display: flex;
  min-width: 62px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 6px;
  border-left: 1px solid transparent;
  font-size: 0.8rem;
}
.wx-hour.night { background: var(--wx-hour-night); }
.wx-hour.new-day { border-left-color: var(--accent); }
.wx-hour:first-child { border-left-color: transparent; }
.wx-hour-day { min-height: 1.1em; color: var(--accent); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.wx-hour-time { color: var(--muted); font-weight: 700; }
.wx-hour-temp { font-size: 0.95rem; font-weight: 800; }
.wx-hour-pop { display: inline-flex; align-items: center; color: var(--faint); font-size: 0.74rem; }
.wx-hour-pop .mud-icon-root { width: 13px; height: 13px; }
.wx-hour-pop.wet { color: var(--wx-rain); font-weight: 700; }
.wx-hour-mm { min-height: 1.1em; color: var(--wx-rain); font-size: 0.72rem; font-weight: 700; }
.wx-hour-wind { display: inline-flex; align-items: center; gap: 2px; }
.wx-hour-gust { color: var(--muted); font-size: 0.74rem; }
.wx-hours-legend { margin-top: 4px; font-size: 0.75rem; }

/* ---- The three charts ---- */
.wx-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wx-chart { min-width: 0; margin-top: 4px; }

/* ---- Charts (WxPlot: the 48 hours and the temperature comparison; Platform batch 4, R5) ----
   SVG plot stretched to the width (its lines keep their width: vector-effect), every text in HTML. The chart is a size
   container: its hour labels (.wx-l12 / .wx-l6 / .wx-l3 / .wx-l2: one label every 12, 6, 3 or 2 hours) and the dates of its
   days (.wx-dl-*) show by its own width, at the widths of WxAxis.Levels (change both together). Series colours: the
   --wx-c-* below (light and dark), or the sources' colours of the comparison (Wx.SourceColor). */
:root {
  --wx-c-temp: #8d7f56;
  --wx-c-feels: #c49a1a;
  --wx-c-rain: #4a7bb7;
  --wx-c-wind: #8d7f56;
  --wx-c-gust: #6b7280;
  --wx-c-freeze: #4f7cb0;
  --wx-band: rgba(141, 127, 86, 0.07);
  --wx-grid: rgba(0, 0, 0, 0.07);
  --wx-midnight: rgba(0, 0, 0, 0.2);
}
:root[data-theme="dark"] {
  --wx-c-temp: #d4c49a;
  --wx-c-feels: #e0bf3f;
  --wx-c-rain: #6f9fd8;
  --wx-c-wind: #d4c49a;
  --wx-c-gust: #a3a9b4;
  --wx-c-freeze: #8fb3df;
  --wx-band: rgba(255, 244, 220, 0.045);
  --wx-grid: rgba(255, 244, 220, 0.08);
  --wx-midnight: rgba(255, 244, 220, 0.24);
}
.wx-plot { --wx-days-h: 18px; --wx-x-h: 22px; container: wxplot / inline-size; min-width: 0; }
.wx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; padding: 0 0 0 40px; list-style: none; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.wx-legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* A series' key: a short line (dashed for a dashed series), a square for bars */
.wx-key { display: inline-block; flex: 0 0 auto; width: 16px; height: 0; border-top: 2.5px solid var(--c); border-radius: 2px; }
.wx-key.dashed { border-top-style: dashed; }
.wx-key.bar { width: 10px; height: 10px; border: 0; background: var(--c); }
.wx-plot-body { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.wx-yaxis { position: relative; height: var(--wx-plot-h); margin-top: var(--wx-days-h); }
.wx-unit { position: absolute; top: calc(-1 * var(--wx-days-h) - 3px); right: 8px; color: var(--muted); font-size: 0.68rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.wx-ylabel { position: absolute; right: 8px; color: var(--muted); font-size: 0.7rem; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; transform: translateY(-50%); }
.wx-area { position: relative; min-width: 0; border-radius: 6px; outline: none; }
.wx-area:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.wx-days { position: relative; height: var(--wx-days-h); }
.wx-day-label { position: absolute; top: 0; overflow: hidden; color: var(--accent-strong); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.4px; line-height: var(--wx-days-h); text-align: center; text-transform: uppercase; white-space: nowrap; }
.wx-canvas { position: relative; height: var(--wx-plot-h); border-bottom: 1px solid var(--border); touch-action: pan-y; }
.wx-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wx-canvas svg :is(line, path) { vector-effect: non-scaling-stroke; }
.wx-band { fill: var(--wx-band); }
.wx-midnight { stroke: var(--wx-midnight); stroke-width: 1; }
.wx-grid { stroke: var(--wx-grid); stroke-width: 1; }
.wx-grid.zero { stroke: var(--wx-midnight); }
.wx-vgrid { stroke: var(--wx-grid); stroke-width: 1; stroke-dasharray: 2 4; }
.wx-mark { stroke-width: 1.5; stroke-dasharray: 6 4; }
.wx-bar { opacity: 0.85; }
.wx-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wx-now { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.wx-cross { stroke: var(--muted); stroke-width: 1; }
.wx-mark-label, .wx-now-label { position: absolute; z-index: 1; padding: 0 6px; border-radius: 999px; font-size: 0.66rem; font-weight: 800; line-height: 1.55; white-space: nowrap; pointer-events: none; }
.wx-mark-label { right: 4px; margin-top: -2px; background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--c); transform: translateY(-100%); }
.wx-now-label { top: 3px; background: var(--os-accent); color: var(--os-on-accent); transform: translateX(-50%); }
.wx-now-label.start { transform: translateX(-2px); }
.wx-now-label.end { transform: translateX(calc(-100% + 2px)); }
/* The hour shown: a dot on each line, the tooltip beside the vertical line (its left when past the middle) */
.wx-dot { position: absolute; z-index: 2; width: 10px; height: 10px; border: 2px solid var(--panel); border-radius: 50%; background: var(--c); pointer-events: none; transform: translate(-50%, -50%); }
.wx-tip { position: absolute; top: 4px; z-index: 3; min-width: 120px; max-width: min(260px, 48%); padding: 6px 10px 7px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); font-size: 0.76rem; pointer-events: none; transform: translateX(10px); }
.wx-tip.left { transform: translateX(calc(-100% - 10px)); }
.wx-tip-time { margin-bottom: 3px; color: var(--muted); font-weight: 800; white-space: nowrap; }
.wx-tip-row { display: flex; align-items: center; gap: 6px; min-width: 0; line-height: 1.5; white-space: nowrap; }
.wx-tip-row b { font-variant-numeric: tabular-nums; }
.wx-tip-name { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.wx-hits { position: absolute; inset: 0; }
.wx-hits span { position: absolute; top: 0; bottom: 0; cursor: crosshair; }
.wx-xaxis { position: relative; height: var(--wx-x-h); }
.wx-xlabel { position: absolute; top: 5px; color: var(--muted); font-size: 0.7rem; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; transform: translateX(-50%); }
.wx-xlabel.start { transform: none; }
.wx-xlabel.end { transform: translateX(-100%); }
/* For a screen reader only: what the tooltip says */
.wx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The labels of one level by the chart's width (WxAxis.Levels: 0 / 420 / 840 / 1240 px) */
.wx-plot :is(.wx-l6, .wx-l3, .wx-l2, .wx-dl-6, .wx-dl-3, .wx-dl-2) { display: none; }
@container wxplot (min-width: 420px) {
  .wx-plot .wx-l12 { display: none; }
  .wx-plot :is(.wx-l6, .wx-dl-6) { display: block; }
}
@container wxplot (min-width: 840px) {
  .wx-plot .wx-l6 { display: none; }
  .wx-plot :is(.wx-l3, .wx-dl-3) { display: block; }
}
@container wxplot (min-width: 1240px) {
  .wx-plot .wx-l3 { display: none; }
  .wx-plot :is(.wx-l2, .wx-dl-2) { display: block; }
}
/* A narrow chart (a phone): the tooltip across the top of the plot, its values side by side, so that no name is cut */
@container wxplot (max-width: 419px) {
  .wx-plot .wx-tip { right: 4px; left: 4px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-width: 0; max-width: none; transform: none; }
  .wx-plot .wx-tip-time { flex-basis: 100%; margin-bottom: 1px; }
}
@media (prefers-reduced-motion: no-preference) {
  .wx-tip, .wx-dot { transition: left 80ms linear, top 80ms linear; }
}

/* ---- Next 16 days ---- */
.wx-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.wx-day {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
}
.wx-day.today { border-top-color: var(--brand-gold); background: var(--panel-2); }
.wx-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.wx-day-name { font-weight: 900; text-transform: capitalize; }
.wx-day.weekend .wx-day-name { color: var(--accent); }
.wx-day-date { color: var(--muted); font-size: 0.8rem; }
.wx-day-sky { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wx-day-temps { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.wx-day-max { font-size: 1.35rem; font-weight: 900; }
.wx-day-min { color: var(--muted); font-size: 0.95rem; font-weight: 700; }
.wx-day-desc { min-height: 2.4em; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.wx-range { position: relative; height: 6px; border-radius: 3px; background: var(--chip); }
.wx-range span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #7aa7d6, var(--brand-gold), #d9822b);
}
.wx-day-facts { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 3px 6px; margin: 2px 0 0; font-size: 0.8rem; }
.wx-day-facts dt { display: flex; justify-content: center; color: var(--muted); }
.wx-day-facts dt .mud-icon-root { width: 16px; height: 16px; }
.wx-day-facts dd { margin: 0; font-weight: 700; }
.wx-day-facts .muted { margin-left: 4px; font-weight: 600; }
.wx-day-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.wx-flag { padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; }
.wx-flag.wx-caution { background: var(--wx-caution-soft); color: var(--wx-caution); }
.wx-flag.wx-warning { background: var(--wx-warning-soft); color: var(--wx-warning); }
.wx-days-legend { margin-top: 8px; font-size: 0.75rem; }

/* ---- Attribution (required by Open-Meteo's terms: keep it on the page) ---- */
.wx-footer { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0 4px 8px; color: var(--muted); font-size: 0.78rem; }
.wx-footer a { color: var(--accent); font-weight: 700; }

/* ---- Pictures (WeatherIcon) and the wind arrow (WindArrow) ---- */
.wx-ico { flex: 0 0 auto; overflow: visible; }
.wx-ico-sun circle { fill: var(--brand-gold); }
.wx-ico-sun line { stroke: var(--brand-gold); stroke-width: 3; stroke-linecap: round; }
.wx-ico-moon { fill: #c9cfdb; stroke: #9aa3b5; stroke-width: 1; }
.wx-now.night .wx-ico-moon { fill: #f1e7bf; stroke: none; }
.wx-ico-cloud { fill: var(--wx-cloud-fill, #ffffff); stroke: var(--wx-cloud); stroke-width: 2; stroke-linejoin: round; }
.wx-ico-cloud.back { fill: var(--wx-cloud-back, #e5e7eb); }
:root[data-theme="dark"] .wx-ico { --wx-cloud-fill: #d7dbe2; --wx-cloud-back: #9ea5b0; }
.wx-ico-cloud.dark { fill: #6b7280; stroke: #4b5563; }
.wx-ico-rain { stroke: var(--wx-rain); stroke-width: 3; stroke-linecap: round; }
.wx-ico-drop-dot { fill: var(--wx-rain); }
.wx-ico-snow line { stroke: var(--wx-snow); stroke-width: 2; stroke-linecap: round; }
.wx-ico-bolt { fill: var(--brand-gold); stroke: #a8841a; stroke-width: 1; stroke-linejoin: round; }
.wx-ico-fog { stroke: var(--wx-cloud); stroke-width: 3; stroke-linecap: round; }
.wx-arrow { flex: 0 0 auto; vertical-align: middle; }
.wx-arrow path { fill: var(--accent); }

/* ---- Phones and narrow windows ---- */
@media (max-width: 1100px) {
  .wx-charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .wx-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wx-now-temp { font-size: 2.2rem; }
  .wx-now-head { gap: 10px; padding: 16px 12px 14px; }
  .wx-now-head .wx-ico { width: 72px; height: 72px; }
  .wx-days { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wx-day { padding: 8px 10px; }
}
@media (max-width: 330px) {
  .wx-days { grid-template-columns: minmax(0, 1fr); }
}

/* V1.44: weather warnings (WxWarnings.razor): the banner (expected, now, all clear), My warnings, the editors' setup */
.wx-warning {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); border-left: 4px solid #d97706; background: var(--surface, transparent);
}
.wx-warning.now { border-left-color: #dc2626; }
.wx-warning.clear { border-left-color: #16a34a; }
.wx-warning-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.wx-warn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0; }
.wx-warn-row label, .wx-warn-grid label { display: inline-flex; align-items: center; gap: 6px; }
.wx-warn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; margin: 10px 0; }
.wx-input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: inherit; max-width: 100%; min-width: 0; width: 160px; }
.wx-warn-setup summary { cursor: pointer; margin-top: 8px; font-weight: 600; }

/* V1.44: Environment Canada's official alerts (WxAlerts.razor): ECCC's risk colours (yellow, orange, red; grey when it gives
   none) on the notes of the banner and the cards of the alerts in force */
:root {
  --wx-alert-yellow: #e5b700;
  --wx-alert-yellow-ink: #3a2e00;
  --wx-alert-orange: #e8730c;
  --wx-alert-orange-ink: #ffffff;
  --wx-alert-red: #c81e1e;
  --wx-alert-red-ink: #ffffff;
  --wx-alert-grey: #8a9099;
  --wx-alert-grey-ink: #ffffff;
}
:root[data-theme="dark"] {
  --wx-alert-yellow: #f2cc3a;
  --wx-alert-orange: #f0913d;
  --wx-alert-red: #ef5350;
  --wx-alert-red-ink: #1a0606;
  --wx-alert-grey: #a3a9b3;
  --wx-alert-grey-ink: #15181d;
}
.wx-alert-note, .wx-alert { --wx-alert-c: var(--wx-alert-grey); --wx-alert-ink: var(--wx-alert-grey-ink); }
.wx-alert-note.yellow, .wx-alert.yellow { --wx-alert-c: var(--wx-alert-yellow); --wx-alert-ink: var(--wx-alert-yellow-ink); }
.wx-alert-note.orange, .wx-alert.orange { --wx-alert-c: var(--wx-alert-orange); --wx-alert-ink: var(--wx-alert-orange-ink); }
.wx-alert-note.red, .wx-alert.red { --wx-alert-c: var(--wx-alert-red); --wx-alert-ink: var(--wx-alert-red-ink); }
.wx-alert-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); border-left: 4px solid var(--wx-alert-c); background: var(--surface, transparent);
}
.wx-alert-note.ended { border-left-color: #16a34a; }
.wx-alert-note .mud-icon-root { color: var(--wx-alert-c); }
.wx-alert-note.ended .mud-icon-root { color: #16a34a; }
.wx-alert-note-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.wx-alerts { display: flex; flex-direction: column; gap: 10px; }
.wx-alerts .panel-head { flex-wrap: wrap; gap: 2px 12px; }
.wx-alert {
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); border-left: 6px solid var(--wx-alert-c);
  background: color-mix(in srgb, var(--wx-alert-c) 8%, var(--panel));
}
.wx-alert-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wx-alert-colour {
  padding: 1px 9px; border-radius: 999px; background: var(--wx-alert-c); color: var(--wx-alert-ink);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase;
}
.wx-alert-tag { padding: 1px 8px; border-radius: 999px; border: 1px dashed var(--border); color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.wx-alert-title { font-size: 1.02rem; overflow-wrap: anywhere; }
.wx-alert-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--muted); font-size: 0.85rem; }
.wx-alert-meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.wx-alert-more summary { cursor: pointer; margin-top: 6px; font-size: 0.85rem; font-weight: 600; }
.wx-alert-text { margin: 6px 0 0; white-space: pre-line; font-size: 0.88rem; overflow-wrap: anywhere; }
.wx-alert-source { color: var(--muted); font-size: 0.78rem; }
