/**
 * EXIT INTENT POPUP - Última Oferta
 * Con detección anti-bot para Google Ads y Bing Ads
 */

/* Overlay de fondo */
.exit-intent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
  padding: 1rem;
}

.exit-intent-overlay.active {
  display: flex;
}

/* Modal principal */
.exit-intent-modal {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

/* Header con gradiente */
.exit-intent-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  text-align: center;
  position: relative;
}

.exit-intent-emoji {
  font-size: 5rem;
  animation: bounce 1s ease-in-out infinite;
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.exit-intent-header h2 {
  color: white;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.exit-intent-header p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.125rem;
  margin: 0;
  line-height: 1.6;
}

/* Contenido */
.exit-intent-content {
  padding: 2rem;
}

.exit-intent-offer {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #ffc107;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.exit-intent-offer-badge {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.exit-intent-offer h3 {
  font-size: 1.5rem;
  color: #d97706;
  margin: 0 0 0.5rem 0;
  font-weight: 800;
}

.exit-intent-offer p {
  font-size: 1rem;
  color: #92400e;
  margin: 0;
  line-height: 1.5;
}

/* Temporizador de urgencia */
.exit-intent-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #dc2626;
  font-weight: 600;
}

.exit-intent-timer-icon {
  animation: rotate 2s linear infinite;
  font-size: 1.25rem;
}

.exit-intent-timer-text {
  font-size: 1rem;
}

.exit-intent-timer-countdown {
  font-size: 1.25rem;
  font-weight: 800;
  color: #dc2626;
  font-family: 'Courier New', monospace;
}

/* Botones */
.exit-intent-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exit-intent-btn {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.exit-intent-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.exit-intent-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5);
}

.exit-intent-btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
}

.exit-intent-btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Botón cerrar */
.exit-intent-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.exit-intent-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Features list */
.exit-intent-features {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}

.exit-intent-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.exit-intent-features li:last-child {
  border-bottom: none;
}

.exit-intent-features li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .exit-intent-modal {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .exit-intent-header h2 {
    font-size: 1.5rem;
  }
  
  .exit-intent-emoji {
    font-size: 3.5rem;
  }
  
  .exit-intent-offer h3 {
    font-size: 1.25rem;
  }
  
  .exit-intent-btn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
}
