/* bid-dash.css — design-system tokens + primitives for the ported dashboard
   charts (Prize Payouts, Leaderboard, PvP Bankroll race). Restyled to match the
   battles app's own design system (Trap font, lime #c7e94c, #000 surfaces,
   green #22c55e / red #f11a55), and SCOPED under the `.bid-dash` wrapper so the
   tokens never leak into the rest of the app. Inline `var(--…)` in the injected
   markup resolves from the `.bid-dash` ancestor. */

.bid-dash {
  /* tokens mapped to battles' palette (src/app/globals.scss :root) */
  --bg:        #000000;
  --panel:     #080808;
  --panel-2:   #101010;
  --line:      #1b1b1b;
  --line-soft: #141414;
  --ink:       #e8e8f0;
  --ink-dim:   #8d8d99;
  --ink-mute:  #5a5a5a;
  --lime:      #c7e94c;
  --lime-soft: #dff279;
  --green:     #22c55e;
  --red:       #f11a55;
  --warn:      #f0b132;
  --orange:    #f0b132;

  font-family: 'Trap', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.bid-dash *,
.bid-dash *::before,
.bid-dash *::after { box-sizing: border-box; }

.bid-dash img,
.bid-dash svg,
.bid-dash canvas { max-width: 100%; }

.bid-dash a { color: var(--lime); text-decoration: none; }
.bid-dash a:hover { color: var(--lime-soft); }

.bid-dash code,
.bid-dash .mono { font-family: 'Trap', system-ui, sans-serif; }
.bid-dash .nowrap { white-space: nowrap; }
.bid-dash .muted { color: var(--ink-dim); }
.bid-dash ::selection { background: var(--lime); color: var(--bg); }

/* ── Numeric typeface (tabular alignment) ─────────────────────────────── */
.bid-dash .num,
.bid-dash .value,
.bid-dash .big {
  font-family: 'Trap', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ── Uppercase label / display ────────────────────────────────────────── */
.bid-dash .label {
  font: 600 10px/1 'Trap', system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.bid-dash .display {
  font-family: 'Trap', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.bid-dash .agent-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px;
}
.bid-dash .agent-card.detail { gap: 18px; }

/* Halftone dot overlay — absolutely positioned inside a relative parent. */
.bid-dash .halftone {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(232,232,240,0.05) 1px, transparent 1.2px);
  background-size: 6px 6px;
}

/* Chips (inline status / count tags). */
.bid-dash .chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  font: 600 10px/1 'Trap', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  background: var(--panel-2);
}

/* Tabs + tiny buttons (leaderboard filter + show-all). */
.bid-dash .tab {
  height: 30px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 10px/1 'Trap', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.bid-dash .tab:hover { color: var(--ink); }
.bid-dash .tab.active { color: var(--lime); border-color: var(--lime); background: rgba(199,233,76,0.06); }
.bid-dash .tiny-btn {
  height: 26px; padding: 0 10px;
  font: 600 10px/1 'Trap', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.bid-dash .tiny-btn:hover { color: var(--ink); border-color: var(--ink-mute); }

/* Dotted divider line. */
.bid-dash .dotline {
  background-image: linear-gradient(to right, var(--ink-mute) 30%, transparent 0);
  background-size: 4px 1px;
  background-repeat: repeat-x;
  height: 1px;
}

/* ── Reserve chart height while loading (prevents layout shift / CLS) ──────
   The loading placeholders are short; once data arrives the SVG + side panels
   expand to their full height, which jumps the page. Give each loading state a
   min-height close to the loaded chart so the box is already the right size. */
.bid-dash .pp-loading {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bid-dash #chart-loading {
  min-height: 460px;
}
@media (max-width: 760px) {
  .bid-dash .pp-loading { min-height: 360px; }
  .bid-dash #chart-loading { min-height: 320px; }
}

/* ── Scrubber (the bankroll timeline range input) ─────────────────────────
   Replace the default OS slider (blue) with a thin dark track + lime thumb so
   it matches the theme. Firefox also gets a lime "progress" fill. */
.bid-dash input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: transparent;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.bid-dash input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--lime);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(199, 233, 76, 0.55);
  cursor: pointer;
}
/* Lime fill up to the playhead (--scrub %, set from JS), dark track after. */
.bid-dash input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--lime) 0,
    var(--lime) var(--scrub, 0%),
    var(--line) var(--scrub, 0%),
    var(--line) 100%
  );
}
.bid-dash input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
}
.bid-dash input[type="range"]::-moz-range-progress {
  height: 3px;
  background: var(--lime);
  border-radius: 2px;
}
.bid-dash input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--lime);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(199, 233, 76, 0.55);
  cursor: pointer;
}
