/* --------------------------------------------------------------------------
   Ad units
   Everything here is created only after the 18+ confirmation. Nothing is
   loaded on the age gate screen.
   -------------------------------------------------------------------------- */

.promo-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 28px;
}

/* First banner on the page. Some creatives ship as a self-positioning unit
   (video or rich media) with `position: fixed`, which would tear them out of
   the slot and pin them over the top of the page: a layer the visitor cannot
   close, covering the menu and the banner. The transform makes this bar the
   containing block for those elements, and `overflow: hidden` keeps them
   inside the banner box, so they scroll away with it. */

.promo-bar--top {
  padding-top: 16px;
  padding-bottom: 4px;
  overflow: hidden;
  transform: translateZ(0);
}

.promo-bar[hidden] {
  display: none;
}

.promo-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #7d7887;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.promo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  /* Containment for creatives that position themselves: they stay inside the
     slot instead of floating over the page. */
  transform: translateZ(0);
}

.promo-slot ins,
.promo-slot iframe,
.promo-slot img {
  display: block;
  max-width: 100%;
  border: 0;
}

/* Banner below the video, inside the player modal. */

.promo-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.promo-inline[hidden] {
  display: none;
}

/* In-content ad shell. Every feed, end-of-page and widget unit shares the same
   frame, so the page reads as one system instead of boxes dropped at random. */

.promo-block {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 30px 0;
}

.promo-block[hidden] {
  display: none;
}

.promo-block--infeed {
  grid-column: 1 / -1;
}

.promo-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 12px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.055), transparent 68%),
    rgba(255, 255, 255, 0.02);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

/* On phones the frame fills the column so every unit lines up edge to edge. */
@media (max-width: 767px) {
  .promo-frame {
    max-width: 100%;
  }
}

.promo-block--widget .promo-frame {
  max-width: 1000px;
}

.promo-frame .promo-label {
  padding-top: 2px;
}

/* Desktop skyscraper, only where there is real lateral space. */

.promo-rail {
  position: fixed;
  z-index: 20;
  top: 96px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 160px;
}

.promo-rail[hidden] {
  display: none;
}

/* Sticky bar, pinned by the network to the bottom of the viewport. The wrapper
   owns the stacking context, so the bar always stays below the player modal. */

.promo-sticky {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 0 0;
  background: rgba(9, 9, 13, 0.94);
  border-top: 1px solid var(--line);
}

.promo-sticky .promo-label {
  font-size: 0.5rem;
  letter-spacing: 0.14em;
}

.promo-sticky ins {
  display: block;
  max-width: 100%;
  border: 0;
  /* Some sticky creatives ship with their own fixed positioning, which would
     float them over the header banner. Inside this bar they flow normally. */
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
}

/* Same containment for anything the creative injects next to its <ins>. */
.promo-sticky {
  overflow: hidden;
  transform: translateZ(0);
}

/* In-feed units get the same treatment: a self-positioning creative stays in
   its block instead of floating over the catalogue. No clipping here, so an
   expanding creative is not cut in half. */
.promo-block {
  transform: translateZ(0);
}

/* --------------------------------------------------------------------------
   Full-page interstitial (6061054 desktop / 6061066 mobile)

   Sits above the header banner and the sticky bar, below the player modal
   (z-index 150), so opening a video always wins over an interstitial that is
   still on screen.

   The wrapper is a viewport-sized box with no hit area. The slot inside only
   takes clicks while a creative is actually on screen (`.is-live`), so an
   unfilled or already-closed interstitial can never sit on top of the page. */

.promo-overlay {
  position: fixed;
  z-index: 140;
  inset: 0;
  box-sizing: border-box;
  /* Grid centring is the safety net: if a creative lands in normal flow instead
     of positioning itself, it is centred instead of sticking to the top-left
     corner. */
  display: grid;
  place-items: center;
  overflow: hidden;
  overscroll-behavior: contain;
  pointer-events: none;
  /* This is the important line. A transform makes this box the containing block
     for `position: fixed` descendants, so the network's full-screen overlay is
     confined to this area instead of taking over the whole viewport. */
  transform: translateZ(0);
}

