/**
 * CM Age verification module
 * PrestaShop 1.6.x - 9.x
 * CSS
 * Front-office
 */

/* Lock page scrolling while the popup is open */
html.cmav_no_scroll,
html.cmav_no_scroll body {
  overflow: hidden;
}

/* Dimmed, blurred overlay */
#cmav_modal_screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 18, 25, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 999998;
  animation: cmav_fade_in 0.35s ease both;
}

#cmav_modal_screen.cmav_nope {
  background: rgba(46, 10, 24, 0.8);
}

/* Dialog card */
#cmav_modal_content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 440px;
  padding: 44px 36px 36px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.15);
  font-family: inherit;
  text-align: center;
  z-index: 999999;
  animation: cmav_pop_in 0.4s cubic-bezier(0.21, 1.02, 0.55, 1.01) both;
}

#cmav_modal_content * {
  box-sizing: border-box;
}

/* Closing fade-out */
#cmav_modal_screen.cmav_closing,
#cmav_modal_content.cmav_closing {
  animation: cmav_fade_out 0.25s ease both;
}

/* Age badge (e.g. "18+") */
#cmav_modal_content .cmav_badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  box-shadow:
    0 8px 20px rgba(17, 24, 39, 0.35),
    inset 0 0 0 4px rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

#cmav_modal_content.cmav_nope .cmav_badge {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
  box-shadow:
    0 8px 20px rgba(127, 29, 29, 0.4),
    inset 0 0 0 4px rgba(255, 255, 255, 0.12);
}

/* Heading */
#cmav_modal_content h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

/* Description text */
#cmav_modal_content p {
  margin: 0 auto 28px;
  max-width: 320px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

/* Buttons */
#cmav_modal_content nav ul {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#cmav_modal_content nav li {
  flex: 1 1 0;
  max-width: 170px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#cmav_modal_content nav a.cmav_btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

#cmav_modal_content nav a.cmav_btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

#cmav_modal_content nav a.cmav_btn:active {
  transform: translateY(0);
}

/* "Yes" - primary */
#cmav_modal_content nav .cmav_go {
  background: #16a34a;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
  color: #ffffff;
}

#cmav_modal_content nav .cmav_go:hover {
  background: #15803d;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.45);
  color: #ffffff;
}

/* "No" - secondary (ghost) */
#cmav_modal_content nav .cmav_no {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  padding: 12px 20px;
  color: #6b7280;
}

#cmav_modal_content nav .cmav_no:hover {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}

/* "I hit the wrong button!" note */
#cmav_modal_content nav small {
  display: block;
  margin: 18px 0 0;
  color: #9ca3af;
  font-size: 12px;
}

/* Animations */
@keyframes cmav_fade_in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes cmav_fade_out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes cmav_pop_in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ======================================================== */
/* Design variant: DARK                                     */
/* ======================================================== */

#cmav_modal_screen.cmav_design_dark {
  background: rgba(0, 0, 0, 0.75);
}

#cmav_modal_content.cmav_design_dark {
  background: #1f2937;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

#cmav_modal_content.cmav_design_dark .cmav_badge {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow:
    0 8px 20px rgba(5, 150, 105, 0.4),
    inset 0 0 0 4px rgba(255, 255, 255, 0.15);
}

#cmav_modal_content.cmav_design_dark.cmav_nope .cmav_badge {
  background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%);
  box-shadow:
    0 8px 20px rgba(185, 28, 28, 0.4),
    inset 0 0 0 4px rgba(255, 255, 255, 0.15);
}

#cmav_modal_content.cmav_design_dark h2 {
  color: #f9fafb;
}

#cmav_modal_content.cmav_design_dark p {
  color: #9ca3af;
}

#cmav_modal_content.cmav_design_dark nav .cmav_go {
  background: #22c55e;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
  color: #052e16;
}

#cmav_modal_content.cmav_design_dark nav .cmav_go:hover {
  background: #4ade80;
  color: #052e16;
}

#cmav_modal_content.cmav_design_dark nav .cmav_no {
  background: transparent;
  border-color: #374151;
  color: #9ca3af;
}

#cmav_modal_content.cmav_design_dark nav .cmav_no:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

#cmav_modal_content.cmav_design_dark nav small {
  color: #6b7280;
}

/* ======================================================== */
/* Design variant: ELEGANT (burgundy - wine & spirits)      */
/* ======================================================== */

#cmav_modal_screen.cmav_design_elegant {
  background: rgba(30, 12, 16, 0.78);
}

#cmav_modal_content.cmav_design_elegant {
  background: #faf7f2;
  border-radius: 6px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(114, 47, 55, 0.25);
}

#cmav_modal_content.cmav_design_elegant .cmav_badge {
  background: #722f37;
  border-radius: 50%;
  box-shadow:
    0 8px 20px rgba(114, 47, 55, 0.35),
    inset 0 0 0 3px #faf7f2,
    inset 0 0 0 5px #c9a227;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
}

#cmav_modal_content.cmav_design_elegant.cmav_nope .cmav_badge {
  background: #3f1a1f;
}

#cmav_modal_content.cmav_design_elegant h2 {
  color: #3d2228;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.3px;
}

#cmav_modal_content.cmav_design_elegant p {
  color: #7d6a6d;
}

#cmav_modal_content.cmav_design_elegant nav a.cmav_btn {
  border-radius: 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 13px;
}

#cmav_modal_content.cmav_design_elegant nav .cmav_go {
  background: #722f37;
  box-shadow: 0 6px 16px rgba(114, 47, 55, 0.35);
  color: #faf7f2;
}

#cmav_modal_content.cmav_design_elegant nav .cmav_go:hover {
  background: #5c262d;
  box-shadow: 0 8px 20px rgba(114, 47, 55, 0.45);
  color: #faf7f2;
}

#cmav_modal_content.cmav_design_elegant nav .cmav_no {
  background: transparent;
  border: 1px solid #c5b8ba;
  padding: 13px 20px;
  color: #7d6a6d;
}

#cmav_modal_content.cmav_design_elegant nav .cmav_no:hover {
  border-color: #722f37;
  background: rgba(114, 47, 55, 0.06);
  color: #722f37;
}

#cmav_modal_content.cmav_design_elegant nav small {
  color: #a89598;
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  #cmav_modal_screen,
  #cmav_modal_content,
  #cmav_modal_content nav a.cmav_btn {
    animation: none;
    transition: none;
  }
}

/* Small screens */
@media (max-width: 480px) {
  #cmav_modal_content {
    padding: 36px 24px 28px;
    border-radius: 16px;
  }

  #cmav_modal_content .cmav_badge {
    width: 72px;
    height: 72px;
    font-size: 24px;
    margin-bottom: 20px;
  }

  #cmav_modal_content h2 {
    font-size: 20px;
  }

  #cmav_modal_content nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  #cmav_modal_content nav li {
    max-width: none;
  }
}
