/* ─────────────────────────────────────────────────────────────────────
   Shared ad system for every non-SPA page (watch pages, type/tag hubs,
   fight-of-the-week, static pages): side rails that scroll with the page
   and keep repopulating (driven by /js/ads.js), plus the pinned bottom
   bar. Mirrors the homepage's ad styles — pages that load this do NOT
   load the SPA's style.css.
   ───────────────────────────────────────────────────────────────────── */

/* Shell that flanks the page content with the two side rails. */
.ad-shell {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.ad-shell main {
  flex: 1 1 auto;
  min-width: 0;
}

/* Side rails — three vertical boxes per side. Static (scroll with the
   page); ads.js appends fresh boxes below as you scroll so the sides
   never run dry. */
.ad-rail {
  flex: 0 0 160px;
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 28px;
}

/* Shared ad box. */
.ad-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed #232326;
  border-radius: 12px;
  background: #111113;
  text-align: center;
  padding: 22px 14px;
  transition: opacity 0.35s ease, min-height 0.45s ease, border-color 0.2s, box-shadow 0.2s;
}
.ad-banner:hover {
  border-color: #e50914;
  box-shadow: 0 0 34px rgba(229, 9, 20, 0.2);
}

.ad-banner-v .ad-text { font-size: 16px; }
.ad-banner-v .ad-contact { font-size: 10px; letter-spacing: 0.2px; }

.ad-banner-h {
  flex-direction: row;
  gap: 22px;
  padding: 20px 32px;
}
.ad-banner-h .ad-text { font-size: 20px; }
.ad-banner-h .ad-contact { font-size: 15px; }

.ad-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8b8b93;
  border: 1px solid #232326;
  border-radius: 4px;
  padding: 2px 7px;
}
.ad-text {
  font-family: "Archivo Black", "Arial Black", Impact, sans-serif;
  letter-spacing: 2px;
  color: #8b8b93;
}
.ad-contact {
  font-weight: 700;
  color: #ff2233;
  font-size: 12px;
  word-break: break-all;
}

/* Sponsor image banner (AD_IMG / per-slot img) — fills the box's frame. */
.ad-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}
.ad-banner-v .ad-img { width: 100%; height: auto; }
.ad-banner-h .ad-img { max-height: 120px; }

/* Fade phase while a rotating ad swaps its creative. */
.ad-fading { opacity: 0; }

/* Rotating creative size variants. */
.ad-size-v1 { min-height: 300px; }
.ad-size-v2 { min-height: 380px; }
.ad-size-v3 { min-height: 460px; }
.ad-size-h1 { min-height: 64px; }
.ad-size-h2 { min-height: 96px; }
.ad-size-h3 { min-height: 128px; }

/* Rotating creative color themes. */
.ad-theme-classic { background: #111113; }
.ad-theme-sponsored {
  border-color: #b0060f;
  background: linear-gradient(180deg, #1a0d0e, #111113);
}
.ad-theme-sponsored .ad-tag { border-color: #e50914; color: #ff2233; }
.ad-theme-promoted {
  border-color: #8a6d00;
  background: linear-gradient(180deg, #171503, #111113);
}
.ad-theme-promoted .ad-tag { border-color: #ffd400; color: #ffd400; }
.ad-theme-gradient {
  border-color: #7a1f2a;
  background: linear-gradient(135deg, #1c0d10, #141419 55%, #1d0f06);
}
.ad-theme-gradient .ad-tag { border-color: #c2303e; color: #ff5a66; }

/* Bottom bar — pinned to the bottom of the viewport so it's always
   visible while browsing. */
.ad-bottom {
  position: sticky;
  bottom: 0;
  z-index: 40;
  max-width: 1500px;
  margin: 0 auto;
  padding: 10px 24px;
}
.ad-bottom .ad-banner-h {
  background: #0d0d0d;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

/* Once the viewport is too narrow for 160px rails + a usable column,
   drop the rails and let the bottom bar carry the load. */
@media (max-width: 1199px) {
  .ad-rail { display: none; }
  .ad-shell { display: block; padding: 0; }
}
@media (max-width: 720px) {
  .ad-banner-h { flex-direction: column; gap: 8px; text-align: center; }
}
