/* Modal de salida — aspecto ejecutivo, animación suave */
.exit-modal[hidden] {
  display: none !important;
}

.exit-modal:not([hidden]) .exit-modal-overlay {
  animation: exitOverlayIn 0.35s ease forwards;
}

.exit-modal:not([hidden]) .exit-modal-content {
  animation: exitModalContentIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

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

.exit-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
}

.exit-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.exit-modal-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 680px);
  max-height: min(90vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 24px 80px rgba(15, 23, 42, 0.35),
    0 8px 24px rgba(15, 23, 42, 0.12);
}

.exit-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(29, 53, 87, 0.06);
  color: #1d3557;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.exit-modal-close:hover {
  background: rgba(29, 53, 87, 0.12);
  color: #152a45;
}

.exit-modal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(29, 53, 87, 0.45);
}

.exit-modal-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
}

@media (max-width: 767px) {
  .exit-modal-inner {
    grid-template-columns: 1fr;
  }

  .exit-modal-content {
    max-height: 92vh;
  }
}

.exit-modal-visual {
  background: linear-gradient(160deg, #1d3557 0%, #24486f 42%, #1a304d 100%);
  color: #fff;
  padding: 2.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.exit-modal-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 107, 53, 0.18), transparent 45%);
  pointer-events: none;
}

.exit-visual-placeholder {
  text-align: center;
  position: relative;
  z-index: 1;
}

.exit-visual-placeholder .exit-stat {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.exit-visual-placeholder .exit-stat-accent {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.exit-stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 1rem;
}

.exit-modal-body {
  padding: 2.25rem 1.85rem 2rem;
  display: flex;
  flex-direction: column;
}

.exit-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgba(29, 53, 87, 0.07);
  color: #1d3557;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(29, 53, 87, 0.12);
}

.exit-modal-body h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #141418;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.exit-modal-body > p:first-of-type {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--gray-color);
  margin-bottom: 1.35rem;
}

.exit-modal-body .btn-full {
  width: 100%;
  justify-content: center;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  letter-spacing: 0.01em;
}

.exit-modal-body .btn-primary.btn-full {
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.exit-alternative {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-color);
  line-height: 1.5;
}

.exit-alternative a {
  font-weight: 600;
  color: #1d3557;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exit-alternative a:hover {
  color: var(--primary-color);
}

.exit-skip {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.65rem;
  border: none;
  background: transparent;
  color: var(--gray-color);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.exit-skip:hover {
  color: var(--dark-color);
}

.exit-skip:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 6px;
}
