/* ============================================
   Site popups — true fullscreen overlay
   ============================================ */

html.popup-open,
body.checkout-open,
body.exit-offer-open {
  overflow: hidden !important;
}

.site-popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: 2147483646 !important;
  margin: 0 !important;
  padding: 20px !important;
  border: 0 !important;
  box-sizing: border-box !important;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  isolation: isolate;
}

.site-popup.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-popup__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 8, 45, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

/* ---- Exit offer card ---- */
@keyframes exitCardIn {
  0% {
    opacity: 0;
    transform: scale(0.88) translateY(32px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes exitGlowPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

@keyframes exitShineMove {
  0% { transform: translateX(-120%) skewX(-12deg); }
  100% { transform: translateX(220%) skewX(-12deg); }
}

.exit-popup-card {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  width: min(100%, 480px);
  max-height: min(92dvh, 720px);
  overflow: hidden auto;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 32px 90px rgba(0, 13, 77, 0.55),
    0 0 80px rgba(196, 30, 58, 0.2);
  animation: exitCardIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.site-popup.is-open .exit-popup-card {
  animation: exitCardIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.exit-popup-card__glow {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 280px;
  height: 280px;
  margin-left: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35) 0%, transparent 70%);
  pointer-events: none;
  animation: exitGlowPulse 3s ease-in-out infinite;
}

.exit-popup-card__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.exit-popup-card__close:hover {
  background: #fff;
  color: var(--blue-800);
  transform: scale(1.05);
}

.exit-popup-card__hero {
  position: relative;
  padding: 28px 24px 22px;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, #000d4d 0%, #001a99 45%, #7f1d1d 100%);
  overflow: hidden;
}

.exit-popup-card__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.12), transparent),
    radial-gradient(circle at 90% 80%, rgba(249, 115, 22, 0.25), transparent 50%);
  pointer-events: none;
}

.exit-popup-card__hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: exitShineMove 4s ease-in-out infinite;
  pointer-events: none;
}

.exit-popup-card__ribbon {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 16px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--red-500), var(--orange-500));
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.45);
}

.exit-popup-card__eyebrow {
  position: relative;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 6px;
}

.exit-popup-card__title {
  position: relative;
  font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
}

.exit-popup-card__offer {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.exit-popup-card__plan {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 10px;
}

.exit-popup-card__price-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.exit-popup-card__price-was {
  font-size: 1.15rem;
  font-weight: 600;
  opacity: 0.75;
}

.exit-popup-card__price-was s {
  text-decoration-thickness: 2px;
}

.exit-popup-card__price-now {
  font-size: clamp(2.8rem, 14vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.exit-popup-card__price-now span {
  font-size: 0.45em;
  font-weight: 700;
  vertical-align: super;
  margin-left: 2px;
}

.exit-popup-card__save {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-900);
  background: var(--gold-400);
  border-radius: var(--radius-full);
}

.exit-popup-card__bonus {
  position: relative;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fde68a;
}

.exit-popup-card__features {
  list-style: none;
  margin: 0;
  padding: 16px 20px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}

.exit-popup-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-800);
}

.exit-popup-card__features svg {
  flex-shrink: 0;
  color: var(--red-500);
}

.exit-popup-card__body {
  padding: 18px 20px 20px;
}

.exit-popup-card__form-lead {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.exit-popup-card__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exit-popup-card__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 14px 20px;
  font-size: 1rem;
  box-shadow: 0 10px 28px rgba(161, 29, 29, 0.4);
}

.exit-popup-card__dismiss {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exit-popup-card__dismiss:hover {
  color: var(--blue-800);
}

@media (max-width: 480px) {
  .site-popup {
    padding: 12px !important;
  }

  .exit-popup-card__hero {
    padding: 24px 18px 18px;
  }

  .exit-popup-card__body {
    padding: 16px 16px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exit-popup-card,
  .exit-popup-card__glow,
  .exit-popup-card__hero::after {
    animation: none !important;
  }
}
