/*
 * BugKit, wearing AlphaForm's colours.
 *
 * `bugkit.css` ships its own dark palette and switches to light on
 * `@media (prefers-color-scheme: light)`. This product does not switch on the
 * OS preference — the theme is `data-theme` on `<html>`, written before first
 * paint by the inline script in `index.html`, and a reader on a light OS may be
 * running the dark CRM or the other way round. Left alone, the reporter would
 * be the one white rectangle in a dark app, on exactly the screenshot someone
 * is trying to file.
 *
 * So the six `--bk-*` variables are re-pointed at the product's own semantic
 * tokens (`styles/tokens.css`). Both themes are covered by one block, because
 * the tokens themselves already are.
 *
 * Load this AFTER bugkit.css: the override is `:root` against `:root`, so it
 * wins on document order and nothing here needs `!important`.
 *
 * Only variables are set. No `.bk-*` rule is restyled — keeping the widget's
 * own stylesheet untouched is what lets `bugkit.css` be replaced wholesale when
 * the skill it came from updates.
 */

:root,
[data-theme='dark'],
[data-theme='light'] {
  --bk-bg: var(--surface-1);
  --bk-surface: var(--surface-2);
  --bk-border: var(--line);
  --bk-text: var(--text-primary);
  --bk-dim: var(--text-muted);
  /* Gold is this product's accent for a primary action; the widget's stock
     orange belongs to no palette here. */
  --bk-accent: var(--accent);
  --bk-radius: 10px;
}

/* The widget prints white on `--bk-accent` for its primary button. Gold at
   #d9a441 carries dark ink in this product (`--text-on-accent`), and white on
   it measures 2.1:1 — under the 4.5:1 floor `scripts/contrast-check.mjs`
   holds every other control to. This is the one `.bk-*` rule here, and it
   exists to keep "Send report" legible rather than to restyle anything. */
.bk-pri {
  color: var(--text-on-accent);
}

/* The widget ships the FAB at z-index 2147483000, which puts a corner button on
   top of every dialog, sheet, toast and tooltip in the product. It belongs on
   this product's scale (`--z-*` in tokens.css): above sticky chrome, below the
   first overlay, so ⌘K, the record sheet and the mobile nav drawer all cover it
   — which is right, because none of them is a moment to file a bug from.
   The reporter's own modal is unaffected: it carries its own far higher stack
   value, so opening it from the hotkey still paints over everything. */
.bk-fab {
  z-index: var(--z-dropdown);
}
