/* TRH Local — Local Dashboard.
   Mobile first. Brand purple #661E9A, matching the existing card/feed presentation.
   Every media box declares its dimensions so nothing shifts while the page loads. */

.trhl-dash { --trhl-purple:#661E9A; --trhl-ink:#111; --trhl-muted:#666; --trhl-line:#e2e2e2;
  --trhl-bg:#fff; --trhl-soft:#f6f2fa; font-family:inherit; color:var(--trhl-ink); }

.trhl-dash-head { margin:0 0 18px; }
.trhl-dash-sub { margin:0; font-size:14.5px; line-height:1.5; color:var(--trhl-muted); }

/* ---- emergency ------------------------------------------------------- */
.trhl-emergency { display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  background:#8a0f0f; color:#fff; border-radius:6px; padding:12px 14px; margin:0 0 18px; }
.trhl-emergency-label { background:#fff; color:#8a0f0f; font-weight:800; text-transform:uppercase;
  letter-spacing:.04em; font-size:11.5px; padding:3px 8px; border-radius:3px; white-space:nowrap; }
.trhl-emergency-text { font-weight:700; font-size:15px; flex:1; min-width:0; }
.trhl-emergency-meta { flex-basis:100%; font-size:12px; opacity:.9; }
.trhl-emergency-link { color:#fff; font-weight:700; text-decoration:underline; white-space:nowrap; }

/* ---- grid ------------------------------------------------------------ */
.trhl-grid { display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width:760px){ .trhl-grid { grid-template-columns:1fr 1fr; gap:18px; }
  .trhl-span-2 { grid-column:1 / -1; } }
@media (min-width:1080px){ .trhl-grid { grid-template-columns:repeat(3,1fr); }
  .trhl-span-2 { grid-column:span 2; } }

.trhl-mod { background:var(--trhl-bg); border:1px solid var(--trhl-line); border-radius:8px;
  padding:16px; display:flex; flex-direction:column; }
.trhl-mod-title { margin:0 0 12px; font-size:15px; font-weight:800; text-transform:uppercase;
  letter-spacing:.045em; color:var(--trhl-purple); }

/* ---- freshness stamp ------------------------------------------------- */
.trhl-stamp { margin:12px 0 0; font-size:11.5px; line-height:1.45; color:var(--trhl-muted); }
.trhl-stamp a { color:var(--trhl-muted); text-decoration:underline; }
.trhl-stamp-stale { color:#9a6700; font-weight:600; }
.trhl-stamp-bad { color:#b32d2e; font-weight:600; }

.trhl-empty { margin:0; font-size:13.5px; line-height:1.5; color:var(--trhl-muted); }
.trhl-ok { margin:0; font-size:14px; font-weight:600; color:#1a7f37; }
.trhl-more { margin:12px 0 0; font-size:13px; }
.trhl-more a { color:var(--trhl-purple); font-weight:700; text-decoration:none; }

/* ---- alerts ---------------------------------------------------------- */
.trhl-alert-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.trhl-alert { border-left:4px solid #9a6700; padding:2px 0 2px 12px; display:flex; flex-direction:column; gap:3px; }
.trhl-alert-critical { border-left-color:#b32d2e; }
.trhl-alert-event { font-weight:800; font-size:15px; }
.trhl-alert-critical .trhl-alert-event { color:#b32d2e; }
.trhl-alert-area { font-size:13px; }
.trhl-alert-meta { font-size:11.5px; color:var(--trhl-muted); }
.trhl-alert-link { font-size:12.5px; font-weight:700; color:var(--trhl-purple); text-decoration:none; }

/* ---- weather --------------------------------------------------------- */
.trhl-now { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; min-height:52px; }
.trhl-now-temp { font-size:40px; font-weight:800; line-height:1; color:var(--trhl-purple); }
.trhl-now-text { font-size:16px; font-weight:700; }
.trhl-now-detail { flex-basis:100%; font-size:13px; color:var(--trhl-muted); }
.trhl-fc { list-style:none; margin:14px 0 0; padding:12px 0 0; border-top:1px solid var(--trhl-line);
  display:flex; flex-direction:column; gap:8px; }
.trhl-fc-item { display:grid; grid-template-columns:auto 44px 1fr; gap:8px; align-items:baseline; font-size:13px; }
.trhl-fc-name { font-weight:700; min-width:76px; }
.trhl-fc-temp { font-weight:800; color:var(--trhl-purple); }
.trhl-fc-short { color:var(--trhl-muted); }
.trhl-fc-pop { grid-column:3; font-size:11.5px; color:#1b5fa8; }

/* ---- radar ----------------------------------------------------------- */
.trhl-radar-wrap { background:#eef1f4; border-radius:6px; overflow:hidden; width:100%; }
.trhl-radar { width:100%; height:auto; display:block; }
.trhl-radar-link { margin:10px 0 0; font-size:13px; }
.trhl-radar-link a { color:var(--trhl-purple); font-weight:700; text-decoration:none; }

/* ---- news ------------------------------------------------------------ */
.trhl-news { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.trhl-news-item { display:flex; gap:12px; align-items:flex-start; }
.trhl-news-thumb { flex:0 0 auto; }
.trhl-news-thumb img { width:96px; height:64px; object-fit:cover; border-radius:4px; display:block; }
.trhl-news-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.trhl-news-flag { align-self:flex-start; background:#b32d2e; color:#fff; font-size:10.5px; font-weight:800;
  text-transform:uppercase; letter-spacing:.05em; padding:2px 6px; border-radius:3px; }
.trhl-news-cat { font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--trhl-purple); }
.trhl-news-link { font-size:14.5px; font-weight:700; line-height:1.3; color:var(--trhl-ink); text-decoration:none; }
.trhl-news-time { font-size:11.5px; color:var(--trhl-muted); }
@media (min-width:760px){ .trhl-news { display:grid; grid-template-columns:1fr 1fr; gap:16px 20px; } }

/* ---- generic lists --------------------------------------------------- */
.trhl-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:13px; }
.trhl-list-item { display:flex; flex-direction:column; gap:3px; }
.trhl-list-when { font-size:11.5px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--trhl-purple); }
.trhl-list-head { font-size:14px; font-weight:700; line-height:1.35; color:var(--trhl-ink); text-decoration:none; }
a.trhl-list-head:hover { color:var(--trhl-purple); }
.trhl-list-body, .trhl-list-meta { font-size:12px; color:var(--trhl-muted); line-height:1.45; }
.trhl-list-meta a { color:var(--trhl-muted); }
.trhl-list-docs { display:flex; flex-wrap:wrap; gap:8px; margin-top:2px; }
.trhl-list-docs a { font-size:11.5px; font-weight:700; color:var(--trhl-purple); text-decoration:none;
  border:1px solid var(--trhl-purple); border-radius:999px; padding:2px 9px; }

/* ---- trending -------------------------------------------------------- */
.trhl-trending { list-style:none; margin:0; padding:0; counter-reset:t; display:flex; flex-direction:column; gap:10px; }
.trhl-trending li { display:flex; gap:10px; align-items:baseline; }
.trhl-trending-rank { font-size:16px; font-weight:800; color:var(--trhl-purple); min-width:18px; }
.trhl-trending a { font-size:14px; font-weight:700; line-height:1.3; color:var(--trhl-ink); text-decoration:none; }

/* Touch targets stay >=44px tall on phones. */
@media (max-width:600px){
  .trhl-mod { padding:14px; }
  .trhl-news-link, .trhl-list-head, .trhl-trending a { padding:2px 0; display:inline-block; }
  .trhl-alert-link, .trhl-more a, .trhl-radar-link a { display:inline-block; padding:8px 0; }
}

/* ---------------------------------------------------------------------------
   Defending component sizing from the site's global image rule.

   trhnews.com carries a sitewide declaration:

       .entry-content img { width: 100% !important; height: auto !important; }

   which is right for article body images and wrong for every fixed-size
   thumbnail in a component. The dashboard renders inside .entry-content, so
   without this block the 96x64 news thumbnails were forced to their natural
   420x280. At phone width that 420px image overflowed a 313px flex row, the
   headline column was squeezed to ZERO width, and every headline wrapped one
   character per line — producing cards 1300-2000px tall that read as a huge
   blank area. Measured on the live site at 390px before this fix:
   section 13,163px, cards 1909/1622/1336/1767/2001/1944/266/2076px.

   The thumbnails therefore restate their own size with !important. The aspect
   ratio is unchanged (420x280 and 96x64 are both 3:2) and object-fit: cover
   means nothing is ever stretched or distorted.
   --------------------------------------------------------------------------- */
.trhl-dash .trhl-news-item { min-width: 0; }
.trhl-dash .trhl-news-thumb { flex: 0 0 96px; width: 96px; line-height: 0; }
.trhl-dash .trhl-news-thumb img {
  width: 96px !important;
  height: 64px !important;
  max-width: 96px !important;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
/* The copy column must be free to take the remaining width and to shrink. */
.trhl-dash .trhl-news-copy { flex: 1 1 auto; min-width: 0; }
.trhl-dash .trhl-news-link { overflow-wrap: anywhere; }

/* The radar genuinely does want full width; its wrapper reserves the space. */
.trhl-dash .trhl-radar { width: 100% !important; height: auto !important; }

/* Comfortable tap targets on a phone without making the cards tall. */
@media (max-width: 600px) {
  .trhl-dash .trhl-news-item { gap: 10px; }
  .trhl-dash .trhl-news-link { padding: 0; display: block; }
  .trhl-dash .trhl-news-copy { gap: 2px; }
}
