@layer base, components, pages;

/* One status chip (A34). .badge is the larger size of the same chip; the tone classes
   are shared. Text stays --fg on a tint, so it passes contrast in both themes (A30). */
@layer components {
  .pill, .badge { display: inline-block; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 15%, var(--bg)); color: var(--fg); font-weight: 600; }
  .pill { padding: 0 var(--space-2); font-size: var(--text-xs); }
  .badge { margin: 0 0 var(--space-3); padding: var(--space-1) var(--space-3); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
  .pill-ok, .pill-approved, .pill-check-passed, .badge-success { background: color-mix(in srgb, var(--success) 22%, var(--bg)); }
  .pill-wait, .pill-submitted, .pill-check-queued, .pill-check-running, .badge-warning { background: var(--highlight); color: var(--on-highlight); }
  .pill-changes_requested, .pill-check-failed, .badge-danger { background: color-mix(in srgb, var(--danger) 18%, var(--bg)); }
  .pill-ai { background: color-mix(in srgb, var(--accent) 28%, var(--bg)); }

  /* Status words in running text: a colored dot carries the color, the words stay readable. */
  .status-live, .status-bad { color: var(--fg); }
  .status-live::before, .status-bad::before { content: "● "; }
  .status-live::before { color: var(--success); }
  .status-bad::before { color: var(--danger); }
  .status-fallback { color: var(--warning); }

  /* Filter chips (console lists). */
  .chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  nav.chips { margin-bottom: var(--space-6); }
  .chip { display: inline-flex; gap: var(--space-2); align-items: center; min-height: 36px; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent); color: var(--fg); text-decoration: none; font-size: var(--text-sm); }
  .chip[aria-current=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  .chip-n { opacity: .7; font-variant-numeric: tabular-nums; }
}
