/* pages/chrome.css */
/* ---------- Health-strip extras (HH bar, alerts, actions) ---------- */
.health-strip__divider {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
  margin: 0 var(--space-8);
}
.health-strip__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: var(--fw-bold);
  color: var(--ok);
}
.health-strip__pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}
.health-strip--warn   .health-strip__pill        { color: var(--warn); }
.health-strip--warn   .health-strip__pill::before{ background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.health-strip--danger .health-strip__pill        { color: var(--danger); }
.health-strip--danger .health-strip__pill::before{ background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.health-strip__meta { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--fs-small); }
.health-strip__hh {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
}
.health-strip__hh-label { color: var(--text-muted); font-size: var(--fs-label); font-weight: var(--fw-bold); }
.health-strip__hh-bar {
  width: 80px;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.health-strip__hh-fill {
  display: block; /* was an inline span → width:% was ignored, so the bar always read empty */
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width var(--dur-slow) var(--ease-out);
}
.health-strip--warn   .health-strip__hh-fill { background: linear-gradient(90deg, var(--accent), var(--warn)); }
.health-strip--danger .health-strip__hh-fill { background: linear-gradient(90deg, var(--accent), var(--danger)); }
.health-strip__hh-text { font-family: var(--font-mono); color: var(--text-primary); font-size: var(--fs-small); }
.health-strip__alerts {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--warn);
  font-weight: var(--fw-bold);
  cursor: pointer;
}
.health-strip__alerts--ok    { color: var(--text-muted); cursor: default; }
.health-strip__alerts--danger{ color: var(--danger); }
.health-strip__actions { display: flex; gap: var(--space-8); margin-left: auto; }

@media (max-width: 640px) {
  .health-strip__meta,
  .health-strip__divider,
  .health-strip__hh-label,
  .health-strip__actions { display: none; }
  .health-strip__hh-bar  { width: 56px; }
}

/* ---------- Mobile bottom-tab-bar count badges (Plan 4 E.3) ---------- */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--warn);
  color: var(--bg-canvas);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-8);
  min-width: 16px;
  height: 16px;
  padding: 0 var(--space-4);
  margin-left: var(--space-4);
  font-family: var(--font-mono);
}
.tab-badge[hidden] { display: none; }
.tab-badge--danger { background: var(--danger); color: #fff; }

/* ---------- Health-strip HH chip becomes a button ---------- */
.health-strip__hh {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
}
.health-strip__hh:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-4);
}

/* ---------- Shared HH-limits popover ---------- */
/* Container shell (position/bg/border/radius/shadow/padding/z-index/max-height/
   overflow/color) now comes from the shared .overlay--popover core
   (css/overlay.css). Only the content width is worth keeping bespoke — see
   the .overlay--popover.hh-limits-popover keeper below. */
.hh-limits-popover__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.hh-limits-popover__head strong { font-size: var(--fs-secondary); }
.hh-limits-popover__close {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: var(--fs-section);
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--space-4);
}
.hh-limits-popover__close:hover { color: var(--text-primary); }
.hh-limits-popover__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.hh-limits-popover__hint,
.hh-limits-popover__error {
  color: var(--text-muted);
  font-size: var(--fs-secondary);
  margin: var(--space-8) 0;
}
.hh-limits-popover__error { color: var(--danger); }
.hh-limits-popover__foot {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: var(--fs-small);
  font-family: var(--font-mono);
}
/* Width keeper: specificity 0,2,0 beats the core .overlay--popover{min-width:200px}
   (0,1,0) regardless of file/load order. Needed for the dense limits table. */
.overlay--popover.hh-limits-popover { min-width: 320px; }
/* U2.1 — group head when ≥2 employers are surfaced in the popover. */
.hh-limits-group + .hh-limits-group { margin-top: var(--space-8); }
.hh-limits-group__head {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-4);
}
.hh-limits-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.hh-limits-row:last-child { border-bottom: none; }
.hh-limits-row__avatar { display: inline-flex; align-items: center; }
.hh-limits-row__main { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.hh-limits-row__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-8);
}
/* long manager names (emails) must truncate, not shove the count into the % */
.hh-limits-row__top > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-limits-row__mono {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  white-space: nowrap;
  flex: 0 0 auto;
}
.hh-limits-row__bar {
  position: relative;
  height: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.hh-limits-row__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--ok);
  transition: width var(--dur-slow) var(--ease-out);
}
.hh-limits-row__fill--warn   { background: var(--warn); }
.hh-limits-row__fill--danger { background: var(--danger); }
.hh-limits-row__percent {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  min-width: 32px;
  text-align: right;
}

