/*
 * shared/closure-card.css — styles for shared/closure-card.js.
 *
 * Split out of shared/crossing.css so the observer can load the closure card WITHOUT the
 * public app's whole stylesheet, which redefines body/.wrap/.hdr/.section/.empty/.info-text
 * and would restyle the observer wholesale. Every selector here is .closure-*, so the two
 * apps' own stylesheets can't collide with it.
 *
 * Both apps link this file. Keep it self-contained: no dependency on anything in
 * crossing.css or observe.css, in either direction.
 */
.closure-card{background:var(--rc-sunk,#0F172A);border-radius:8px;padding:10px;margin-bottom:8px}
.closure-card:last-child{margin-bottom:0}
.closure-active{border:1px solid var(--rc-closed,#DC2626)}
.closure-hdr{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;gap:6px;min-width:0}
.closure-time{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;flex-shrink:0}
/* min-width:0 + shrink so a long pill wraps inside the card instead of pushing the card
   wider than the viewport. It is nowrap by preference, not at any cost. */
.closure-pill{font-size:10px;color:var(--rc-pill-ink,#94A3B8);background:var(--rc-pill-bg,#334155);padding:2px 8px;border-radius:4px;white-space:nowrap;font-variant-numeric:tabular-nums;min-width:0;overflow:hidden;text-overflow:ellipsis}
.closure-pill-active{color:var(--rc-on-closed-soft,#FCA5A5);background:var(--rc-closed-soft,#7F1D1D)}
.closure-now{color:var(--rc-on-closed-soft,#FCA5A5)}
.closure-train{font-size:11px;color:var(--rc-text-2,#CBD5E1);padding:2px 0;display:flex;align-items:center;gap:4px}
.closure-train-route{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.closure-time-group{display:flex;align-items:baseline;gap:2px}
.closure-imminent{color:var(--rc-warn,#F59E0B)}
/* A close whose trigger has not fired: the time shown is a lower bound, not a prediction
   (register #14). Deliberately NOT the amber of .closure-imminent — that means "about to
   happen" and this means the opposite, a train stopped short with the barrier still up. */
.closure-held{color:var(--rc-held-text,#94A3B8)}
.closure-warn{font-size:9px;color:var(--rc-warn,#F59E0B);margin-bottom:4px}

/* The public app's closure ROWS (rowHtml, 2026-11 rebrand). No tabular figures on the times:
   Schibsted Grotesk's tabular colon is digit-wide and reads as "22 : 43". Only the public pages use these, and
   they load shared/theme.css, so no observer fallbacks are needed here. A three-column grid:
   when | trains | pill, with the duration line running underneath from the left. Every row uses
   the same fixed first column so the station names line up down the list, and the time and the
   pill sit centred against the trains when a route runs to two lines. */
.cr-row{display:grid;grid-template-columns:62px minmax(0,1fr) auto;column-gap:18px;row-gap:4px;align-items:center;padding:10px 16px;margin:0 -16px;border-top:1px solid var(--rc-line-soft)}
.cr-row:last-of-type{border-bottom:1px solid var(--rc-line-soft)}
.cr-current{background:var(--rc-closed-soft)}
.cr-when{grid-column:1;grid-row:1;font-size:19px;font-weight:800;letter-spacing:-.3px;line-height:1.15;color:var(--rc-text)}
.cr-when.cr-now{color:var(--rc-on-closed-soft)}
.cr-when.cr-held{color:var(--rc-held-text)}
.cr-when.cr-imminent{color:var(--rc-close-text)}
.cr-trains{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.cr-train{font-size:15px;font-weight:650;line-height:1.3;overflow-wrap:anywhere}
.cr-pill{grid-column:3;grid-row:1;justify-self:end;font-size:12px;font-weight:700;color:var(--rc-pill-ink);background:var(--rc-pill-bg);border-radius:999px;padding:4px 10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.cr-pill-imminent{color:var(--rc-on-closing);background:var(--rc-closing)}
.cr-under{grid-column:1 / 3;grid-row:2;font-size:12px;font-weight:500;color:var(--rc-dim);white-space:nowrap;font-variant-numeric:tabular-nums}
.cr-under.cr-now{color:var(--rc-on-closed-soft);font-weight:700}
.cr-warn{grid-column:1 / 4;grid-row:3;font-size:12px;color:var(--rc-warn)}
/* Placeholder rows, shown until the first data arrives (see the crossing-page template) */
.cr-skel .cr-when,.cr-skel .cr-train{color:var(--rc-faint)}
