/* GameVision Presentation Safe-Zone & Viewport Optimization 3.0 — Run 54
   Keeps basketball/replays visible while preserving essential broadcast context. */
:root{--gv-safe-edge:10px;--gv-safe-top:44px;--gv-safe-bottom:54px}

/* ---------- VBA Tonight: give the program stage more real estate ---------- */
body.vba-tonight.vba-safe-zone-enabled #stage{grid-template-rows:54px minmax(0,1fr) 132px 26px 44px!important;min-height:580px}
body.vba-tonight.vba-safe-zone-enabled .show-main{grid-template-columns:minmax(0,1fr) clamp(228px,19vw,268px);gap:8px;padding:8px 10px 6px}
body.vba-tonight.vba-safe-zone-enabled .show-side{padding:9px;gap:6px}
body.vba-tonight.vba-safe-zone-enabled .replay-dock{margin:0 10px 5px;padding:7px 9px;border-radius:12px}
body.vba-tonight.vba-safe-zone-enabled .replay-rail{height:78px}
body.vba-tonight.vba-safe-zone-enabled .rail-thumb{height:40px}
body.vba-tonight.vba-safe-zone-enabled .show-program-stage{overflow:hidden!important;isolation:isolate}

/* During basketball, one graphics owner. Remove legacy layers that duplicated/covered the replay. */
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .show-program-stage>.topbar,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .clip-cap,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .clip-ov,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .tg-top,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .cinebar,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay #replayBadge,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay.vba-replay-theater-open .show-program-stage:before{display:none!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .show-program-stage:after{background:linear-gradient(180deg,rgba(2,7,12,.10),transparent 12%,transparent 86%,rgba(2,7,12,.10))!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.018)!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-network-bug{display:none!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-matchup-card{display:none!important}

