/* Latest-fires widget. Self-contained — it's its own iframe, so nothing here leaks onto cabinradio.ca
   and the host theme can't reach in. Light theme (white panel, dark text). House fonts come from
   fonts.css; the flame icon + "new" halo from flame.css (shared with the map). Mobile-first: the base
   rules are the narrow layout; the column titles + the "Show on map" pill are added at >=431px. */
:root {
  --bg: #ffffff;
  --text: #16181d;
  --muted: #646b76;
  --line: #e6e8ec;
  --line-strong: #d3d7de;
  --row-hover: #f5f6f8;
  --stale-bg: #fdf4d9; --stale-text: #7a5c00; --stale-line: #efd99c;
  --down-bg: #fdecea; --down-text: #a3261d; --down-line: #f3c4bf;
  --cue-w: 118px; /* desktop "Show on map" pill width — header reserves the same so columns line up */
  --date-w: 170px; /* desktop date-column width — fits "Jun 27, 11:51am MDT" with slack + space to the pill */
  --font-head: 'Domine', Georgia, 'Times New Roman', serif;
  --font-body: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-data: 'Lora', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--font-body); color: var(--text); background: var(--bg); }

.fw { padding: 13px 15px 11px; }
.fw-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.fw-headrow { display: flex; align-items: center; gap: 8px; }
.fw-brand { display: block; width: 24px; height: 24px; border-radius: 5px; flex: none; }
.fw-title { margin: 0; font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); }
.fw-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }

.fw-banner { margin-top: 9px; padding: 6px 10px; border-radius: 6px; font-size: 12px; line-height: 1.35; }
.fw-banner-stale { background: var(--stale-bg); color: var(--stale-text); border: 1px solid var(--stale-line); }
.fw-banner-down { background: var(--down-bg); color: var(--down-text); border: 1px solid var(--down-line); }

/* Column titles — hidden on mobile (base), shown at >=431px. Mirrors a row's column widths so the
   "Date reported" label sits over the dates. */
.fw-colhead { display: none; }

.fw-list { list-style: none; margin: 4px 0 0; padding: 0; }
.fw-row {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 11px 6px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.fw-row:hover { background: var(--row-hover); }
.fw-row:focus-visible { outline: 2px solid #2f6fd0; outline-offset: -2px; }
.fw-no-link .fw-row { cursor: default; }
.fw-no-link .fw-row:hover { background: none; }
.fw-no-link .fw-cue { display: none; }

.fw-icon { flex: 0 0 28px; display: flex; justify-content: center; }
.fw-body { flex: 1 1 auto; min-width: 0; }

.fw-line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fw-name { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--text); }
.fw-new {
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em; color: #fff;
  background: #e8202a; padding: 1px 6px; border-radius: 10px;
}
/* Mobile: date inline at the top-right of the name line (unchanged). */
.fw-date-inline { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fw-date-col { display: none; } /* desktop-only date column — shown at >=431px (see media query) */

.fw-line2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; font-size: 13px; color: var(--muted); }
.fw-status { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.fw-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fw-sep { color: #b3b8c0; }

.fw-line3 { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.fw-pinic { color: var(--muted); vertical-align: -1px; margin-right: 2px; }

/* "Show on map" cue. Mobile (base): just the chevron, no pill (the text is hidden). */
.fw-cue { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fw-cue-text { display: none; }

/* On the light theme a white halo is invisible, so the "new" flame gets a subtle dark ring instead so it
   still stands out; the red "New · 24h" pill stays the primary flag. (The map keeps its white halo on
   the dark basemap — this only overrides inside the widget.) */
.fw .fire-flame.fire-new {
  filter:
    drop-shadow(0 0 0.6px rgba(22, 24, 29, 0.6)) drop-shadow(0 0 2px rgba(22, 24, 29, 0.32))
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.fw-empty { padding: 18px 6px; color: var(--muted); font-size: 14px; }

.fw-foot {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  font-size: 11px; color: var(--muted);
}
.fw-legend { display: flex; flex-wrap: wrap; gap: 8px 13px; }
.fw-lg { display: inline-flex; align-items: center; gap: 5px; }
.fw-note { margin-left: auto; }

/* ---- Tablet and up (>=431px): "Show on map" becomes a pill. The date stays inline on the name line
   here — there isn't room for a fixed date column at this width without cramping the fire details. ---- */
@media (min-width: 431px) {
  .fw-cue {
    width: var(--cue-w); padding: 6px 10px; color: var(--text);
    border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg);
  }
  .fw-cue-text { display: inline; }
  .fw-row:hover .fw-cue { background: #fff; border-color: var(--muted); }
}

/* ---- Desktop (>=600px): the date moves into its own vertically-centred column, with the column titles
   above it and space before the pill. Row columns and header columns share the same widths
   (28px icon · flex name · --date-w date · --cue-w pill) so "Date reported" lines up over the dates.
   Below 600px the date falls back to inline on the name line (above). Mobile is untouched. ---- */
@media (min-width: 600px) {
  .fw-date-inline { display: none; }            /* hide the inline copy; the column takes over */
  .fw-date-col {
    display: flex; align-items: center; flex: 0 0 var(--date-w);
    font-size: 12px; color: var(--muted); white-space: nowrap;
  }

  .fw-colhead {
    display: flex; align-items: center; gap: 11px;
    padding: 2px 6px 7px; margin-top: 2px; border-bottom: 1px solid var(--line);
    font-size: 11px; color: var(--muted);
  }
  .fw-ch-icon { flex: 0 0 28px; }
  .fw-ch-fire { flex: 1 1 auto; min-width: 0; }
  .fw-ch-date { flex: 0 0 var(--date-w); }
  .fw-ch-cue { flex: 0 0 var(--cue-w); }
}
