/* ============================================================
   Age Verification Gate
   Palette: night blue #0A1128 (background) / ivory #FFFFF0 (text)
   Typography: Georgia (system font, no loading required)

   Isolation guarantee (two directions):
   1) This file NEVER overrides the host page's stylesheet:
      every rule is scoped to #age-gate / .age-gate__* / state
      classes that only exist while the gate is on screen.
   2) The gate SURVIVES aggressive host rules (e.g.
      "h1 { color: crimson !important }" or "div { background:... }"):
      the few !important flags below defend the gate's own
      readability, and inner elements declare defensive
      background/padding/margin so global "div {}" rules lose.
   Load order: place this link AFTER your styles.css link.
   ============================================================ */

#age-gate {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  z-index: 2147483647; /* always above any element of the host page */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background-color: #0A1128 !important; /* night blue */
  color: #FFFFF0 !important;            /* ivory */
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

/* Scoped "hidden" handling: the rule below would otherwise be beaten
   by the display:flex above. Scoped to the gate so the host page's
   own [hidden] elements are never affected. */
#age-gate[hidden],
#age-gate [hidden] {
  display: none !important;
}

/* Sessions already verified (class set by age-gate.js in <head>):
   the gate never paints, so there is no flash for returning visitors. */
html.age-gate-verified #age-gate {
  display: none !important;
}

/* Lock page scrolling while the gate is on screen.
   The class is removed when the gate closes, so the host page's
   own overflow rules apply again right after. */
html.age-gate-locked,
html.age-gate-locked body {
  overflow: hidden !important;
}

/* ---------- Inner containers: defensive reset ----------
   Declaring these properties here (class/ID specificity) makes
   global host rules like "div { background: yellow; padding: 10px }"
   lose, so nothing leaks into the gate. */
.age-gate__panel,
.age-gate__actions,
#age-gate-blocked {
  background-color: transparent;
  padding: 0;
  margin: 0;
}

/* ---------- Question panel ---------- */

.age-gate__panel {
  width: 100%;
  max-width: 660px;
}

.age-gate__title {
  margin: 0 0 22px !important;
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  font-size: 28px !important;
  font-weight: normal;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-align: center !important;
  color: #FFFFF0 !important;
}

.age-gate__disclaimer {
  display: block;
  margin: 0 auto 34px !important;
  max-width: 620px;
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  font-size: 15px !important;
  line-height: 1.75;
  letter-spacing: 0.2px;
  text-align: center !important;
  color: rgba(255, 255, 240, 0.85) !important;
}

.age-gate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ---------- Buttons ---------- */

.age-gate__btn {
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  font-size: 16px !important;
  letter-spacing: 0.4px;
  padding: 13px 32px !important;
  margin: 0;
  min-height: 48px; /* touch-friendly target */
  border-radius: 2px !important;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease;
}

.age-gate__btn--yes {
  background-color: #FFFFF0 !important; /* ivory */
  color: #0A1128 !important;            /* night blue */
  border: 1px solid #FFFFF0 !important;
}

.age-gate__btn--yes:hover {
  background-color: #E9E7D8 !important; /* dimmed ivory */
  border-color: #E9E7D8 !important;
}

.age-gate__btn--no {
  background-color: transparent !important;
  color: #FFFFF0 !important;
  border: 1px solid rgba(255, 255, 240, 0.5) !important;
}

.age-gate__btn--no:hover {
  border-color: #FFFFF0 !important;
  background-color: rgba(255, 255, 240, 0.08) !important;
}

.age-gate__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 240, 0.7);
  outline-offset: 3px;
}

/* ---------- Blocking state (visitor answered "No") ---------- */

.age-gate__blocked-msg {
  margin: 0 !important;
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  font-size: 22px !important;
  line-height: 1.5;
  letter-spacing: 0.4px;
  text-align: center !important;
  color: #FFFFF0 !important;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
  #age-gate {
    padding: 24px 18px;
  }

  .age-gate__title {
    font-size: 23px !important;
  }

  .age-gate__disclaimer {
    font-size: 14px !important;
    margin-bottom: 28px !important;
  }

  .age-gate__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .age-gate__btn {
    width: 100%;
  }
}
