/* ── Ad Slot — shared across every placement, keeps the existing site design intact ──
   Fixed max-width always applies — a real 300x250-class ad card should look the same
   size whether it sits in a narrow desktop sidebar or a full-width mobile column;
   it must never stretch to fill whatever (often much wider) column it lands in. */
.ad-slot{position:relative;background:#fff;border:1px solid #eef2f7;border-radius:10px;overflow:hidden;margin:0 auto 16px;max-width:336px}
.ad-slot-label{position:absolute;top:6px;left:8px;z-index:2;font-size:.6rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8;background:rgba(255,255,255,.85);padding:2px 7px;border-radius:100px}
.ad-slot-link{display:block;line-height:0}
.ad-slot-link img,.ad-slot-link picture{width:100%;height:auto;display:block;object-fit:contain;background:#f8fafc}
.ad-slot--internal:hover{box-shadow:0 4px 16px rgba(0,0,0,.08)}

/* Sticky right-rail wrapper — opt-in per placement via AdPlacementDefs.IsSticky, applied by the page */
.ad-rail-sticky{position:sticky;top:80px;align-self:start}

/* Debug overlay — only ever rendered when AdSettings.DebugModeEnabled is on (backend-controlled) */
.ad-slot-debug{margin:4px 0 16px;padding:8px 10px;background:#0f172a;color:#a7f3d0;font-family:monospace;font-size:.68rem;line-height:1.6;border-radius:8px}
.ad-slot-debug code{color:#fbbf24}

/* Mobile: the ad card itself stays capped (see .ad-slot above) and just centers
   in whatever column it's stacked into — only sticky positioning is dropped here. */
@media (max-width: 900px) {
  .ad-rail-sticky{position:static}
}
