/* ==========================================================================
   ba-bridge.css — the Marine Underwriting UI kit, wired to Prism's palette.

   ba-ui.css is the same file that ships in the Marine Underwriting workspace:
   the pop-out window manager, the enhanced tables with filter, sort, column
   resize and CSV export, the toasts and the drawer. It reads its colours from
   the host application rather than carrying its own, which is what lets one
   kit serve two products.

   Prism already spends --accent-ink on the accent colour itself, where the kit
   means the ink drawn ON the accent. Rather than have the two fight over a
   name, every semantic token the kit reads is namespaced --bax-* and mapped
   here. Change Prism's palette and the kit follows; nothing in the kit has to
   know which product it is running in.
   ========================================================================== */

:root {
  --bax-bg: var(--bg);
  --bax-surface: var(--surface);
  --bax-surface-alt: var(--surface-2);
  --bax-ink: var(--ink);
  --bax-ink-soft: #3d4045;
  --bax-muted: var(--muted);
  --bax-muted-2: var(--muted-2);
  --bax-line: var(--line);
  --bax-line-soft: #eef0f4;

  /* The accent, and the ink that goes on top of it. */
  --bax-accent: var(--accent-ink);
  --bax-accent-dark: var(--accent-deep);
  --bax-accent-soft: var(--accent-soft);
  --bax-accent-ink: #ffffff;

  --bax-danger: var(--red);
  --bax-danger-soft: var(--red-bg);
  --bax-success: var(--green);
  --bax-success-soft: var(--green-bg);
  --bax-warn: var(--amber);
  --bax-warn-soft: var(--amber-bg);

  --bax-brand-pale: var(--slate);
  --bax-gv-green: var(--accent-ink);
  --bax-gv-green-dark: var(--accent-deep);
  --bax-gv-green-soft: var(--accent-soft);
}

html[data-theme="dark"] {
  --bax-ink-soft: #C3CEDF;
  --bax-line-soft: #1C273A;
  /* On the dark ground the accent is a pale blue, so the ink on it is the
     panel colour rather than white. */
  --bax-accent-ink: #0E1420;
}

/* The kit's own shadows and focus ring, restated for the dark ground. */
html[data-theme="dark"] {
  --ba-shadow-1: 0 1px 2px rgba(0, 0, 0, .40);
  --ba-shadow-2: 0 4px 14px rgba(0, 0, 0, .48);
  --ba-shadow-3: 0 18px 48px rgba(0, 0, 0, .62);
  --ba-focus: 0 0 0 3px rgba(143, 180, 240, .38);
}

/* Prism draws its own badges; the kit's badge classes are mapped onto them so
   an audit row reads the same in both products. */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border-radius: 20px; font: 600 10.5px/1.6 var(--sans); white-space: nowrap;
  border: 1px solid transparent; }
.badge-accent { color: var(--accent-ink); background: var(--accent-soft); }
.badge-unknown { color: var(--muted); background: var(--bg); border-color: var(--line); }
.badge-pass { color: var(--green); background: var(--green-bg); }
.badge-warn { color: var(--amber); background: var(--amber-bg); }
.badge-disc { color: var(--red); background: var(--red-bg); }
