/* ═══════════════════════════════════════════════════════════════════
   Team Page v2 — scoped styles (SPRINT-076)

   Most visuals reuse canon classes from styles.css:
     .sec-hdr / .sec-hdr-title / .sec-hdr-sub
     .dist-row / .dist-lbl / .dist-svg-wrap / .dist-val / .dist-rows
     .time-bar / .time-btn / .time-lbl / .time-sep / .pp-role-toggle / .role-btn
     .zchip (.on .on.g .on.r .on.w) / .hex-filter-row / .hex-row-lbl
     .ds-row / .ds-abbr / .ds-bar-track / .ds-bar-fill / .ds-bar-marker / .self
     .lf-fs-tabs / .lf-fs-tab / .lf-fs-scroll / .lf-fs-empty / .lf-fs-card / .fd-card
     .flip-table / .tbl-wrap / .player-hdr / .pp-id-strip / .pp-id-stat / .team-color-bar

   This file holds ONLY team-v2-specific layout and the PI Team Column
   (which has no canon equivalent). Cutover removes the .team-v2 scope.
   ═══════════════════════════════════════════════════════════════════ */

.team-v2 {
  /* scope root — inherits page padding from .pg-inset on #app */
  color: var(--dark);
}

/* ── Team header (city + nick typography, grade chip) ── */

.team-v2 .tv2-hdr {
  /* reuse .player-hdr — just spacing tweak */
}

.team-v2 .tv2-logo-wrap {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-v2 .tv2-logo {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.team-v2 .tv2-city {
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  margin-right: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-v2 .tv2-nick {
  font-weight: 800;
  font-size: 24px;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.team-v2 .tv2-div {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--rules);
  border-radius: 2px;
}

.team-v2 .tv2-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.team-v2 .tv2-grade-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-v2 .tv2-grade-v {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Sections (just a max-width constraint — everything inside uses canon) ── */

.team-v2 .tv2-section {
  max-width: 1280px;
  margin: 28px auto;
}

/* ── PI Team Column (GENUINELY NEW — no canon equivalent) ── */

.team-v2 .tv2-column {
  max-width: 920px;
  margin: 48px auto 40px;
  padding: 0 12px;
}

.team-v2 .tv2-column-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.team-v2 .tv2-column-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.team-v2 .tv2-column-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.team-v2 .tv2-column-p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--dark);
  margin: 0;
  font-weight: 400;
}

.team-v2 .tv2-column-p-lede::first-letter {
  font-weight: 600;
}
.team-v2 .tv2-column-p-lede::first-line {
  font-weight: 500;
}

.team-v2 .tv2-column-rule {
  height: 1px;
  background: var(--red);
  margin: 18px 48px;
  opacity: 0.9;
}

.team-v2 .tv2-column-empty {
  max-width: 920px;
  margin: 48px auto 40px;
  padding: 24px;
  text-align: center;
}

.team-v2 .tv2-column-placeholder {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* ── Roster callouts (Anchor/Concern chips above table — no canon equiv) ── */

.team-v2 .tv2-callouts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
}

.team-v2 .tv2-callout {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
}

.team-v2 .tv2-callout-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  flex-shrink: 0;
  color: var(--bg);
}

.team-v2 .tv2-callout-anchor .tv2-callout-lbl { background: var(--good); }
.team-v2 .tv2-callout-concern .tv2-callout-lbl { background: var(--red); }

.team-v2 .tv2-callout-name {
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
}

.team-v2 .tv2-callout-name:hover { opacity: 0.7; }

.team-v2 .tv2-callout-txt {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Triptych grid — column layout only, everything inside uses canon ── */

.team-v2 .tv2-triptych-section {
  max-width: 1280px;
  margin: 28px auto;
}

.team-v2 .tv2-triptych-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-v2 .tv2-triptych-toggle {
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: auto;
}

.team-v2 .tv2-triptych-toggle:hover { opacity: 0.7; }

.team-v2 .tv2-triptych-body {
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  gap: 20px;
  padding: 16px 14px;
  align-items: start;
}

.team-v2 .tv2-triptych-collapsed .tv2-triptych-body { display: none; }

.team-v2 .tv2-triptych-zone { min-width: 0; }
.team-v2 .tv2-triptych-zone svg { width: 100%; max-width: 340px; display: block; }

.team-v2 .tv2-zone-filter-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.team-v2 .tv2-zone-filter-active {
  color: var(--red);
  font-weight: 600;
}

.team-v2 .tv2-zone-filter-clear {
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  margin-left: 6px;
  background: transparent;
  border: 1px solid var(--rules);
  border-radius: 2px;
  padding: 1px 6px;
  cursor: pointer;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.team-v2 .tv2-zone-filter-clear:hover { opacity: 0.7; }

.team-v2 .tv2-triptych-replay,
.team-v2 .tv2-triptych-col3 {
  min-width: 0;
  min-height: 300px;
}

.team-v2 .tv2-col3-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
}

/* ── Star scatter: two-pane layout only ── */

.team-v2 .tv2-star-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  padding: 14px;
}

.team-v2 .tv2-star-scatter-wrap {
  min-width: 0;
  border-right: 1px solid var(--rule);
  padding-right: 20px;
}

.team-v2 .tv2-star-table-wrap {
  overflow-y: auto;
  max-height: 320px;
}

/* ── Subway scroll container ── */

.team-v2 .tv2-subway-wrap {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.team-v2 #tv2-subway-svg { display: block; }

/* ── Two-pane: Division | Team vs League ── */

.team-v2 .tv2-twopane {
  max-width: 1280px;
  margin: 28px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.team-v2 .tv2-subsection { min-width: 0; }

/* Team vs League rows (numeric comparison block — no canon dist-row fit) */

.team-v2 .tv2-vl-row {
  display: grid;
  grid-template-columns: 1fr 60px 80px 60px;
  align-items: baseline;
  gap: 10px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.team-v2 .tv2-vl-row:last-child { border-bottom: none; }

.team-v2 .tv2-vl-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-v2 .tv2-vl-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  text-align: right;
}

.team-v2 .tv2-vl-avg {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}

.team-v2 .tv2-vl-delta {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

.team-v2 .tv2-vl-delta.tv2-num-good { color: var(--good); }
.team-v2 .tv2-vl-delta.tv2-num-bad { color: var(--red); }

.team-v2 .tv2-num-good { color: var(--good); font-weight: 700; }
.team-v2 .tv2-num-bad { color: var(--red); font-weight: 700; }

/* ── Responsive ── */

@media (max-width: 1100px) {
  .team-v2 .tv2-triptych-body {
    grid-template-columns: 300px 1fr;
  }
  .team-v2 .tv2-triptych-col3 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .team-v2 .tv2-triptych-body { grid-template-columns: 1fr; }
  .team-v2 .tv2-star-grid { grid-template-columns: 1fr; }
  .team-v2 .tv2-star-scatter-wrap { border-right: none; padding-right: 0; }
  .team-v2 .tv2-twopane { grid-template-columns: 1fr; gap: 24px; }
  .team-v2 .tv2-vl-row { grid-template-columns: 1fr 50px 70px 50px; }
}
