/* =========================================================
   Buzzrparty V3.21 SURGICAL UI
   Scope ONLY:
   1) mobile topbar alignment
   2) REPLAYS/LIVE second row under brand
   3) Explorer compact accordion, closed by default
   4) hide legacy COLLAPSE button
   5) flatten Global Leaderboard + tighten spacing
   ========================================================= */

:root{
  --bp321-line: rgba(255,255,255,.12);
  --bp321-muted: rgba(255,255,255,.56);
  --bp321-orange: #ff8c3a;
}

/* Requested: no visible COLLAPSE control. */
#bpV315PlayToggle{
  display:none !important;
}

/* Requested: Global Leaderboard less "boxed", keep native V3.15 behavior untouched. */
#bpDualReplays .bp-v315-leaderboard-wrap{
  margin:10px 0 0 !important;
}

#bpDualReplays .bp-v315-leaderboard-toggle{
  width:100% !important;
  min-height:44px !important;
  padding:0 !important;
  border:0 !important;
  border-top:1px solid var(--bp321-line) !important;
  border-bottom:1px solid var(--bp321-line) !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#fff !important;
}

#bpDualReplays .bp-v315-leaderboard-toggle:hover,
#bpDualReplays .bp-v315-leaderboard-toggle[aria-expanded="true"]{
  background:transparent !important;
  border-color:rgba(255,255,255,.20) !important;
}

#bpDualReplays .bp-v315-lb-icon{
  color:var(--bp321-orange) !important;
}

#bpDualReplays .bp-v315-leaderboard-panel{
  margin:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

/* Requested: remove the giant empty zone before PLAY NOW, without moving content. */
#bpDualReplays .home-feed-section{
  margin-top:22px !important;
}

/* ---------------- MOBILE HEADER ---------------- */
@media(max-width:720px){
  .topbar{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    height:56px !important;
    min-height:56px !important;
    padding:0 10px !important;
    gap:7px !important;
    overflow:visible !important;
  }

  .topbar .brand{
    position:static !important;
    inset:auto !important;
    transform:none !important;
    translate:none !important;
    align-self:center !important;
    margin:0 auto 0 0 !important;
    justify-self:auto !important;
  }

  .topbar .top-actions{
    position:static !important;
    inset:auto !important;
    transform:none !important;
    translate:none !important;
    align-self:center !important;
    justify-self:auto !important;
    margin:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:6px !important;
    height:40px !important;
  }

  .topbar .top-actions > *{
    position:static !important;
    inset:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    transform:none !important;
    translate:none !important;
    align-self:center !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
  }

  #magAccountChip{
    position:static !important;
    inset:auto !important;
    top:auto !important;
    transform:none !important;
    translate:none !important;
    align-self:center !important;
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    min-height:34px !important;
    margin:0 !important;
  }

  /* Requested: directly below BUZZRPARTY, left aligned. */
  .bp-dual-rail{
    position:absolute !important;
    top:59px !important;
    left:10px !important;
    right:auto !important;
    transform:none !important;
    translate:none !important;
    margin:0 !important;
    z-index:30000 !important;
  }

  #homeView.bp-dual-ready{
    padding-top:44px !important;
  }

  body.bp-v321-explorer-open .bp-dual-rail{
    display:none !important;
  }
}

/* ---------------- EXPLORER ---------------- */

#magV6Drawer.bp-v321-native-hidden,
#magV6DrawerBackdrop.bp-v321-native-hidden{
  visibility:hidden !important;
  pointer-events:none !important;
}

#bpV321Explorer{
  position:fixed;
  inset:56px 0 0 0;
  z-index:2147483000;
  overflow:auto;
  overscroll-behavior:contain;
  background:#000;
  color:#fff;
  padding:14px;
}

.bp-v321-explorer-shell{
  width:min(720px,100%);
  margin:0 auto;
}

.bp-v321-explorer-head{
  min-height:45px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid var(--bp321-line);
}

.bp-v321-explorer-title{
  color:var(--bp321-orange);
  font-size:12px;
  font-weight:1000;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.bp-v321-explorer-close{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  color:#fff;
  font-size:24px;
  cursor:pointer;
}

.bp-v321-group{
  border-bottom:1px solid var(--bp321-line);
}

.bp-v321-group-toggle{
  width:100% !important;
  min-height:54px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:#fff !important;
  cursor:pointer !important;
  text-align:left !important;
  font-size:13px !important;
  font-weight:900 !important;
}

.bp-v321-group-toggle span:last-child{
  color:var(--bp321-orange) !important;
  font-size:20px !important;
  font-weight:400 !important;
}

.bp-v321-group-panel[hidden]{
  display:none !important;
}

.bp-v321-group-panel{
  padding:0 0 8px !important;
}

.bp-v321-menu-link{
  width:100% !important;
  min-height:42px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:0 0 0 10px !important;
  border:0 !important;
  border-top:1px solid rgba(255,255,255,.055) !important;
  background:transparent !important;
  color:rgba(255,255,255,.72) !important;
  cursor:pointer !important;
  text-align:left !important;
  font-size:10px !important;
  font-weight:800 !important;
}

.bp-v321-menu-link::after{
  content:"→";
  color:var(--bp321-orange);
  font-size:14px;
}

@media(min-width:721px){
  #bpV321Explorer{
    inset:0;
    padding:30px;
  }
}

