/* ==========================================================================
  Age Verification Popup - Nicotinell
========================================================================== */

/* ---- Overlay backdrop ---- */
#age-verification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: av-fade-in 0.3s ease forwards;
  transform: translateZ(0);
  outline: none;
}

/* ---- Popup card ---- */
#age-verification-popup {
  background: #FAFBFF;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 20px;
  max-width: 400px;
  width: calc(100% - 40px);
  text-align: center;
  position: relative;
  z-index: 99999;
  animation: av-slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;

  @media (min-width: 768px) {
    padding: 40px 48px 32px;
  }
}

/* ---- Icon ---- */
#age-verification-popup .av-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: block;
}

/* ---- Heading ---- */
#age-verification-popup h2 {
  font-family: 'Intro', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #001A72;
  margin: 0 0 20px;
  line-height: 36px;
}

/* ---- Description ---- */
#age-verification-popup .av-description {
  font-family: "Roboto Regular", verdana, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #2C2D30;
  margin: 0 0 23px;
  line-height: 18px;

  @media (min-width: 768px) {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Question ---- */
#age-verification-popup .av-question {
  font-family: "Roboto Regular", verdana, sans-serif;;
  font-size: 18px;
  font-weight: 700;
  color: #001A72;
  margin: 0 0 24px;
}

/* ---- Button row ---- */
#age-verification-popup .av-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

/* Base button */
#age-verification-popup .av-btn {
  flex: 1;
  padding: 16px;
  border-radius: 10px;
  font-family: "Roboto Regular", verdana, sans-serif;
  font-size: 16px;
  line-height: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  min-width: 122px;
  min-height: 50px;
  border-radius: 5px;
  outline: none !important;
  box-shadow: none !important;
}

/* Ensure NO outline on click/hover, but high-contrast on keyboard Tab */
#age-verification-popup .av-btn:focus,
#age-verification-popup .av-btn:active,
#age-verification-popup .av-btn:hover {
  outline: none !important;
  box-shadow: none !important;
}

#age-verification-popup .av-btn:focus-visible {
  outline: 2px solid #000000 !important;
  outline-offset: 2px !important;
}

/* Cancel button */
#age-verification-popup .av-btn-cancel {
  background: transparent;
  color: #1A3180;
  border-color: #1A3180;
}

#age-verification-popup .av-btn-cancel:hover {
  background: #F5F6FA;
  color: #1A3180;
  border-color: #1A3180;
}

/* Confirm button */
#age-verification-popup .av-btn-confirm {
  background: #1A3180;
  color: #ffffff;
  border-color: #1A3180;
}

#age-verification-popup .av-btn-confirm:hover {
  background: transparent;
  border-color: #1A3180;
  color: #1A3180;
}

/* ---- Legal disclaimer ---- */
#age-verification-popup .av-legal {
  font-family: "Roboto Regular", verdana, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #4D5F9C;
  line-height: 18px;
  margin: 0;
}

#age-verification-popup .av-legal a {
  color: inherit;
  text-decoration: underline;
}

/* ==========================================================================
   Declined state — body is locked + blurred
   ========================================================================== */

body.av-declined {
  overflow: hidden !important;
}

body.av-declined #age-verification-overlay {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Disable interaction with the main page content when declined */
body.av-declined > *:not(#age-verification-overlay):not(script):not(style) {
  pointer-events: none;
  user-select: none;
}

/* ---- Declined message shown in popup ---- */
#age-verification-popup .av-declined-message {
  display: none;
}

body.av-declined #age-verification-popup .av-declined-message {
  display: block;
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff3f3;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #cc3333;
  line-height: 1.5;
}

/* Lock scroll when popup is open */
body.av-open {
  overflow: hidden !important;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes av-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes av-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
  #age-verification-popup {
    padding: 32px 24px 24px;
  }

  #age-verification-popup h2 {
    font-size: 24px;
  }

  #age-verification-popup .av-buttons {
    flex-direction: column;
  }
}
