/* Exit-intent WhatsApp modal — polished, mobile-first */

.exit-wa-overlay[hidden] {
  display: none !important;
}

.exit-wa-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background: rgba(3, 3, 8, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: exit-wa-overlay-in 0.28s ease;
}

@keyframes exit-wa-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.exit-wa-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, #14141c 0%, #0a0a0f 45%, #12101a 100%);
  border: 1px solid rgba(230, 57, 70, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 28px 80px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(230, 57, 70, 0.12);
  animation: exit-wa-card-in 0.4s cubic-bezier(0.34, 1.15, 0.64, 1);
}

@keyframes exit-wa-card-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.exit-wa-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e63946, #be123c, #25d366);
  opacity: 0.95;
}

.exit-wa-inner {
  padding: 1.65rem 1.5rem 1.45rem;
  text-align: center;
}

.exit-wa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fecaca;
  background: rgba(230, 57, 70, 0.18);
  border: 1px solid rgba(230, 57, 70, 0.35);
  border-radius: 999px;
}

.exit-wa-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 4.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fafafa;
  text-wrap: balance;
}

.exit-wa-title span {
  background: linear-gradient(135deg, #fff 0%, #fecaca 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.exit-wa-text {
  margin: 0 0 1.15rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #a1a1aa;
  text-wrap: balance;
}

.exit-wa-text strong {
  color: #e4e4e7;
  font-weight: 600;
}

.exit-wa-cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.exit-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 56px;
  padding: 0.95rem 1.35rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(165deg, #4ade80 0%, #25d366 42%, #16a34a 100%);
  box-shadow:
    0 8px 32px rgba(37, 211, 102, 0.45),
    0 0 0 2px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.exit-wa-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(37, 211, 102, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.18) inset;
}

.exit-wa-btn .exit-wa-svg {
  flex-shrink: 0;
  width: 1.45rem;
  height: 1.45rem;
}

.exit-wa-trust {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #71717a;
  line-height: 1.4;
}

.exit-wa-dismiss {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: #71717a;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.exit-wa-dismiss:hover {
  color: #a1a1aa;
}

.exit-wa-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.exit-wa-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

[dir="rtl"] .exit-wa-x {
  right: auto;
  left: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .exit-wa-overlay,
  .exit-wa-card {
    animation: none;
  }
  .exit-wa-btn:hover {
    transform: none;
  }
}