/* Phones: same full-screen, centred overlay. The old bottom sheet kept the
   creative out of the middle of the screen, which is not what a fullpage
   interstitial is for. */

.promo-overlay.is-mounted {
  display: grid;
}

/* Everything the network drops next to the slot shares the same grid cell, so
   a stray sibling is centred too instead of being pushed into a second row. */
.promo-overlay > * {
  grid-area: 1 / 1;
}

.promo-overlay[hidden] {
  display: none;
}

.promo-overlay ins {
  display: grid;
  place-items: center;
  /* "safe" keeps the top edge reachable when the creative is taller than the
     screen; browsers that do not know it keep the previous value. */
  place-items: safe center;
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  pointer-events: none;
}

.promo-overlay.is-live ins {
  pointer-events: auto;
}

/* Our own close button. The network places its X above the creative, so on a
   full-height creative it lands off screen and the visitor is trapped. This
   one is a direct child of <body> at the maximum z-index, which makes it win
   over any overlay the network appends. */

.promo-overlay__close {
  position: fixed;
  z-index: 2147483647;
  top: calc(10px + env(safe-area-inset-top));
  right: calc(10px + env(safe-area-inset-right));
  display: none;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(9, 9, 13, 0.94);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}

.promo-overlay__close.is-live {
  display: inline-flex;
}

/* On phones the button keeps the top-right corner but gets a bigger tap target. */

@media (max-width: 767px) {
  .promo-overlay__close {
    right: 12px;
    min-height: 44px;
  }
}

.promo-overlay__close:hover {
  border-color: rgba(255, 255, 255, 0.48);
}

.promo-overlay__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The overlay covers the viewport on every size now, so the page behind it must
   not move. Without this the fixed creative appears to jump while scrolling. */

html.has-interstitial-ad {
  overflow: hidden;
}

/* Keep the footer reachable while the sticky bar is on screen. */

html.has-sticky-ad body {
  padding-bottom: 74px;
}

@media (max-width: 899px) {
  .promo-bar--top {
    padding: 14px 18px 2px;
  }

  .promo-block {
    padding: 18px 0;
  }
}

/* --------------------------------------------------------------------------
   In-stream VAST pre-roll, played in the modal before the embedded video.
   -------------------------------------------------------------------------- */

.vast {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: #000;
}

.vast__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.vast__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
}

.vast__bar {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  pointer-events: none;
}

.vast__bar--top {
  top: 0;
  padding-right: 62px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent);
}

.vast__bar--bottom {
  bottom: 0;
  padding-bottom: 20px;
}

.vast__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vast__bar > *,
.vast__left > * {
  pointer-events: auto;
}

.vast__badge {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(245, 242, 237, 0.86);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.vast__timer {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(245, 242, 237, 0.7);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.vast__skip,
.vast__unmute,
.vast__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(9, 9, 13, 0.72);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.vast__skip:disabled {
  color: rgba(245, 242, 237, 0.6);
  cursor: default;
}

.vast__skip:not(:disabled):hover,
.vast__unmute:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

.vast__cta {
  border-color: rgba(255, 59, 92, 0.5);
  background: rgba(20, 6, 10, 0.82);
  color: var(--accent-soft);
}

.vast__cta:hover {
  border-color: rgba(255, 59, 92, 0.72);
  background: rgba(255, 59, 92, 0.28);
}

.vast__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.vast__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s linear;
}

.vast[hidden],
.vast__loading[hidden],
.vast__skip[hidden],
.vast__unmute[hidden],
.vast__cta[hidden] {
  display: none;
}

@media (max-width: 559px) {
  .vast__bar {
    padding: 10px 12px;
  }

  .vast__bar--bottom {
    padding-bottom: 14px;
  }

  .vast__skip,
  .vast__unmute,
  .vast__cta {
    padding: 7px 12px;
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vast__progress span,
  .vast__skip,
  .vast__unmute,
  .vast__cta {
    transition: none;
  }
}
