/* Updated: 2026-04-09 - Subtle Corner Card Design */
.exit-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* No blocking overlay for more subtlety */
  pointer-events: none; /* Allow interaction with background */
  z-index: var(--z-exit-popup, 1003);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 30px;
  visibility: hidden;
}

.exit-popup-overlay.active {
  visibility: visible;
}

.exit-popup-container {
  pointer-events: auto; /* Re-enable interaction for the card */
  position: relative;
  max-width: 320px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 15px 45px rgba(0, 21, 72, 0.2);
  border: 1px solid rgba(8, 27, 64, 0.1);
  overflow: hidden;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

.exit-popup-overlay.active .exit-popup-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.exit-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 21, 72, 0.05);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
}

.exit-popup-close:hover {
  background: #ff4d4d;
  color: #fff;
  transform: rotate(90deg);
}

.exit-popup-close i {
  font-size: 0.9rem;
  color: #081B40;
}

.exit-popup-close:hover i {
  color: #fff;
}

.exit-popup-header {
  padding: 24px 20px 12px;
  text-align: left;
}

.exit-popup-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #081B40;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.exit-popup-subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: #4b5563;
  margin: 0;
  line-height: 1.4;
}

.exit-popup-content {
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.exit-popup-content img {
  max-width: 140px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.exit-popup-footer {
  padding: 16px 20px 24px;
  text-align: left;
}

.exit-popup-button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: #7ac019;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exit-popup-button:hover {
  background: #081B40;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(122, 192, 25, 0.25);
}

/* Dark theme overrides */
body.dark-theme .exit-popup-container {
  background: rgba(0, 21, 72, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
}

body.dark-theme .exit-popup-title {
  color: #ffffff;
}

body.dark-theme .exit-popup-subtitle {
  color: #94a3b8;
}

body.dark-theme .exit-popup-close {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .exit-popup-close i {
  color: #cbd5e1;
}

/* Responsive */
@media (max-width: 768px) {
  .exit-popup-overlay {
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3); /* Add subtle overlay on mobile for focus */
    pointer-events: auto;
  }
}
