/* VBA GameVision Desktop Broadcast Composition 4.0 — Run 76
   Screenshot-led desktop hierarchy pass: one masthead, one scoreboard, then basketball.
   Presentation only. Mobile/TV/theater contracts remain owned by Runs 64-75. */
:root{
  --gv76-shell-max:1520px;
  --gv76-content-max:1440px;
  --gv76-x:clamp(16px,2vw,30px);
  --gv76-gap:8px;
}

@media (min-width:1100px){
  body.gv-desktop-composition-40.gv76-desktop:not(.theater):not(.vba-channel-embed){
    --gv75-shell-max:var(--gv76-shell-max);
    --gv75-player-max:var(--gv76-content-max);
  }

  body.gv-desktop-composition-40.gv76-desktop:not(.theater):not(.vba-channel-embed)>.wrap{
    width:min(100%,var(--gv76-shell-max))!important;
    max-width:var(--gv76-shell-max)!important;
    padding:12px var(--gv76-x) 72px!important;
  }

  /* The legacy replay title became a second network masthead. Retire it on desktop. */
  body.gv-desktop-composition-40.gv76-desktop:not(.theater):not(.vba-channel-embed)>.wrap>.title{
    display:none!important;
  }

  /* One compact network/replay masthead. Run 76 moves the real replay actions here. */
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar{
    width:min(100%,var(--gv76-content-max));
    min-height:48px!important;
    height:auto!important;
    margin:0 auto 7px!important;
    padding:7px 10px 7px 13px!important;
    display:grid!important;
    grid-template-columns:auto minmax(180px,1fr) auto minmax(0,auto)!important;
    gap:12px!important;
    align-items:center!important;
    border-radius:14px!important;
    border:1px solid rgba(95,220,255,.16)!important;
    background:linear-gradient(180deg,rgba(7,16,27,.98),rgba(3,9,16,.98))!important;
    box-shadow:0 12px 30px rgba(0,0,0,.24)!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-brand{min-width:max-content}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-brand b{font-size:23px!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-brand span{font-size:10px!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-brand i{font-size:7px!important;opacity:.58}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-network-context{
    min-width:0!important;
    display:flex!important;
    align-items:baseline!important;
    gap:9px!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-network-context span{font-size:7px!important;letter-spacing:.16em!important;white-space:nowrap}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-network-context strong{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-onair{min-width:max-content!important;padding:5px 8px!important}

  /* Programming navigation stays functional, but no longer consumes a second full-width row. */
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    min-width:0!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions::-webkit-scrollbar{display:none}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions>a,
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions>button,
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions .gvp-countdown-nav>a{
    min-height:32px!important;
    height:32px!important;
    padding:0 10px!important;
    border-radius:8px!important;
    font-size:9px!important;
    background:rgba(12,25,39,.76)!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvProgrammingBar.gvp-replay-bar{
    display:none!important;
  }
  /* Top-10 context can still surface its special metadata as a thin row. */
  body.gv-desktop-composition-40.gv76-desktop.gvp-top10-context #gvProgrammingBar.gvp-replay-bar{
    display:flex!important;
    width:min(100%,var(--gv76-content-max))!important;
    min-height:32px!important;
    margin:0 auto 6px!important;
    padding:5px 10px!important;
    border-radius:10px!important;
    box-shadow:none!important;
  }
  body.gv-desktop-composition-40.gv76-desktop.gvp-top10-context #gvProgrammingBar .gvp-brand{display:flex!important}
  body.gv-desktop-composition-40.gv76-desktop.gvp-top10-context #gvProgrammingBar .gvp-brand small,
  body.gv-desktop-composition-40.gv76-desktop.gvp-top10-context #gvProgrammingBar .gvp-brand span{display:none!important}
  body.gv-desktop-composition-40.gv76-desktop.gvp-top10-context #gvProgrammingBar #gvpReplayActions{display:none!important}

  /* View modes become a small utility strip, not a headline. */
  body.gv-desktop-composition-40.gv76-desktop #gvBroadcastModeSelector{
    width:min(100%,var(--gv76-content-max))!important;
    min-height:30px!important;
    margin:0 auto 6px!important;
    padding:0 2px!important;
    gap:3px!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvBroadcastModeSelector button{
    min-height:28px!important;
    height:28px!important;
    padding:0 11px!important;
    border-radius:999px!important;
    font-size:8px!important;
    letter-spacing:.11em!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvModeNotice{width:min(100%,var(--gv76-content-max));margin:0 auto!important}

  /* Scoreboard, win-probability and player all share one visual width. */
  body.gv-desktop-composition-40.gv76-desktop .board{
    width:min(100%,var(--gv76-content-max))!important;
    min-height:80px!important;
    margin:0 auto!important;
    padding:8px 18px!important;
    border-radius:15px!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .board .logo{width:46px!important;height:46px!important}
  body.gv-desktop-composition-40.gv76-desktop .board .team{gap:11px!important}
  body.gv-desktop-composition-40.gv76-desktop .board .team .city{font-size:9px!important;letter-spacing:.18em!important}
  body.gv-desktop-composition-40.gv76-desktop .board .team .name{font-size:22px!important}
  body.gv-desktop-composition-40.gv76-desktop .board .score{font-size:54px!important;line-height:.9!important}
  body.gv-desktop-composition-40.gv76-desktop .board .center{min-width:128px!important}
  body.gv-desktop-composition-40.gv76-desktop .board .clock{font-size:31px!important}
  body.gv-desktop-composition-40.gv76-desktop .board .qtr{font-size:9px!important}

  /* Keep win probability, but reduce it to one understated broadcast datum. */
  body.gv-desktop-composition-40.gv76-desktop .wp{
    width:calc(min(100%,var(--gv76-content-max)) - 24px)!important;
    height:4px!important;
    margin:5px auto 0!important;
    border-radius:999px!important;
    overflow:hidden!important;
    opacity:.84;
  }
  body.gv-desktop-composition-40.gv76-desktop .wp-l{
    width:calc(min(100%,var(--gv76-content-max)) - 24px)!important;
    min-height:16px!important;
    margin:2px auto 4px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:#708499!important;
    font-size:7px!important;
    letter-spacing:.12em!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .wp-l>span:first-child,
  body.gv-desktop-composition-40.gv76-desktop .wp-l>span:last-child{display:none!important}
  body.gv-desktop-composition-40.gv76-desktop .wp-l #wpTxt:before{content:'WIN PROB  ';color:#52697c}

  /* The old Game Flow rail duplicated score/timeline information and visibly crossed the replay nav. */
  body.gv-desktop-composition-40.gv76-desktop:not(.theater) #gv20RunRail{display:none!important}

  body.gv-desktop-composition-40.gv76-desktop .stage{
    width:min(100%,var(--gv76-content-max))!important;
    margin:6px auto 0!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .court-card{
    width:100%!important;
    max-width:var(--gv76-content-max)!important;
    margin:0 auto!important;
    padding:0 10px 78px!important;
    border-radius:16px!important;
    border:1px solid rgba(105,160,205,.16)!important;
    background:linear-gradient(180deg,#07111a 0,#03070d 15%,#02060b 100%)!important;
    box-shadow:0 24px 62px rgba(0,0,0,.34)!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd{
    min-height:38px!important;
    margin:0!important;
    padding:5px 5px 4px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    border-bottom:1px solid rgba(121,176,220,.10)!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd>.tag:first-of-type{display:none!important}
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd #possTag{
    margin-left:auto!important;
    max-width:210px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#f3c850!important;
    font-size:8px!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd .gv-viewer-kicker{
    min-width:max-content!important;
    font-size:10px!important;
  }

  /* Camera choices join the player header instead of forming another full-width row. */
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd>#cameraRack{
    position:static!important;
    left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    transform:none!important;
    margin:0 0 0 4px!important;
    padding:2px!important;
    gap:1px!important;
    max-width:min(56vw,650px)!important;
    min-width:0!important;
    flex:0 1 auto!important;
    overflow-x:auto!important;
    border-radius:8px!important;
    border:0!important;
    background:rgba(12,22,34,.62)!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd>#cameraRack button{
    min-height:26px!important;
    height:26px!important;
    padding:0 7px!important;
    border-radius:6px!important;
    font-size:7px!important;
    letter-spacing:.06em!important;
  }

  body.gv-desktop-composition-40.gv76-desktop .court-card>svg.court{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    margin:0 auto!important;
    border-radius:10px!important;
  }
  /* Let the court itself carry the picture; the arena plate becomes atmosphere, not a giant empty panel. */
  body.gv-desktop-composition-40.gv76-desktop .court-card>.arena-plate{
    inset:38px 10px 78px!important;
    width:calc(100% - 20px)!important;
    height:calc(100% - 116px)!important;
    opacity:.20!important;
    filter:brightness(.36) saturate(.82) contrast(1.04)!important;
  }

  /* Secondary timeline belongs after the player and matches its width; it no longer reads like a new page. */
  body.gv-desktop-composition-40.gv76-desktop #gvpiTimeline{
    width:min(100%,var(--gv76-content-max))!important;
    margin:10px auto 0!important;
    padding:9px 12px 8px!important;
    border-radius:11px!important;
    box-shadow:none!important;
  }
  body.gv-desktop-composition-40.gv76-desktop #gvpiTimeline .gvpi-timeline-head{margin-bottom:7px!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiTimeline .gvpi-timeline-head strong{font-size:11px!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiTimeline .gvpi-timeline-score{font-size:16px!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiTimeline .gvpi-now{margin-top:7px!important}

  /* Game Center still opens, but never forces the core player wider than this composition. */
  body.gv-desktop-composition-40.gv76-desktop.gv-info-open .stage,
  body.gv-desktop-composition-40.gv76-desktop.gv-info-open .board{max-width:var(--gv76-content-max)!important}
}

/* Keep the screenshot-led merge strictly desktop. Existing mobile/tablet/TV behavior stays intact. */
@media (max-width:1099px){
  body.gv-desktop-composition-40{--gv76-content-max:100%}
}

@media (min-width:1100px) and (max-width:1280px){
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar{grid-template-columns:auto minmax(130px,1fr) auto!important;gap:8px!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar .gvpi-onair{display:none!important}
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions>a,
  body.gv-desktop-composition-40.gv76-desktop #gvpiNetworkBar>#gvpReplayActions>button{padding-inline:8px!important;font-size:8px!important}
  body.gv-desktop-composition-40.gv76-desktop .court-card>.hd>#cameraRack button{padding-inline:5px!important}
}

@media(prefers-reduced-motion:reduce){
  body.gv-desktop-composition-40 *{scroll-behavior:auto!important}
}
