/* ============================================================================
   Previously — Adsterra slot framework styles (shared stylesheet).
   Luxury rule: sponsored cards are visually identical to content cards —
   dark-cinematic panel, hairline border, generous radius — with a small
   uppercase "SPONSORED" label. Cheap-looking = red.

   When ad-config.js has no codes, js/ads-slots.js builds NOTHING, so none
   of this renders. Slots that fail to fill collapse via JS watchdog.
   External file — no inline styles.
   ========================================================================== */

/* ---------- base slot: a content card ---------- */
.pv-adslot {
  background: #101014;
  border: 1px solid rgba(244, 239, 230, 0.14);
  border-radius: 14px;
  overflow: hidden;
  color: #f4efe6;
  position: relative;
}

/* The disclosure label — always visible, never hidden by ad content */
.pv-adslot-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #c9a96a;
  padding: 10px 14px 0;
}

.pv-adslot-body {
  padding: 8px 10px 10px;
  min-height: 0;
}

.pv-adslot-body iframe,
.pv-adslot-body img {
  display: block;
  max-width: 100%;
  border: 0;
  border-radius: 8px;
}

/* ---------- in-rail (homepage .lg-rail, hub .clips-rail) ---------- */
.lg-rail > .pv-adslot--rail,
.clips-rail > .pv-adslot--rail {
  flex: 0 0 auto;
  width: 300px;
  max-width: 300px;
  scroll-snap-align: start;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.lg-rail > .pv-adslot--rail .pv-adslot-body,
.clips-rail > .pv-adslot--rail .pv-adslot-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* hub sidebar rail */
aside.hub-rail > .pv-adslot--rail {
  width: 100%;
  margin-top: 18px;
}

/* ---------- in-flow native ---------- */
.pv-adslot--inflow {
  width: 100%;
  margin: 18px 0;
}

/* ---------- in-article (after 2nd paragraph) ---------- */
article.ed-prose > .pv-adslot--inarticle {
  margin: 26px auto;
  max-width: 100%;
}

article.ed-prose > .pv-adslot--inarticle .pv-adslot-body {
  display: flex;
  justify-content: center;
}

/* ---------- end-of-article partner card ---------- */
.pv-adslot--endarticle {
  margin: 30px auto 10px;
  max-width: 720px;
}

/* ---------- sticky video unit: bottom-right, collapsible ---------- */
.pv-adslot--sticky {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 300px;
  max-width: calc(100vw - 32px);
  max-height: 30vh;
  z-index: 80;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.pv-adslot-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 230, 0.25);
  background: rgba(10, 10, 14, 0.85);
  color: #f4efe6;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.pv-adslot-close:hover,
.pv-adslot-close:focus-visible {
  background: #e03131;
  border-color: #e03131;
  color: #fff;
}

/* ---------- leaderboard (728x90, desktop only) ---------- */
.pv-adslot--leaderboard {
  margin: 22px auto;
  max-width: 728px;
  width: 100%;
}
.pv-adslot--leaderboard .pv-adslot-body {
  display: flex;
  justify-content: center;
  padding: 10px;
}
.pv-adslot--leaderboard .pv-adslot-body iframe {
  width: 728px;
  height: 90px;
  max-width: 100%;
}

/* ---------- mobile banner (320x50, mobile only) ---------- */
.pv-adslot--mobilebanner {
  margin: 16px auto;
  max-width: 340px;
  width: 100%;
}
.pv-adslot--mobilebanner .pv-adslot-body {
  display: flex;
  justify-content: center;
  padding: 8px;
}
.pv-adslot--mobilebanner .pv-adslot-body iframe {
  width: 320px;
  height: 50px;
  max-width: 100%;
}

/* ---------- viewport gating (second layer; JS matchMedia gates loading) ---------- */
@media (max-width: 767px) {
  .pv-adslot--leaderboard {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .pv-adslot--mobilebanner {
    display: none !important;
  }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .lg-rail > .pv-adslot--rail,
  .clips-rail > .pv-adslot--rail {
    width: 260px;
    max-width: 260px;
  }

  .pv-adslot--sticky {
    width: 260px;
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }

  article.ed-prose > .pv-adslot--inarticle,
  .pv-adslot--endarticle {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pv-adslot,
  .pv-adslot * {
    animation: none !important;
    transition: none !important;
  }
}
