/* Adsterra ad surfaces. Linked from the layout only on ad-enabled pages.
   Plain CSS (no Tailwind build step) so the user can ship without `css:build`.
   Visibility/responsive utilities (hidden, md:flex, …) come from the existing
   Tailwind bundle; this file only styles things utilities can't express. */

/* .ad-wrap layout (flex flex-col items-center gap-1 w-full) is applied via
   Tailwind utilities in the partials so responsive hide/show classes on the
   wrapper (e.g. "hidden md:flex") aren't overridden by a display rule here. */

.ad-label {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.5);
}

.ad-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* .ad-slot's display (flex / hidden / md:hidden) is set by Tailwind utilities in
   the partial; here we only constrain it so a banner can't overflow its column. */
.ad-slot {
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-frame {
  max-width: 100%;
}

/* Native banner band — let Adsterra's widget take the full content width. */
.ad-native,
.ad-native > div {
  width: 100%;
}

/* ── In-player overlay (load / pause / up-next) ──────────────────────────────
   A rectangle centered over the 9:16 frame. The frame is ~280px on phones, so
   the 300px unit is scaled down via --player-ad-scale (set by title.js from the
   real frame width). Hidden until title.js adds .is-on. */
.player-ad {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.player-ad.is-on {
  display: flex;
}
/* Shared by the load/pause overlay AND the up-next panel — scales the 300px
   unit to the narrow frame via --player-ad-scale (set on the frame by title.js). */
.ad-scale {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(var(--player-ad-scale, 1));
  transform-origin: center center;
}
/* Light label on the dark in-player / up-next overlays. */
.ad-scale .ad-label {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}
.player-ad-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.player-ad-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
