/* The HUD "Pale Vector" in the game: what the restyle kit's airtime-hud.css could not know.
 *
 * airtime-hud.css is the kit's sheet, used as delivered (the centre messages, the rewind label).
 * Its chat / event log, scoreboard and watch bar are styled under class names of the kit's own
 * preview; the game builds those pieces itself (chatlog.js, scoreboard.js, demos.js), so the
 * same look is given to them here under their real names.
 *
 * Everything is scoped to <html data-hud="pv"> (HUD > HUD style; main.js sets it): with the
 * classic HUD the pieces keep the look their own scripts give them. The scope also puts these
 * rules above the sheets those scripts add at run time.
 *
 * The HUD's tokens are set on #hud itself, so the HUD looks the same under either menu style
 * (their sheets define --display, --fg … differently). Accent: Airtime's blue, as in the menu.
 */
:root[data-hud="pv"] #hud {
  --fg: #f1f4f5; --soft: rgba(241, 244, 245, .7); --dim: rgba(241, 244, 245, .44);
  --accent: #6ec6ff; --warn: #ffb224; --danger: #ff4a3d; --ok: #7dffa8;
  --display: "Barlow Condensed", "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-family: var(--body);
}
/* the kit's two volt details of the centre message, in the game's accent */
:root[data-hud="pv"] #center.ah-best::before { background: linear-gradient(90deg, rgba(110, 198, 255, 0), var(--accent) 30%, var(--accent) 70%, rgba(110, 198, 255, 0)); }

