/* Shared status-chip layout, plus the hub's per-domain status colours
 * (POLISH lane, 2026-09-23). Pairs with app/chips.js's chip(icon, label,
 * cls) helper and the six shapes in app/icons.svg.
 *
 * Named .status-chip, not the shorter .chip, on purpose: `class="chip"`
 * already exists on this hub for unrelated things (federal.js's rail()
 * draws the agency-abbreviation badge as a bare <div class="chip">, org.js
 * draws the org-kind/legal-status tags the same way) -- reusing that name
 * here would silently restyle both the moment this file loads on their
 * pages, since CSS has no per-component namespacing. A checked, deliberate
 * name avoids that collision instead of relying on load order or specificity.
 *
 * .status-chip itself is layout only -- no colour -- so every domain's
 * modifier class below only has to set `color`; the border and icon both
 * read currentColor, so one declaration carries all three. That means a
 * status's contrast only has to be checked in one place per domain, not
 * once per chip instance, and matches each domain's own PREVIOUSLY REVIEWED
 * colour choice exactly (these are the same tokens each page's own
 * .pill/.badge/.status-pill rule already used -- this file moves them, it
 * does not repick them).
 *
 * Pages that use this file also load /app/icons.svg (chip()'s <use> target)
 * and /app/chips.js; both same-origin, no CSP change (font-src/img-src
 * 'self' already covered them -- see the note above cspReportOnly() in
 * database-worker/src/worker.js).
 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  font-size: var(--text-2xs);
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  /* Resets, not page defaults: a chip can land inside a container that sets
     its own text-transform/letter-spacing for ITS OWN label (federal.html's
     .case-role, uppercase) -- without this the chip's word would silently
     inherit that and stop matching every other chip's plain-case label. */
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);   /* only shows if a call site forgets a status class below */
}
.status-chip-ic {
  width: 11px;
  height: 11px;
  flex: none;
  color: inherit;
}
.status-chip-word {
  color: inherit;
}

/* ---- bill status (bill.js/legislative.js; was .pill.<status_cat>) ----
 * enacted keeps its filled treatment (a solid gold pill, not an outline --
 * the one status worth visually calling out ahead of the rest); the other
 * three keep the same outlined colours .pill had. */
.status-chip.bill-enacted { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--on-gold); }
.status-chip.bill-failed { color: var(--faint); }
.status-chip.bill-vetoed { color: var(--blue); }
.status-chip.bill-pending { color: var(--gold); }

/* ---- clinic status (clinics.js; was STATUS_COLOR + .status-pill/.sw) ----
 * --accent is clinics.html's own token (its :root, not tokens.css -- see
 * clinics.js's own comment above STATUS_COLOR for why); this class is only
 * ever applied on clinics.html, so it is always defined where it matters. */
.status-chip.clinic-operational { color: var(--pro); }
.status-chip.clinic-services_limited { color: var(--gold); }
.status-chip.clinic-services_paused { color: var(--accent); }
/* --anti-text, not --anti: tokens.css's own header documents --anti as
 * border/accent-only (measured too low a ratio to read as text), and
 * pagecheck.py's contrast check on this exact chip confirmed it live --
 * 3.39:1/3.57:1 against this page's two panel shades, short of the 4.5:1
 * WCAG AA needs for text this size. --anti-text clears it; same hue. */
.status-chip.clinic-closed { color: var(--anti-text); }
.status-chip.clinic-unclear { color: var(--faint); }

/* ---- federal action status (federal.js's card(), classified by
   federal-timeline.js's classifyStatus()) -- the same six categories and
   colours as the Timeline view's own legend (app/federal-timeline.js's
   STATUS_CATS), so the word+colour pairing matches whichever view a reader
   is looking at. ---- */
/* --anti-text, not --anti -- see the identical note on .clinic-closed above. */
.status-chip.fed-in_effect { color: var(--anti-text); }
.status-chip.fed-partly_blocked { color: var(--gold); }
.status-chip.fed-blocked_or_vacated { color: var(--pro); }
.status-chip.fed-pending { color: var(--muted); }
.status-chip.fed-withdrawn { color: var(--border-strong); }
.status-chip.fed-unknown { color: var(--faint); }

/* ---- litigation case status (federal.js's caseRow, the "Related
   litigation" list on a federal action card) -- new: a case with no
   date_terminated had no status word at all before, and a closed one was
   plain text folded into the meta line ("closed 2026-01-05"); both are now
   a chip, wording unchanged. ---- */
.status-chip.case-open { color: var(--muted); }
.status-chip.case-closed { color: var(--faint); }
