/* ═════════════════════════════════════════════════════════════════════════════
   SKYBLOCK FLIPS — AD UNITS & MONETIZATION STYLESHEET (ads.css)
   Pure CSS for Monetag Banner Slots, Bottom Sticky Ad, Floating Video Unit,
   Page Transition Interstitial Modal.
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── COMMON AD LABELS & CONTAINERS (ZERO CLS) ──────────────────────────────── */
.ad-container-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 14px auto;
  position: relative;
}

.ad-label-pill {
  font-family: 'MinecraftIngame', 'Minecraft', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.ad-slot-box {
  background: #1c1c1c;
  border: 2px solid #333;
  box-shadow: inset 2px 2px 0 #141414, inset -2px -2px 0 #282828;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease;
}

.ad-slot-box:hover {
  border-color: #444;
}

/* Reserved dimensions to prevent Cumulative Layout Shift (CLS) */
.ad-slot-leaderboard {
  min-height: 90px;
  width: 100%;
  max-width: 728px;
}

.ad-slot-rectangle {
  min-height: 250px;
  width: 100%;
  max-width: 300px;
}

.ad-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: #666;
  font-family: 'MinecraftIngame', 'Minecraft', sans-serif;
  font-size: 11px;
  user-select: none;
  gap: 6px;
}

.ad-placeholder-content svg {
  opacity: 0.5;
}

/* ── STICKY BOTTOM AD BANNER (EXACT BANNER SIZE & BORDERLESS) ──────── */
#skymargin-sticky-bottom-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9995;
  background: #0d0d0d;
  border: none !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  overflow: visible;
  transition: transform 0.25s ease;
}

#skymargin-sticky-bottom-ad.collapsed {
  transform: translateY(100%);
}

/* Discreet floating close/minimize tab (adds 0px to banner height) */
.sticky-ad-toggle-btn {
  position: absolute;
  top: -18px;
  right: 14px;
  background: rgba(20, 20, 20, 0.9);
  border: none;
  color: #888;
  font-size: 10px;
  padding: 1px 7px;
  cursor: pointer;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  font-family: 'MinecraftIngame', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  user-select: none;
  line-height: 1.4;
}

.sticky-ad-toggle-btn:hover {
  color: #ffffff;
  background: #333333;
}

.sticky-ad-body {
  width: 728px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  #skymargin-sticky-bottom-ad {
    height: 50px;
  }
  .sticky-ad-body {
    width: 320px;
    height: 50px;
  }
}

/* ── FLOATING CORNER VIDEO AD UNIT ────────────────────────────────────────── */
#skymargin-corner-video {
  position: fixed;
  bottom: 96px;
  right: 16px;
  z-index: 9994;
  width: 280px;
  background: #1c1c1c;
  border: 3px solid #383838;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.25s ease;
}

#skymargin-corner-video.minimized {
  width: auto;
  bottom: 110px;
  right: 16px;
  border: 2px solid #ffaa00;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

#skymargin-corner-video.minimized .corner-video-body,
#skymargin-corner-video.minimized .corner-video-footer {
  display: none !important;
}

.corner-video-header {
  background: #282828;
  border-bottom: 2px solid #333;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'MinecraftIngame', 'Minecraft', sans-serif;
  font-size: 10px;
  color: #ffaa00;
}

.corner-video-header-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.corner-video-ctrls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.corner-video-btn {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 1px 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.corner-video-btn:hover {
  color: #fff;
}

.corner-video-body {
  width: 100%;
  height: 158px;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.corner-video-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.corner-video-overlay {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.7);
  padding: 2px 6px;
  border-radius: 2px;
  font-family: 'MinecraftIngame', sans-serif;
  font-size: 9px;
  color: #55ff55;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.corner-video-sound-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  padding: 3px 5px;
  border-radius: 2px;
  color: #ddd;
  font-size: 10px;
  cursor: pointer;
}

@media (max-width: 600px) {
  #skymargin-corner-video {
    width: 200px;
    right: 8px;
    bottom: 56px;
  }
  .corner-video-body {
    height: 112px;
  }
}

/* ── 5-SECOND PAGE TRANSITION INTERSTITIAL MODAL ──────────────────────────── */
#skymargin-interstitial-ad {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#skymargin-interstitial-ad.active {
  display: flex;
  opacity: 1;
}

.interstitial-card {
  background: #222;
  border: 3px solid #555;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), inset 2px 2px 0 #3a3a3a;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: interstitialPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes interstitialPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.interstitial-header {
  background: #2a2a2a;
  border-bottom: 2px solid #383838;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.interstitial-header-title {
  font-family: 'MinecraftIngame', 'Minecraft', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  color: #ffaa00;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.interstitial-countdown-pill {
  font-family: 'MinecraftIngame', monospace;
  font-size: 11px;
  background: #141414;
  border: 1px solid #444;
  color: #ffff55;
  padding: 2px 8px;
  border-radius: 2px;
}

.interstitial-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.interstitial-ad-slot {
  width: 300px;
  height: 250px;
  background: #111;
  border: 2px dashed #444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  position: relative;
  overflow: hidden;
}

.interstitial-progress-track {
  width: 100%;
  height: 4px;
  background: #111;
  overflow: hidden;
  margin-top: 8px;
}

.interstitial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffaa00, #55ff55);
  width: 0%;
  transition: width 1s linear;
}

.interstitial-footer {
  background: #242424;
  border-top: 2px solid #333;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.interstitial-target-preview {
  font-family: 'MinecraftIngame', sans-serif;
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.interstitial-action-btn {
  font-family: 'MinecraftUI', 'Minecraft', sans-serif;
  font-size: 11px;
  padding: 6px 14px;
  border: 2px solid;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  user-select: none;
  transition: all 0.15s ease;
}

.interstitial-action-btn.disabled {
  background: #333;
  border-color: #555 #222 #222 #555;
  color: #888;
  cursor: not-allowed;
}

.interstitial-action-btn.ready {
  background: #388022;
  border-color: #5dc23c #143c00 #143c00 #5dc23c;
  color: #fff;
  cursor: pointer;
}

.interstitial-action-btn.ready:hover {
  background: #46a02b;
}

