/**
 * Horizon Theme — Age Gate Overlay
 * Styled to match the off-canvas panel (hp-offcanvas.css).
 */

/* ── Full-screen overlay ──────────────────────────────── */

.hp-age-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #040404;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;           /* overlay scrolls if panel taller than viewport */
  overflow-x: hidden;       /* prevent horizontal scroll from scaled bg image */
  scrollbar-width: none;    /* hide overlay scrollbar — Firefox */
  padding: 24px 16px;
}

.hp-age-gate::-webkit-scrollbar {
  display: none;            /* hide overlay scrollbar — Chrome/Safari/Edge */
}

.hp-age-gate__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hp-age-gate__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: blur(12px) brightness(0.28) saturate(0.6);
  transform: scale(1.06);
}

/* ── Panel — solid surface matching off-canvas ────────── */

.hp-age-gate__panel {
  position: relative;
  z-index: 1;
  width: 720px;
  max-width: 96vw;
  background: var(--hp-bg-surface);
  border: 1px solid var(--hp-border);
  border-radius: 8px;
  overflow: hidden; /* clips border-radius only — overlay handles scrolling */
  display: flex;
  flex-direction: column;
  margin: auto;
}

/* ── Banner photo — mirrors .hp-offcanvas__banner ─────── */

.hp-age-gate__banner {
  flex-shrink: 0;
  width: 100%;
  height: clamp(160px, 30vh, 300px);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.hp-age-gate__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.hp-age-gate__banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22%;
  background: linear-gradient(to bottom, transparent 0%, var(--hp-bg-surface) 100%);
  pointer-events: none;
}

/* ── Creator name — mirrors .hp-offcanvas__creator / __name */

.hp-age-gate__creator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px 14px;
}

.hp-age-gate__creator-name {
  font-family: var(--hp-font-display);
  font-size: 2.3rem;
  font-weight: 400;
  color: var(--hp-gold);
  margin: 0;
  line-height: 1.15;
  text-align: center;
}

/* ── Divider — mirrors .hp-offcanvas__divider ─────────── */

.hp-age-gate__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 20px;
  flex-shrink: 0;
}

/* ── Gate copy ────────────────────────────────────────── */

.hp-age-gate__gate-copy {
  padding: 18px 20px 18px;
  text-align: center;
}

.hp-age-gate__age-badge {
  display: inline-block;
  font-family: var(--hp-font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hp-gold);
  border: 1px solid color-mix(in srgb, var(--hp-gold) 38%, transparent);
  border-radius: 100px;
  padding: 4px 16px;
  margin: 0 0 12px;
}

.hp-age-gate__intro {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* ── Actions — mirrors hero CTA row ───────────────────── */

.hp-age-gate__actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 0 20px 32px;
  position: relative;
}

.hp-age-gate__actions::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: clamp(0.88rem, 2.8vw, 1.2rem);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--hp-gold) 32%, transparent) 20%,
    color-mix(in srgb, var(--hp-gold) 32%, transparent) 80%,
    transparent 100%
  );
}

.hp-age-gate__actions .hp-btn {
  flex: 1;
  justify-content: center;
  height: 44px;
  font-size: var(--hp-text-sm);
}

/* Explicitly assert gold fill — overrides any WP/plugin button element resets */
.hp-age-gate__panel .hp-age-gate__confirm {
  background: var(--hp-gold);
  color: var(--hp-on-accent);
  border: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hp-age-gate__panel .hp-age-gate__confirm:hover {
  background: var(--hp-gold-light);
  transform: translateY(-1px);
  box-shadow: var(--hp-shadow-gold);
}

.hp-age-gate__panel .hp-age-gate__confirm:active {
  background: var(--hp-gold-dark);
  transform: translateY(0);
}

/* ── Legal fine print ─────────────────────────────────── */

.hp-age-gate__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 20px 20px;
  text-align: left;
}

.hp-age-gate__body,
.hp-age-gate__terms,
.hp-age-gate__parental-notice,
.hp-age-gate__parental-notice p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.55;
  margin: 0 0 10px;
}

.hp-age-gate__terms {
  margin: 0;
}

.hp-age-gate__terms a,
.hp-age-gate__parental-notice a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  transition: color 0.2s, text-decoration-color 0.2s;
}

.hp-age-gate__terms a:hover,
.hp-age-gate__parental-notice a:hover {
  color: rgba(255, 255, 255, 0.75);
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.hp-age-gate__parental-list {
  margin: 4px 0 10px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.hp-age-gate__parental-list li {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.32);
}

/* Separator dot between items — no bullets, no slamming */
.hp-age-gate__parental-list li + li::before {
  content: ' · ';
  color: rgba(255, 255, 255, 0.2);
}

/* ── Powered by — mirrors .hp-offcanvas__powered ──────── */

.hp-age-gate__powered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 14px 20px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hp-age-gate__powered__label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hp-gold);
  margin: 0 0 1px;
}

.hp-age-gate__powered a {
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.hp-age-gate__powered a:hover {
  opacity: 1;
}

/* Cancel the global .hp-ah-logo base opacity */
.hp-age-gate__powered .hp-ah-logo {
  width: 180px;
  opacity: 1;
}

/* Prevent scroll while gate visible */
body.hp-age-gate-active {
  overflow: hidden;
}

/* ── Short desktop viewports ──────────────────────────── */

@media (min-width: 601px) and (max-height: 820px) {
  .hp-age-gate__banner    { height: clamp(130px, 22vh, 200px); }
  .hp-age-gate__creator   { padding: 8px 20px 10px; }
  .hp-age-gate__gate-copy { padding: 12px 20px 4px; }
  .hp-age-gate__actions   { padding: 0 20px 20px; gap: 8px; }
  .hp-age-gate__legal     { padding: 14px 20px 16px; }
  .hp-age-gate__powered   { padding: 10px 20px 16px; }
}

/* ── Mobile ───────────────────────────────────────────── */

@media (max-width: 600px) {
  .hp-age-gate {
    align-items: flex-start;
    overflow-y: auto;
    padding: 12px;
  }

  .hp-age-gate__panel {
    border-radius: 6px;
    margin: auto 0;
  }

  .hp-age-gate__banner {
    height: 140px;
  }

  .hp-age-gate__creator-name {
    font-size: 1.8rem;
  }

  .hp-age-gate__gate-copy {
    padding: 14px 16px 4px;
  }

  .hp-age-gate__actions {
    padding: 0 16px 20px;
    gap: 8px;
  }

  .hp-age-gate__legal {
    padding: 14px 16px 16px;
  }

  .hp-age-gate__powered {
    padding: 16px 16px 22px;
  }
}
