/* ======================================================================
   v5.16 — MATCH HUD simplification (B2)
   - Subbar auto-hides ~90s into match (body.sub-hide) unless hovered.
   - Enforces pitch-dominance rules from the design brief.
   - Quiets legacy teal/amber where they still leak.
   ====================================================================== */

/* --- Subbar auto-hide --- */
/* JS adds body.sub-hide ~90s into match; hovering the top 64px re-reveals. */
body.sub-hide .subbar {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
  overflow: hidden;
  transition: max-height 280ms ease-out, opacity 280ms ease-out, padding 280ms ease-out;
}
.subbar {
  transition: max-height 280ms ease-out, opacity 280ms ease-out, padding 280ms ease-out;
  max-height: 80px;
}
/* Peek-on-hover: if the cursor enters the scorebar, reveal the subbar again */
body.sub-hide .scorebar:hover + .subbar,
body.sub-hide .subbar:hover {
  max-height: 80px !important;
  opacity: 1 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  pointer-events: auto;
}

/* --- Pitch dominance (design brief: pitch canvas >= 62% vh desktop) --- */
@media (min-width: 901px) {
  .broadcast {
    /* force the pitch row (the "1fr") to claim more vertical space by
       capping the stats row height. stats cards scroll-overflow if they
       actually need more room. */
    grid-template-rows: auto auto 1fr auto auto !important;
  }
  .stats {
    max-height: 22vh;
    overflow-y: auto;
  }
  .pitch-wrap {
    min-height: 62vh;
  }
}

/* --- Kill legacy accent colors that leak into match chrome --- */
.subbar .wc27-mark { color: var(--vfl-brand, #1edb8a) !important; }
.subbar .weather,
.subbar .referee,
.subbar .stadium {
  color: var(--vfl-ink-1, #9fb6cd) !important;
}
.subbar .live-pill {
  background: rgba(255, 61, 87, 0.1) !important;
  border: 1px solid rgba(255, 61, 87, 0.32) !important;
  color: var(--vfl-ink-0, #f4f8ff) !important;
}
.subbar .live-pill .live-dot {
  background: var(--vfl-alert, #ff3d57) !important;
}