/* ───────── chat / event log (chatlog.js): bottom left, above what the canvas HUD has in that corner ───────── */
:root[data-hud="pv"] .chatlog {
  left: var(--ah-m); bottom: var(--ah-log); width: auto; max-width: min(44em, calc(100% - 2 * var(--ah-m) - 232px * var(--ah-u)));
  font: 500 calc(14px * var(--ah-u)) / 1.25 var(--body); color: var(--fg); text-shadow: none; transition: bottom .25s cubic-bezier(.16, 1, .3, 1);
}
:root[data-hud="pv"] .chatlog-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
:root[data-hud="pv"] .chat-line { position: relative; padding: .34em .8em .36em .95em; background: var(--ah-glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); overflow-wrap: anywhere; animation: ah-line-in .32s cubic-bezier(.16, 1, .3, 1) both; }
:root[data-hud="pv"] .chat-line::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .34); }
:root[data-hud="pv"] .chat-line.chat-chat::before, :root[data-hud="pv"] .chat-line.chat-own::before { background: var(--accent); }
/* opened (the chat key): the lines scroll on one dark ground, the input below them */
:root[data-hud="pv"] .chatlog.open .chatlog-lines { display: block; background: var(--ah-glass-2); border-radius: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); }
:root[data-hud="pv"] .chatlog.open .chat-line { background: none; box-shadow: none; animation: none; }
:root[data-hud="pv"] .chatlog.open .chat-line::before { display: none; }
:root[data-hud="pv"] .chatlog-row { margin-top: 2px; padding: .45em .8em; border-radius: 0; background: var(--ah-glass-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13), inset 2px 0 0 var(--accent); font: 500 .72em/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
:root[data-hud="pv"] .chatlog-row input { font: 500 calc(14px * var(--ah-u)) / 1.25 var(--body); letter-spacing: 0; text-transform: none; color: var(--fg); text-shadow: none; }
:root[data-hud="pv"] .chatlog-hint { margin-top: 2px; padding: .4em .8em; font: 500 .68em/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ───────── scoreboard (scoreboard.js; hold Tab) ───────── */
:root[data-hud="pv"] .sb-board {
  top: 50%; transform: translate(-50%, -50%); width: min(50em, calc(100% - 2 * var(--ah-m))); max-height: calc(100% - 6em); padding: 0;
  border: 0; border-radius: 0; font: 500 calc(15px * var(--ah-u)) / 1.2 var(--body); color: var(--fg); text-shadow: none;
  background: rgba(5, 8, 11, .84); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 1.6em 4em rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
:root[data-hud="pv"] .sb-board::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 3.4em; background: var(--accent); }
:root[data-hud="pv"] .sb-head { min-height: 0; padding: .7em 1.4em 0 1.5em; font: 600 2em/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-hud="pv"] .sb-sub { margin: 0; padding: .7em 1.4em 0 1.5em; font: 500 .7em/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-align: left; color: var(--soft); }
:root[data-hud="pv"] .sb-body { margin-top: .9em; border-top: 1px solid rgba(255, 255, 255, .13); scrollbar-color: rgba(255, 255, 255, .28) transparent; }
:root[data-hud="pv"] .sb-table { font-variant-numeric: tabular-nums; }
:root[data-hud="pv"] .sb-table th { padding: .7em .6em .55em; border-bottom: 0; font: 500 .66em/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
:root[data-hud="pv"] .sb-table td { padding: .44em .6em .46em; background: none; border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, .07); font-weight: 500; }
:root[data-hud="pv"] .sb-table th:first-child, :root[data-hud="pv"] .sb-table td:first-child { padding-left: 1.5em; }
:root[data-hud="pv"] .sb-table th:last-child, :root[data-hud="pv"] .sb-table td:last-child { padding-right: 1.4em; }
:root[data-hud="pv"] .sb-table td.sb-name { font: 600 1.14em/1 var(--display); letter-spacing: .08em; text-transform: uppercase; word-break: normal; overflow-wrap: anywhere; }
:root[data-hud="pv"] .sb-table td.sb-num { font: 600 1.1em/1 var(--display); letter-spacing: .04em; }
:root[data-hud="pv"] .sb-table tr.sb-me td { background: rgba(110, 198, 255, .1); }
:root[data-hud="pv"] .sb-table tr.sb-hl td { background: rgba(255, 255, 255, .09); }
:root[data-hud="pv"] .sb-table tr.sb-group td { padding: 1em .6em .5em 1.5em; border-top: 1px solid rgba(255, 255, 255, .13); border-bottom: 0; background: none; font: 600 1em/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--fg); }
:root[data-hud="pv"] .sb-compact .sb-table td { padding: .26em .6em .28em; font-size: .9em; }
:root[data-hud="pv"] .sb-compact .sb-table td:first-child { padding-left: 1.5em; }
:root[data-hud="pv"] .sb-band { width: .5em; height: .5em; margin-right: .6em; border: 0; vertical-align: .08em; }
:root[data-hud="pv"] .sb-status, :root[data-hud="pv"] .sb-auth { font: 500 .78em/1 var(--mono); color: var(--dim); }
:root[data-hud="pv"] .sb-more { margin: 0; padding: .5em; font: 500 .66em/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
:root[data-hud="pv"] .sb-spec-head { margin: 0; padding: 1em 1.4em .5em 1.5em; border-top: 1px solid rgba(255, 255, 255, .13); border-bottom: 0; font: 600 1em/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--fg); }
:root[data-hud="pv"] .sb-specs { padding: 0 1.4em .8em 1.5em; color: var(--soft); }
:root[data-hud="pv"] .sb-foot { margin: 0; padding: .7em 1.4em .8em 1.5em; border-top: 1px solid rgba(255, 255, 255, .13); font: 500 .68em/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* ───────── the bar while watching a ghost (demos.js): above the pieces stacked at the bottom centre ───────── */
:root[data-hud="pv"] body #dmBar { bottom: calc(var(--ah-bc) + 6px * var(--ah-u)); }

@media (max-width: 760px) {
  :root[data-hud="pv"] .chatlog { width: auto; font-size: 12px; }
  :root[data-hud="pv"] .sb-board { font-size: 13px; }
  :root[data-hud="pv"] .sb-table th:first-child, :root[data-hud="pv"] .sb-table td:first-child, :root[data-hud="pv"] .sb-head, :root[data-hud="pv"] .sb-sub { padding-left: 1em; }
  :root[data-hud="pv"] .sb-table th, :root[data-hud="pv"] .sb-table td { padding-left: .3em; padding-right: .3em; }
}
@media (prefers-reduced-motion: reduce) {
  :root[data-hud="pv"] .chat-line { animation-duration: .01s; }
}

/* the crosshair's look is the player's (Weapon tab): its canvas stays sharp, as with the classic HUD */
:root[data-hud="pv"] #cross { image-rendering: pixelated; }
