/*
 * Age gate styles.
 * Loaded in TWO places:
 *   1. head.php <link> — outer document, makes oth-age-gate and :host selectors apply
 *      to the custom element immediately (synchronous, no FOUC).
 *   2. shadow DOM <link> — scoped to shadow root, makes .overlay/.card etc. apply
 *      inside the shadow DOM.
 * CSP-safe: same-origin stylesheet, no inline <style> blocks.
 */

/* ── Host element ────────────────────────────────────────────
   oth-age-gate  → matches in outer document (loaded via head.php)
   :host         → matches in shadow DOM context (loaded via shadow <link>)
   Both are needed; browsers use whichever applies in each context.
   ─────────────────────────────────────────────────────────── */

oth-age-gate,
:host {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  pointer-events: auto;
}

/* ── Shadow DOM reset ────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Overlay ─────────────────────────────────────────────── */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: rgba(7, 6, 4, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Card ────────────────────────────────────────────────── */

.card {
  background: #100b08;
  border: 1px solid rgba(246, 90, 23, 0.35);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(246, 90, 23, 0.07),
    0 32px 80px rgba(0, 0, 0, 0.82);
  padding: 2.5rem 2rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  font-family: 'Lato', ui-sans-serif, system-ui, sans-serif;
  animation: card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
  from {
    transform: translateY(14px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

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

/* ── Badge ───────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(246, 90, 23, 0.12);
  border: 1px solid rgba(246, 90, 23, 0.4);
  font-size: 1rem;
  font-weight: 700;
  color: #f65a17;
  margin: 0 auto 1.25rem;
}

/* ── Brand label ─────────────────────────────────────────── */

.brand {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 243, 223, 0.45);
  margin-bottom: 0.9rem;
}

/* ── Divider ─────────────────────────────────────────────── */

.divider {
  width: 36px;
  height: 1px;
  background: rgba(246, 90, 23, 0.45);
  margin: 0 auto 1.1rem;
}

/* ── Title & subtitle ────────────────────────────────────── */

.title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.subtitle {
  font-size: 0.92rem;
  color: #d9c8b3;
  line-height: 1.68;
  margin-bottom: 1.85rem;
}

/* ── Buttons ─────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-family: 'Lato', ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid #f65a17;
  outline-offset: 3px;
  border-radius: 999px;
}

.btn--yes {
  background: linear-gradient(135deg, #f65a17, #b83b0a);
  color: #160804;
  box-shadow: 0 16px 36px rgba(246, 90, 23, 0.22);
}

.btn--yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(246, 90, 23, 0.38);
}

.btn--no {
  background: rgba(255, 255, 255, 0.05);
  color: #d9c8b3;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn--no:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff3df;
}

/* ── Note ────────────────────────────────────────────────── */

.note {
  font-size: 0.73rem;
  color: rgba(217, 200, 179, 0.38);
  margin-top: 1.4rem;
  line-height: 1.55;
}

/* ── Responsive ──────────────────────────────────────────── */

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