/* Compact score bug: top-right, away from Top-10 rank and away from the center of play. */
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-bug{left:auto!important;right:10px!important;top:10px!important;transform:translateY(-8px)!important;min-width:276px!important;width:auto!important;grid-template-columns:minmax(68px,1fr) 66px minmax(68px,1fr)!important;filter:drop-shadow(0 8px 18px rgba(0,0,0,.34))}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-bug[data-visible="1"]{transform:none!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team,
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-center{min-height:38px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team{gap:5px!important;padding:0 8px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team b{font-size:9px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team strong{font-size:20px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-center span{font-size:10px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-center em{font-size:6px!important;margin-top:3px!important}

/* Lower third becomes a brief compact ID, not a permanent wall across the replay. */
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lower-third{left:10px!important;bottom:10px!important;width:min(430px,48%)!important;min-height:50px!important;grid-template-columns:4px 46px minmax(0,1fr)!important;border-radius:7px!important;box-shadow:0 12px 28px rgba(0,0,0,.34)!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-rank{font-size:23px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy{padding:7px 9px 6px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy small{font-size:6px!important;margin-bottom:4px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy b{font-size:14px!important;line-height:1!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy p{font-size:7px!important;margin-top:4px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-tag{display:none!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay.vba-safe-lt-cleared .vba-lower-third{opacity:0!important;visibility:hidden!important;transform:translateY(10px)!important}

/* Top-10 rank is intentionally tiny and isolated from the score bug. */
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-top10-rank{left:10px!important;top:10px!important;gap:2px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-top10-rank small{font-size:7px!important;margin-bottom:3px!important}
body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-top10-rank b{font-size:31px!important}

/* Stingers still identify segments, but no longer blanket the middle of the court. */
body.vba-tonight.vba-safe-zone-enabled .vba-broadcast-stinger{height:58px!important;gap:12px!important;padding-left:clamp(18px,4vw,48px)!important;background:linear-gradient(90deg,rgba(1,6,11,.95),rgba(7,24,38,.90) 56%,rgba(32,202,255,.38) 82%,transparent)!important}
body.vba-tonight.vba-safe-zone-enabled .vba-stinger-mark{font-size:29px!important}
body.vba-tonight.vba-safe-zone-enabled .vba-broadcast-stinger b{font-size:clamp(17px,2vw,26px)!important}
body.vba-tonight.vba-safe-zone-enabled .vba-broadcast-stinger small{font-size:6px!important;margin-bottom:4px!important}

/* Compact states earn even more space for the replay. */
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] #stage{grid-template-rows:50px minmax(0,1fr) 108px 0 42px!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] .show-main{grid-template-columns:1fr!important;padding:5px!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] .show-side{display:none!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] .replay-dock{margin:0 5px 4px!important;padding:6px!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] .replay-dock-head{height:22px!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] .replay-rail{height:68px!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] .rail-thumb{height:34px!important}
body.vba-tonight.vba-safe-zone-enabled[data-vba-safe-density="compact"] #ticker{display:none!important}

/* ---------- GameVision standalone + embedded court visibility ---------- */
body.gv-safe-zone-enabled .court-card{overflow:hidden!important;isolation:isolate}
body.gv-safe-zone-enabled .court-card>svg.court{display:block!important;max-width:100%!important;max-height:100%!important;margin:auto!important;transform-origin:50% 50%!important}

/* Only Camera Director 3.0 needs an on-court camera label. Retire the older duplicate chip. */
body.gv-safe-zone-enabled.gv-camera3-enabled .gv-cam2-chip{display:none!important}
body.gv-safe-zone-enabled .gv-camera3-tag{right:8px!important;bottom:8px!important;min-width:0!important;padding:5px 7px!important;opacity:.46!important}
body.gv-safe-zone-enabled .gv-camera3-tag small,body.gv-safe-zone-enabled .gv-camera3-tag span{display:none!important}
body.gv-safe-zone-enabled .gv-camera3-tag b{font-size:7px!important}

/* Compact the standalone lower third so the court remains the hero. */
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lower-third{left:10px!important;bottom:10px!important;width:min(470px,48%)!important;min-height:54px!important;grid-template-columns:4px 46px minmax(0,1fr)!important;border-radius:7px!important}
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lt-face{width:46px!important;height:54px!important}
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lt-copy{padding:7px 9px!important}
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lt-copy small{font-size:6px!important;margin-bottom:3px!important}
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lt-copy strong{font-size:15px!important}
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lt-copy span{font-size:8px!important;margin-top:3px!important}
body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lt-stat{display:none!important}

/* Replay owns the screen: silence nonessential HUDs while the replay is active. */
body.gv-safe-zone-enabled.gv-safe-replay-active .gv-atmosphere-hud,
body.gv-safe-zone-enabled.gv-safe-replay-active .gv-arena-ribbon,
body.gv-safe-zone-enabled.gv-safe-replay-active .gv-camera3-tag,
body.gv-safe-zone-enabled.gv-safe-replay-active .gv-cam2-chip{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

/* Embedded GameVision is a clean program feed. The parent VBA Tonight shell owns ALL broadcast chrome. */
body.gv-safe-zone-enabled.gv-embed .gv-atmosphere-hud,
body.gv-safe-zone-enabled.gv-embed .gv-arena-ribbon,
body.gv-safe-zone-enabled.gv-embed .gv-camera3-tag,
body.gv-safe-zone-enabled.gv-embed .gv-cam2-chip,
body.gv-safe-zone-enabled.gv-embed .gv-station-bug,
body.gv-safe-zone-enabled.gv-embed .gv-replay-tag,
body.gv-safe-zone-enabled.gv-embed .gvpi-lower-third,
body.gv-safe-zone-enabled.gv-embed .gvpi-stage-flag,
body.gv-safe-zone-enabled.gv-embed .gv-drama-card,
body.gv-safe-zone-enabled.gv-embed .camera-rack{display:none!important}
body.gv-safe-zone-enabled.gv-embed .court-card>svg.court{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
body.gv-safe-zone-enabled.gv-embed .view-plate{opacity:.72!important}

@media(max-width:1080px){
  body.vba-tonight.vba-safe-zone-enabled #stage{grid-template-rows:50px minmax(0,1fr) 112px 0 42px!important}
  body.vba-tonight.vba-safe-zone-enabled .show-main{grid-template-columns:1fr!important;padding:5px!important}
  body.vba-tonight.vba-safe-zone-enabled .show-side{display:none!important}
  body.vba-tonight.vba-safe-zone-enabled #ticker{display:none!important}
}
@media(max-width:760px){
  body.vba-tonight.vba-safe-zone-enabled #stage{grid-template-rows:48px minmax(0,1fr) 96px 0 42px!important;min-height:0!important}
  body.vba-tonight.vba-safe-zone-enabled .replay-dock{margin:0 4px 3px!important;padding:5px!important}
  body.vba-tonight.vba-safe-zone-enabled .replay-dock-head{height:20px!important}
  body.vba-tonight.vba-safe-zone-enabled .replay-dock-head span{display:none!important}
  body.vba-tonight.vba-safe-zone-enabled .replay-rail{height:60px!important}
  body.vba-tonight.vba-safe-zone-enabled .rail-thumb{height:30px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-bug{left:6px!important;right:6px!important;top:6px!important;width:calc(100% - 12px)!important;min-width:0!important;grid-template-columns:minmax(62px,1fr) 60px minmax(62px,1fr)!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team,body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-center{min-height:34px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team b{font-size:8px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-score-team strong{font-size:17px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-top10-rank{top:45px!important;left:7px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-top10-rank b{font-size:25px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lower-third{left:7px!important;bottom:7px!important;width:min(360px,74%)!important;min-height:44px!important;grid-template-columns:3px 38px minmax(0,1fr)!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-rank{font-size:19px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy{padding:6px 7px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy b{font-size:12px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lt-copy p{display:none!important}
  body.gvpi-enabled.gv-safe-zone-enabled:not(.gv-embed) .gvpi-lower-third{width:min(360px,72%)!important}
}
@media(max-height:680px) and (min-width:761px){
  body.vba-tonight.vba-safe-zone-enabled #stage{grid-template-rows:48px minmax(0,1fr) 96px 0 40px!important}
  body.vba-tonight.vba-safe-zone-enabled .replay-dock{padding:5px!important}
  body.vba-tonight.vba-safe-zone-enabled .replay-rail{height:58px!important}
  body.vba-tonight.vba-safe-zone-enabled .rail-thumb{height:29px!important}
  body.vba-tonight.vba-safe-zone-enabled.vba-safe-replay .vba-lower-third{min-height:44px!important;bottom:7px!important}
}
@media(prefers-reduced-motion:reduce){body.vba-safe-zone-enabled .vba-lower-third,body.vba-safe-zone-enabled .vba-score-bug,body.gv-safe-zone-enabled .gvpi-lower-third{transition:none!important}}
