/* ==========================================================================
   Age Gate Modal — Brand Override
   Overrides the default Age Gate plugin styles to match LV Peptides branding.
   Preserves existing JS logic; only CSS is changed.
   Requirements: 7.1, 7.2, 7.3, 7.4, 7.5
   ========================================================================== */

/* --------------------------------------------------------------------------
   Dark overlay behind the modal
   -------------------------------------------------------------------------- */
.age-gate-wrapper,
.age-gate-overlay,
.age-gate__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99998;
}

/* --------------------------------------------------------------------------
   Modal container — centered via grid
   -------------------------------------------------------------------------- */
.age-gate,
.age-gate__modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 99999;
  font-family: var(--font-family);
  padding: var(--space-4);
}

/* --------------------------------------------------------------------------
   Modal content box
   -------------------------------------------------------------------------- */
.age-gate-form,
.age-gate__form,
.age-gate .age-gate-content,
.age-gate__content {
  background-color: var(--lv-navy);
  color: var(--lv-white);
  font-family: var(--font-family);
  border-radius: var(--radius-md);
  padding: var(--space-12) var(--space-8);
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   LV Peptides brand name above the prompt (injected via CSS ::before)
   -------------------------------------------------------------------------- */
.age-gate-form::before,
.age-gate__form::before,
.age-gate .age-gate-content::before,
.age-gate__content::before {
  content: "LV Peptides";
  display: block;
  font-family: var(--font-family);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--lv-teal);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   Headings and text inside the modal
   -------------------------------------------------------------------------- */
.age-gate h1,
.age-gate h2,
.age-gate h3,
.age-gate p,
.age-gate label,
.age-gate span,
.age-gate__modal h1,
.age-gate__modal h2,
.age-gate__modal h3,
.age-gate__modal p,
.age-gate__modal label,
.age-gate__modal span {
  color: var(--lv-white);
  font-family: var(--font-family);
}

.age-gate h2,
.age-gate__modal h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.age-gate p,
.age-gate__modal p {
  font-size: var(--font-size-base);
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   Confirm / "Yes" button — teal
   -------------------------------------------------------------------------- */
.age-gate button[type="submit"],
.age-gate .age-gate-submit,
.age-gate .age-gate-confirm,
.age-gate__submit,
.age-gate__confirm,
.age-gate-form button,
.age-gate__form button {
  background-color: var(--lv-teal);
  color: var(--lv-white);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-8);
  min-height: 44px;
  min-width: 160px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.age-gate button[type="submit"]:hover,
.age-gate .age-gate-submit:hover,
.age-gate .age-gate-confirm:hover,
.age-gate__submit:hover,
.age-gate__confirm:hover,
.age-gate-form button:hover,
.age-gate__form button:hover {
  background-color: #00b892;
  transform: translateY(-1px);
}

.age-gate button[type="submit"]:focus-visible,
.age-gate-form button:focus-visible,
.age-gate__form button:focus-visible {
  outline: 2px solid var(--lv-white);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Decline / "No" button — subtle outline style
   -------------------------------------------------------------------------- */
.age-gate .age-gate-decline,
.age-gate__decline {
  background-color: transparent;
  color: var(--lv-white);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-6);
  min-height: 44px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  margin-top: var(--space-3);
}

.age-gate .age-gate-decline:hover,
.age-gate__decline:hover {
  border-color: var(--lv-white);
}

/* --------------------------------------------------------------------------
   Button group spacing
   -------------------------------------------------------------------------- */
.age-gate .age-gate-buttons,
.age-gate__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* --------------------------------------------------------------------------
   Form inputs (date-of-birth style age gates)
   -------------------------------------------------------------------------- */
.age-gate input[type="text"],
.age-gate input[type="number"],
.age-gate input[type="date"],
.age-gate select,
.age-gate__modal input[type="text"],
.age-gate__modal input[type="number"],
.age-gate__modal input[type="date"],
.age-gate__modal select {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--lv-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
}

.age-gate input:focus,
.age-gate select:focus,
.age-gate__modal input:focus,
.age-gate__modal select:focus {
  border-color: var(--lv-teal);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.3);
}

/* --------------------------------------------------------------------------
   Responsive — tighter padding on small screens
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .age-gate-form,
  .age-gate__form,
  .age-gate .age-gate-content,
  .age-gate__content {
    padding: var(--space-8) var(--space-4);
    margin: var(--space-4);
  }

  .age-gate-form::before,
  .age-gate__form::before,
  .age-gate .age-gate-content::before,
  .age-gate__content::before {
    font-size: var(--font-size-xl);
  }
}
