/* ========================================
   Email Subscription Popup
   ======================================== */

.email-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.email-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.email-popup {
  background: #1a1a2e;
  border-radius: var(--radius-xl, 16px);
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  transform: scale(0.9) translateY(10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.email-popup-overlay.active .email-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.email-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.email-popup-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.email-popup-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, #00D4FF, #8B5CF6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-popup-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.email-popup h2 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.email-popup p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.email-popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-popup-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.email-popup-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.email-popup-input:focus {
  border-color: #00D4FF;
  background: rgba(255, 255, 255, 0.12);
}

.email-popup-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-md, 8px);
  background: linear-gradient(135deg, #00D4FF, #8B5CF6);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.email-popup-submit:hover {
  opacity: 0.9;
}

.email-popup-submit:active {
  transform: scale(0.98);
}

.email-popup-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-popup-error {
  color: #ff6b6b;
  font-size: 0.8rem;
  margin: 0;
  min-height: 1.2em;
}

/* Success state */
.email-popup-success {
  display: none;
  text-align: center;
  padding: 1rem 0;
}

.email-popup-success.show {
  display: block;
}

.email-popup-success .success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #10b981, #34d399);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-popup-success .success-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.email-popup-success h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.email-popup-success p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin: 0;
}

.email-popup-privacy {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  margin: 0.75rem 0 0;
}

/* Responsive */
@media (max-width: 480px) {
  .email-popup {
    padding: 2rem 1.5rem;
    margin: 0 0.5rem;
  }

  .email-popup h2 {
    font-size: 1.25rem;
  }
}
