/*
 * TAG Legal Desk v2.1, J138 (28 Sep 2026): boosts (js/v21_boosts.js). The chip beside your own chip while a boost runs,
 * the Boosts popover, and the small badge on a colleague's crew avatar. The desk's own tokens, so Light, Dark, Eucalypt,
 * Harbour and High contrast all follow. The glow only breathes with motion allowed; under reduced motion and Calm it is
 * still. Everything here carries data-v21="game" in the page, so the core's quiet rule hides it while a welfare message
 * is open, in the quiet period and under the "While nobody was here" band.
 */

/* ---------- the chip ---------- */
.v21-boost { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; margin-right: 8px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ember) 60%, transparent); background: color-mix(in srgb, var(--ember) var(--tint-alpha), var(--solid));
  color: var(--ink); font: inherit; font-size: .8125rem; font-weight: 700; line-height: 1; cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v21-boost:hover { background: color-mix(in srgb, var(--ember) calc(var(--tint-alpha) * 1.6), var(--solid)); }
.v21-boost:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.v21-boost .v21-boost-sep { color: var(--ink-2); font-weight: 400; }
.v21-boost .v21-boost-left { font-weight: 600; color: var(--ink-2); }
/* The gentle glow: a soft ring that breathes, only with motion allowed and never in Calm. */
.v21-boost::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; opacity: .45;
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--ember) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduced"]):not([data-calm="on"]) .v21-boost::after { animation: v21-boost-glow 2400ms ease-in-out infinite alternate; }
}
:root[data-motion="full"]:not([data-calm="on"]) .v21-boost::after { animation: v21-boost-glow 2400ms ease-in-out infinite alternate; }
@keyframes v21-boost-glow { from { opacity: .2; } to { opacity: .8; } }
:root[data-theme="high_contrast"] .v21-boost { border: 2px solid #000; background: #fff; color: #000; }
:root[data-theme="high_contrast"] .v21-boost .v21-boost-left, :root[data-theme="high_contrast"] .v21-boost .v21-boost-sep { color: #000; }
:root[data-theme="high_contrast"] .v21-boost::after { display: none; }

/* ---------- a colleague's crew avatar ---------- */
.crew .v21-boost-badge { position: absolute; top: -7px; right: -10px; z-index: 1; min-width: 20px; padding: 1px 4px; border-radius: 999px; text-align: center;
  font-size: .625rem; font-weight: 800; line-height: 1.2; color: var(--ink); background: var(--solid); border: 1px solid var(--ember); pointer-events: none; }
:root[data-theme="high_contrast"] .crew .v21-boost-badge { border: 2px solid #000; background: #fff; color: #000; }

/* ---------- the Boosts popover ---------- */
.pop.v21-boost-pop { width: min(400px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; background: var(--solid); }
.v21-boost-pop-box { display: grid; gap: 10px; }
.v21-boost-pop-box h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.v21-boost-pop-box p { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--ink); }
.v21-boost-pop-box .meta { color: var(--ink-2); }
.v21-boost-now strong { color: var(--ink); }
.v21-boost-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.v21-boost-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--glass-rim); background: var(--solid); }
.v21-boost-what { display: grid; gap: 2px; min-width: 0; }
.v21-boost-what strong { font-size: .9375rem; color: var(--ink); }
.v21-boost-item .btn { flex: none; min-height: 44px; }
.v21-boost-msg { min-height: 1.2em; font-weight: 700; color: var(--warn); }
.v21-boost-msg:empty { min-height: 0; }
.v21-boost-msg.is-ok { color: var(--ok); }
:root[data-theme="high_contrast"] .v21-boost-item { border: 2px solid #000; background: #fff; }
:root[data-theme="high_contrast"] .v21-boost-msg, :root[data-theme="high_contrast"] .v21-boost-pop-box .meta { color: #000; }

/* ---------- phone width: the chip keeps the multiplier and the time, nothing else ---------- */
@media (max-width: 599px) {
  .v21-boost { padding: 0 10px; margin-right: 6px; font-size: .75rem; }
  .v21-boost .v21-boost-sep { display: none; }
  .v21-boost-item { flex-wrap: wrap; }
}
