:root {
  --ad-z-index: 2147483000;
}

/* Shared container styles */
.outstream-ad {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 24px 0;
  box-sizing: border-box;
}

.outstream-ad .ad-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  background: #000;
}

/* Slider root */
#video-slider-root.video-slider {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--ad-z-index);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s ease, opacity .35s ease;
  will-change: transform, opacity;
}

#video-slider-root.video-slider.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#video-slider-root .ad-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  background: #000;
}

/* Close button (slider) */
.ad-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 14px;
  background: rgba(0,0,0,.5);
  color: #fff;
  font: 600 16px/28px system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  text-align: center;
  cursor: pointer;
  z-index: 3;
}
.ad-close:hover {
  background: rgba(0,0,0,.7);
}

/* Generic video & overlays */
video.ad-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.click-overlay {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
  background: transparent;
  z-index: 2;
}

.cta-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: rgba(255,255,255,.12);
  color: #fff;
  user-select: none;
  pointer-events: none;
}

/* Skip button */
.skip-btn {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  cursor: pointer;
  display: none;
  z-index: 3;
}
.skip-btn.show {
  display: inline-block;
}

/* Outstream placeholder while lazy-loading */
.outstream-placeholder {
  display: grid;
  place-items: center;
  padding: 12px;
  font: 13px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #888;
  background: linear-gradient(180deg, #111, #222);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #video-slider-root.video-slider {
    transition: none;
  }
}