/* Buzzrparty Dual V3.5
   Exact-DOM repair based on the LIVE diagnostic.
   V3.4 is removed by the patcher; V3.3 remains untouched.
*/

/* =========================================================
   MODE SWITCH
   Desktop: same visual level as the top header.
   Mobile: clean second row, centered below BUZZRPARTY.
   ========================================================= */

.bp-dual-rail{
  position:fixed !important;
  top:18px !important;
  left:18px !important;
  bottom:auto !important;
  right:auto !important;
  transform:none !important;
  z-index:13450 !important;

  width:auto !important;
  padding:3px !important;
  display:grid !important;
  grid-template-columns:repeat(2,74px) !important;
  gap:3px !important;

  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:12px !important;
  background:rgba(5,5,5,.88) !important;
  backdrop-filter:blur(14px);
  box-shadow:0 12px 30px rgba(0,0,0,.32) !important;
}

.bp-dual-rail button{
  width:auto !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 10px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;

  border-radius:9px !important;
  box-shadow:none !important;
  font-size:7px !important;
  letter-spacing:.055em !important;
  white-space:nowrap !important;
}

.bp-dual-rail .bp-dual-icon{
  display:none !important;
}
.bp-dual-rail .bp-dual-dot{
  width:5px !important;
  height:5px !important;
  flex:0 0 5px !important;
}
.bp-dual-rail .bp-dual-label{
  display:inline !important;
}

/* =========================================================
   PROFILE / PLAYER CIRCLE
   Exact element from diagnostic: #magAccountChip
   ========================================================= */

#magAccountChip{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  min-height:42px !important;
  padding:0 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  border:1px solid #ff941f !important;
  border-radius:50% !important;
  background:#080808 !important;

  color:#fff !important;
  font-size:15px !important;
  font-weight:900 !important;
  line-height:1 !important;
  text-indent:0 !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

#magAccountChip .mag-account-copy{
  display:none !important;
}

/* =========================================================
   BUZZRIQ — collapsed by default
   Exact section from diagnostic: #buzzriqSection
   ========================================================= */

#buzzriqSection.bp-v35-explainer{
  position:relative !important;
  margin-bottom:22px !important;
}

#buzzriqSection .bp-v35-explainer-toggle{
  width:100%;
  min-height:50px;
  padding:0 14px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  border:1px solid rgba(255,140,58,.28);
  border-radius:12px;
  background:
    linear-gradient(90deg,rgba(255,140,58,.08),transparent 58%),
    #070707;

  color:#fff;
  cursor:pointer;
  text-align:left;

  font:900 9px/1.25 "DM Sans",sans-serif;
  letter-spacing:.055em;
  text-transform:uppercase;
}

#buzzriqSection .bp-v35-explainer-toggle strong{
  color:#ff8c3a;
}

#buzzriqSection .bp-v35-explainer-toggle .bp-v35-action{
  color:rgba(255,255,255,.58);
  white-space:nowrap;
}

#buzzriqSection.bp-v35-collapsed > :not(.bp-v35-explainer-toggle){
  display:none !important;
}

#buzzriqSection:not(.bp-v35-collapsed) .bp-v35-explainer-toggle{
  margin-bottom:18px;
}

/* =========================================================
   MATCH CENTER
   Exact root from diagnostic: #bpMatchTimelineV1
   ========================================================= */

#bpMatchTimelineV1{
  position:relative !important;
  z-index:2 !important;
  scroll-margin-top:14px !important;
}

#bpMatchTimelineV1 button,
#bpMatchTimelineV1 a,
#bpMatchTimelineV1 select,
#bpMatchTimelineV1 input{
  pointer-events:auto !important;
  touch-action:manipulation;
}

/* Exact timeline from diagnostic: .bp-mc-timeline */
#bpMatchTimelineV1 .bp-mc-timeline{
  position:relative !important;
  z-index:5 !important;

  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
  justify-content:flex-start !important;

  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;

  gap:7px !important;
  padding:0 2px !important;

  overflow-x:auto !important;
  overflow-y:hidden !important;
  scroll-behavior:smooth !important;
  scroll-snap-type:x proximity;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x !important;

  scrollbar-width:none;
}

#bpMatchTimelineV1 .bp-mc-timeline::-webkit-scrollbar{
  display:none;
}

/* V3.4 let the day cells collapse to ~25px on mobile.
   Give them a real tap target again. */
#bpMatchTimelineV1 .bp-mc-date{
  flex:0 0 58px !important;
  width:58px !important;
  min-width:58px !important;
  max-width:58px !important;
  min-height:74px !important;
  scroll-snap-align:center;
  box-sizing:border-box !important;
  pointer-events:auto !important;
}

#bpMatchTimelineV1 .bp-v35-calendar-arrow{
  position:relative !important;
  z-index:8 !important;
  pointer-events:auto !important;
  touch-action:manipulation !important;
}

/* =========================================================
   EMPTY MATCH CONTEXT -> useful YouTube fallback
   Exact DOM from diagnostic:
   .bp-v14-summary.is-empty
   ========================================================= */

#bpMatchTimelineV1 .bp-v14-summary.is-empty{
  opacity:1 !important;
}

#bpMatchTimelineV1 a.bp-v35-summary-fallback{
  width:100%;
  min-height:42px;
  padding:8px 10px;

  display:flex;
  align-items:center;
  gap:7px;

  border:1px solid rgba(255,140,58,.25);
  border-radius:8px;
  background:rgba(255,140,58,.05);

  color:#fff;
  text-decoration:none;
  font-size:8px;
  font-weight:900;
  line-height:1.2;
}

#bpMatchTimelineV1 a.bp-v35-summary-fallback:hover{
  border-color:rgba(255,140,58,.56);
  background:rgba(255,140,58,.10);
}

#bpMatchTimelineV1 a.bp-v35-summary-fallback b{
  color:#ff8c3a;
}

/* =========================================================
   MOBILE HEADER
   ========================================================= */

@media (max-width:720px){
  .topbar{
    position:relative !important;
    min-height:64px !important;
  }

  .topbar .brand{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    transform:translate(-50%,-50%) !important;
    margin:0 !important;
    z-index:8 !important;
    white-space:nowrap !important;
  }

  .topbar .brand-title{
    display:block !important;
    white-space:nowrap !important;
  }

  /* Give the clean mobile switch its own row instead of crushing the logo. */
  #homeView.bp-dual-ready{
    padding-top:50px !important;
  }

  .bp-dual-rail{
    position:absolute !important;
    top:76px !important;
    left:50% !important;
    transform:translateX(-50%) !important;

    width:184px !important;
    grid-template-columns:1fr 1fr !important;
    margin:0 !important;
  }

  .bp-dual-rail button{
    height:34px !important;
    min-height:34px !important;
    padding:0 8px !important;
    font-size:7px !important;
  }

  #magAccountChip{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    min-height:38px !important;
    font-size:14px !important;
  }

  #buzzriqSection .bp-v35-explainer-toggle{
    min-height:46px;
    padding:0 11px;
    font-size:7.5px;
  }

  #bpMatchTimelineV1 .bp-mc-date{
    flex-basis:54px !important;
    width:54px !important;
    min-width:54px !important;
    max-width:54px !important;
  }
}

@media (max-width:390px){
  .bp-dual-rail{
    width:172px !important;
  }

  .bp-dual-rail button{
    font-size:6.5px !important;
  }

  #buzzriqSection .bp-v35-explainer-toggle{
    font-size:7px;
  }
}
