/**
 * Integrated banner ad styling — slots stay hidden until an ad loads.
 */

.ad-break.is-pending {
  display: block;
  min-height: 90px;
  opacity: 0.35;
}

.ad-banner--pending {
  min-height: 50px;
}

.ad-break {
  display: none;
  margin: 1.25rem auto;
  max-width: 728px;
  text-align: center;
  padding: 0 0.5rem;
  scroll-margin-top: 5rem;
}

.ad-break.is-visible {
  display: block;
}

.ad-break.is-visible::before {
  content: 'Sponsored';
  display: block;
  font-size: 0.65rem;
  color: #6b7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.ad-break--listing {
  grid-column: 1 / -1;
  margin: 0.5rem auto 1rem;
  max-width: 728px;
}

.ad-break--sidebar {
  max-width: 300px;
  margin: 0 auto 1rem;
  padding: 0;
}

.ad-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0.375rem;
  background: transparent;
  line-height: 0;
}

.ad-banner--leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 0;
}

.ad-banner--mobile {
  width: 100%;
  max-width: 320px;
  min-height: 0;
}

.ad-banner--rectangle {
  width: 300px;
  max-width: 100%;
  min-height: 0;
}

.ad-banner iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  border: 0;
}

/* Desktop sidebar layout */
.page-layout {
  display: block;
}

.page-layout__main {
  min-width: 0;
}

.page-layout__sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .page-layout--with-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .page-layout__sidebar {
    display: none;
  }

  .page-layout--with-sidebar .page-layout__sidebar {
    display: block;
  }

  .ad-sidebar-sticky {
    position: sticky;
    top: 1rem;
  }
}

/* Match player + sidebar */
.player-layout {
  display: block;
}

.player-layout__main {
  min-width: 0;
}

.player-layout__sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
  }

  .player-layout--with-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .player-layout__sidebar {
    display: none;
  }

  .player-layout--with-sidebar .player-layout__sidebar {
    display: block;
  }

  .player-layout__sidebar .ad-sidebar-sticky {
    position: sticky;
    top: 1rem;
  }
}

/* Mobile content-break ads between sections */
@media (max-width: 1023px) {
  .ad-break--mobile-only {
    display: none;
  }

  .ad-break--mobile-only.is-visible {
    display: block;
  }
}

@media (min-width: 1024px) {
  .ad-break--mobile-only.is-visible {
    display: none;
  }
}

/* Adblock-version pages: subtle separators, no dashed placeholders */
.ad-block-version .ad-break.is-visible {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ad-block-version .ad-inline,
.ad-block-version .ad-sidebar {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* Prevent ad iframes from overlapping critical controls */
#player-container,
#player-tabs-container,
#play-btn,
#play-pause-btn,
#refresh-stream-btn,
header,
#mobile-menu,
.match-hub-nav {
  position: relative;
  z-index: 2;
}

.monetag-inpage-anchor {
  min-height: 0;
}

.monetag-inpage-anchor:has(iframe),
.monetag-inpage-anchor:has(img[src*="http"]) {
  min-height: 50px;
}

.ad-banner a,
.ad-banner iframe {
  pointer-events: auto;
}


/* Legacy empty slot cleanup */
.ad-slot:empty {
  display: none;
  min-height: 0 !important;
}
