/**
 * Exit Intent Popup Styles
 * IronWiFi Brand Colors: Navy #0a2540, Teal #00d4aa
 */

/* Popup container */
.ironwifi-exit-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ironwifi-exit-popup.active {
  opacity: 1;
  visibility: visible;
}

/* Overlay */
.exit-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 37, 64, 0.85);
  backdrop-filter: blur(4px);
}

/* Popup box */
.exit-popup-container {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 540px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 1;
}

.ironwifi-exit-popup.active .exit-popup-container {
  transform: scale(1);
}

/* Close button */
.exit-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #5a6270;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 2;
}

.exit-popup-close:hover {
  background: #f1f3f5;
  color: #0a2540;
  transform: rotate(90deg);
}

/* Content */
.exit-popup-content {
  padding: 48px 40px 40px;
  text-align: center;
}

/* Icon */
.exit-popup-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #00d4aa 0%, #007856 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: white;
  box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
}

.exit-popup-icon svg {
  width: 48px;
  height: 48px;
}

/* Headlines */
.exit-popup-headline {
  font-size: 28px;
  font-weight: 700;
  color: #0a2540;
  margin: 0 0 12px;
  line-height: 1.3;
}

.exit-popup-subheadline {
  font-size: 16px;
  color: #5a6270;
  margin: 0 0 32px;
  line-height: 1.5;
}

/* Benefits list */
.exit-popup-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.exit-popup-benefits li {
  font-size: 15px;
  color: #1a1a2e;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exit-popup-benefits li:last-child {
  border-bottom: none;
}

/* Actions */
.exit-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* CTA button */
.exit-popup-cta {
  display: block;
  background: linear-gradient(135deg, #00d4aa 0%, #007856 100%);
  color: white;
  padding: 16px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
  border: none;
  cursor: pointer;
}

.exit-popup-cta:hover {
  background: linear-gradient(135deg, #007856 0%, #005940 100%);
  box-shadow: 0 6px 16px rgba(0, 212, 170, 0.4);
  transform: translateY(-2px);
}

/* Dismiss button */
.exit-popup-dismiss {
  background: transparent;
  color: #5a6270;
  padding: 12px 24px;
  border: none;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.exit-popup-dismiss:hover {
  color: #0a2540;
  text-decoration: underline;
}

/* Guarantee text */
.exit-popup-guarantee {
  font-size: 13px;
  color: #5a6270;
  margin: 0;
  font-style: italic;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .exit-popup-container {
    width: 95%;
    border-radius: 12px;
  }

  .exit-popup-content {
    padding: 40px 24px 32px;
  }

  .exit-popup-headline {
    font-size: 24px;
  }

  .exit-popup-subheadline {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .exit-popup-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .exit-popup-icon svg {
    width: 36px;
    height: 36px;
  }

  .exit-popup-benefits {
    margin-bottom: 24px;
  }

  .exit-popup-benefits li {
    font-size: 14px;
    padding: 10px 0;
  }

  .exit-popup-cta {
    font-size: 16px;
    padding: 14px 24px;
  }

  .exit-popup-close {
    top: 12px;
    right: 12px;
    font-size: 28px;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .exit-popup-container {
    max-width: 480px;
  }

  .exit-popup-headline {
    font-size: 26px;
  }
}

/* Animation variants for A/B testing */
.ironwifi-exit-popup.slide-up .exit-popup-container {
  transform: translateY(100px) scale(0.9);
}

.ironwifi-exit-popup.active.slide-up .exit-popup-container {
  transform: translateY(0) scale(1);
}

.ironwifi-exit-popup.bounce .exit-popup-container {
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .ironwifi-exit-popup,
  .exit-popup-container,
  .exit-popup-close,
  .exit-popup-cta,
  .exit-popup-dismiss {
    transition: none;
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .exit-popup-container {
    border: 2px solid #0a2540;
  }

  .exit-popup-cta {
    border: 2px solid #00d4aa;
  }
}

/* Dark mode support (if site implements it) */
@media (prefers-color-scheme: dark) {
  .exit-popup-overlay {
    background: rgba(0, 0, 0, 0.9);
  }

  .exit-popup-container {
    background: #1a1a2e;
    color: #f8fafc;
  }

  .exit-popup-headline {
    color: white;
  }

  .exit-popup-subheadline,
  .exit-popup-guarantee {
    color: #cbd5e0;
  }

  .exit-popup-benefits li {
    color: #f8fafc;
    border-bottom-color: #2d3748;
  }

  .exit-popup-close {
    color: #cbd5e0;
  }

  .exit-popup-close:hover {
    background: #2d3748;
    color: white;
  }

  .exit-popup-dismiss {
    color: #cbd5e0;
  }

  .exit-popup-dismiss:hover {
    color: white;
  }
}