/* === BP V3.22 SURGICAL DELTA START === */

#bpDualReplays .home-feed-intro{
  min-height:0 !important;
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}

#bpDualReplays .home-feed-intro + .home-feed-section{
  margin-top:16px !important;
}

#bpDualLive .bp-v22-live-shell{
  row-gap:16px !important;
  gap:16px !important;
}

#bpDualLive #buzzriqSection{
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}

#bpDualLive #magMatchesSection{
  margin-top:0 !important;
  padding-top:0 !important;
}

body.bp-v321-explorer-open .bp-dual-rail{
  display:none !important;
}

/* === BP V3.22 SURGICAL DELTA END === */

/* === BP V3.23 DIAG-GROUNDED DELTA START === */
body:has(#magV6Drawer.open) .bp-dual-rail{
  display:none !important;
}

#bpDualReplays .home-feed-intro + .home-feed-section{
  margin-top:-22px !important;
}

#magV6Drawer .bp-v323-native-heading{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  cursor:pointer !important;
  user-select:none !important;
}

#magV6Drawer .bp-v323-native-heading::after{
  content:"+";
  color:#ff8c3a;
  font-size:18px;
  line-height:1;
  font-weight:500;
}

#magV6Drawer .bp-v323-native-heading[aria-expanded="true"]::after{
  content:"−";
}

#magV6Drawer .bp-v323-native-collapsed{
  display:none !important;
}

/* === BP V3.23 DIAG-GROUNDED DELTA END === */

/* === BP V3.24 EXACT NATIVE GROUP ACCORDION START === */
#magV6Drawer > .mag-v6-menu-group > .mag-v6-menu-kicker{
  min-height:46px !important;
  margin:0 !important;
  padding:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  cursor:pointer !important;
  user-select:none !important;
  border-bottom:1px solid rgba(255,255,255,.10) !important;
}

#magV6Drawer > .mag-v6-menu-group > .mag-v6-menu-kicker::after{
  content:"+";
  color:#ff8c3a;
  font-size:18px;
  line-height:1;
  font-weight:500;
}

#magV6Drawer > .mag-v6-menu-group > .mag-v6-menu-kicker[aria-expanded="true"]::after{
  content:"−";
}

#magV6Drawer > .mag-v6-menu-group.bp-v324-collapsed > :not(.mag-v6-menu-kicker){
  display:none !important;
}

#magV6Drawer > .mag-v6-menu-group.bp-v324-collapsed{
  margin:0 !important;
  padding:0 !important;
  min-height:46px !important;
  height:auto !important;
}

/* === BP V3.24 EXACT NATIVE GROUP ACCORDION END === */

/* === BP V3.26 DESKTOP LABEL + TIMEACTION PAUSE START === */
@media(min-width:721px){
  #bpDualReplays .home-feed-section.bp-v326-desktop-playnow-label{
    display:none !important;
  }
}
/* === BP V3.26 DESKTOP LABEL + TIMEACTION PAUSE END === */

/* === BP V3.31a EXACT TIKTOK CHRONO HIDE START === */
#homeIconicMomentsCard #homePreviewCount{
  display:none !important;
  visibility:hidden !important;
}
/* === BP V3.31a EXACT TIKTOK CHRONO HIDE END === */

/* === BP V3.31b REAL TIKTOK ACTION COUNT HIDE START === */
#homeIconicMomentsCard .bp-v31-action-count{
  display:none !important;
  visibility:hidden !important;
}
/* === BP V3.31b REAL TIKTOK ACTION COUNT HIDE END === */

/* === BP V3.31c HARD VISUAL TIKTOK COUNT HIDE START === */
#homeIconicMomentsCard .bp-v31-action-count{
  opacity:0 !important;
  pointer-events:none !important;
  color:transparent !important;
  border-color:transparent !important;
  background:transparent !important;
  box-shadow:none !important;
  clip-path:inset(100%) !important;
}
/* === BP V3.31c HARD VISUAL TIKTOK COUNT HIDE END === */

/* === BP V3.32 HOME DESKTOP UI START === */
@media(min-width:721px){

  /* Desktop: supprimer "À jouer maintenant" */
  #bpDualReplays .home-feed-section{
    display:none !important;
  }

  /* Desktop: buzzers centrés en bas du diaporama */
  #homeIconicMomentsCard .home-preview-buzz{
    left:50% !important;
    right:auto !important;
    bottom:24px !important;
    transform:translate(-50%,12px) !important;
  }

  #homeIconicMomentsCard.is-buzzing .home-preview-buzz{
    transform:translateX(-50%) !important;
  }
}
/* === BP V3.32 HOME DESKTOP UI END === */
