/* .ap-age-gate — first-visit overlay. Sits on top of the page; the page's
   own content stays mounted in the DOM underneath (see age-gate.js —
   this is a CSS/visual overlay, never a content-removal mechanism). */

.ap-age-gate {
  /* Overrides the browser's own <dialog> UA defaults (width: fit-content,
     margin: auto, max-width/height) — without these, "inset: 0" alone gets
     ignored/overridden and the dialog shrinks to a box hugging one corner
     instead of a true full-viewport centering container. */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: none;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ap-space-md);
  background: rgba(0, 0, 0, 0.85);
}

.ap-age-gate[hidden] {
  display: none;
}

.ap-age-gate__panel {
  width: min(100%, 440px);
  background: var(--ap-surface);
  color: var(--ap-text);
  border-radius: var(--ap-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: var(--ap-space-xl) var(--ap-space-lg) var(--ap-space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--ap-space-md);
  animation: ap-age-gate-in 0.25s ease-out;
}

@keyframes ap-age-gate-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-age-gate__panel {
    animation: none;
  }
}

/* Self-contained (not a real h1-h6, so it doesn't inherit from 03-base.css's
   heading rule) — see includes/age-gate.php for why this is a <p>. */
.ap-age-gate__title {
  font-family: var(--ap-font-heading);
  font-size: var(--ap-fs-h3);
  font-weight: 700;
  line-height: var(--ap-lh-tight);
  color: var(--ap-text);
  margin: 0;
}

.ap-age-gate__body {
  color: var(--ap-text-muted);
  font-size: var(--ap-fs-sm);
}

.ap-age-gate__actions {
  display: flex;
  flex-direction: column;
  gap: var(--ap-space-sm);
  margin-top: var(--ap-space-sm);
}

@media (min-width: 480px) {
  .ap-age-gate__actions {
    flex-direction: row;
  }
  .ap-age-gate__actions .ap-btn {
    flex: 1;
  }
}

.ap-age-gate__legal {
  font-size: var(--ap-fs-sm);
  color: var(--ap-text-muted);
}

.ap-age-gate__legal a {
  text-decoration: underline;
}
