/*
 * TAG Legal Desk v2.1: the speed and snipe bonus on the page (register J135, js\v21_bonus.js). Theme tokens only, no
 * inline styles (the page's policy): the badge's place comes through the CSSOM. Everything here is game art
 * (data-v21="game"), so the core's quiet rule hides it while a welfare message is open, in the quiet period and under
 * the nobody band; Calm hides it too. The chip's digits keep one width so "Snipe 0:42" never jitters as it counts.
 * High contrast: solid black on white. Forced colours: a plain outline. Reduced motion: the badge shows still.
 * Fix round (28 Sep 2026): Snipe uses --info, never --warn (the warning colour of "Take a closer look"), so a new admin
 * never reads a Snipe chip as a warning on the job. Speed keeps --ok.
 */

/* ---------- the window chip on a ready card ("Snipe 0:42", then "Speed 2:10") ---------- */
.card .v21-bonus-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .75rem; line-height: 1.125rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
  color: var(--ok); background: color-mix(in srgb, var(--ok) var(--tint-alpha), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent);
  /* above the card's own button, so a hover shows its plain words (the title); a press still opens the card */
  position: relative; z-index: 2; pointer-events: auto; cursor: pointer;
}
.card .v21-bonus-chip.is-snipe {
  color: var(--info); background: color-mix(in srgb, var(--info) var(--tint-alpha), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 40%, transparent);
}
:root[data-calm="on"] .card .v21-bonus-chip { display: none !important; }
:root[data-theme="high_contrast"] .card .v21-bonus-chip,
:root[data-theme="high_contrast"] .card .v21-bonus-chip.is-snipe { color: #000000; background: #FFFFFF; box-shadow: inset 0 0 0 2px #000000; }
@media (forced-colors: active) { .card .v21-bonus-chip { border: 1px solid CanvasText; } }

/* ---------- the moment by the presser's own chip ("Snipe +5", "Speed +2") ---------- */
.fx-layer .v21-bonus-pop {
  position: absolute; left: 0; top: 0; transform: translate(-50%, 0); pointer-events: none; z-index: 5;
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--solid); color: var(--ok); box-shadow: 0 0 0 2px var(--ok), var(--shadow-2);
  font-size: 1rem; line-height: 1.375rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.fx-layer .v21-bonus-pop.is-snipe { color: var(--info); box-shadow: 0 0 0 2px var(--info), var(--shadow-2); }
.fx-layer .v21-bonus-pop .v21-bonus-n { font-size: 1.25rem; font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--ink); }
:root[data-calm="on"] .fx-layer .v21-bonus-pop { display: none !important; }
:root[data-theme="high_contrast"] .fx-layer .v21-bonus-pop,
:root[data-theme="high_contrast"] .fx-layer .v21-bonus-pop.is-snipe { background: #FFFFFF; color: #000000; box-shadow: inset 0 0 0 3px #000000; }
:root[data-theme="high_contrast"] .fx-layer .v21-bonus-pop .v21-bonus-n { color: #000000; }
@media (forced-colors: active) { .fx-layer .v21-bonus-pop { border: 2px solid CanvasText; } }
@media (max-width: 599px) {
  .fx-layer .v21-bonus-pop { font-size: .875rem; padding: 4px 10px; }
  .fx-layer .v21-bonus-pop .v21-bonus-n { font-size: 1.0625rem; }
}

/* ---------- the pop's own words on every seat: "+3 for Avery, +5 snipe" (js\v21_sending.js) ---------- */
.fx-layer .v21-pop-words .v21-pop-bonus { color: var(--info); font-weight: 800; }
.fx-layer .v21-pop-words .v21-pop-bonus.is-speed { color: var(--ok); }
:root[data-theme="high_contrast"] .fx-layer .v21-pop-words .v21-pop-bonus { color: #000000; }
