/* ad-slot.css — styles for the self-hosted promo ad slot.
 * Pair with ad-slot.html + ad-slot.js. Restyle freely; key rules are noted. */

/* The slot container. Change `height` to fit your layout (or make it responsive
 * with aspect-ratio / max-width). Hidden until revealed by ad-slot.js. */
.adslot {
  position: relative;
  display: block;
  width: 100%;
  height: 180px;                 /* <- adjust to taste */
  overflow: hidden;
  border-radius: 12px;
  background: #09050a;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.adslot.is-revealed {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .45s ease;
}
.adslot.is-clickable { cursor: pointer; }

/* Only the DIRECT img/video (plain image & video ads). The card's background
 * image is styled separately below. `:not([hidden])` is required so the JS
 * `hidden` attribute actually hides them (a bare `display:block` would override it). */
.adslot > img:not([hidden]),
.adslot > video:not([hidden]) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;             /* fill the slot edge-to-edge (no dark letterbox bars).
                                    Per item, set "fit":"contain" to show the whole image
                                    instead (leaves bars) — good for full-page posters. */
  object-position: center;
  background: #09050a;
}
.adslot > img[hidden],
.adslot > video[hidden] { display: none !important; }

/* "AD" badge */
.adslot-badge {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  padding: 3px 6px; border: 1px solid rgba(255,255,255,.55); border-radius: 4px;
  color: #fff; background: rgba(0,0,0,.55);
  font: 800 9px/1 system-ui, sans-serif; letter-spacing: 1px;
}

/* ---- card type: product image background + headline/subtext/CTA ---- */
.adslot-card { position: absolute; inset: 0; background: #09050a; }
.adslot-card[hidden] { display: none; }
.adslot-card-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;   /* focus set per-item via JS */
}
.adslot-card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(5,4,8,.94) 0%, rgba(5,4,8,.82) 34%, rgba(5,4,8,.28) 62%, rgba(5,4,8,0) 100%);
}
.adslot-card-copy {
  position: absolute; left: 5%; top: 50%; transform: translateY(-50%);
  max-width: 60%; display: flex; flex-direction: column; gap: 2%; z-index: 2;
}
.adslot-card-title {
  margin: 0; color: #fff; font-family: system-ui, sans-serif; font-weight: 900;
  font-size: clamp(16px, 4.4vw, 38px); line-height: 1.12; letter-spacing: .3px;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.adslot-card-sub {
  margin: 0; color: #e8ecf7; font-family: system-ui, sans-serif; font-weight: 600;
  font-size: clamp(10px, 2.2vw, 18px); line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0,0,0,.6); opacity: .95;
}
.adslot-card-cta {
  align-self: flex-start; margin-top: 4px;
  padding: clamp(5px, 1.1vw, 10px) clamp(12px, 2.4vw, 22px);
  border-radius: 999px; background: var(--adslot-accent, #ffcf3f); color: #111;
  font-family: system-ui, sans-serif; font-weight: 900;
  font-size: clamp(10px, 2.2vw, 18px); white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
