/* Email Popup Styles */
#email-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#email-popup.show {
  opacity: 1;
  visibility: visible;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 90%;
  padding: 40px 36px;
  animation: slideUp 0.35s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -42%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.popup-close:hover {
  color: #374151;
  background: #f3f4f6;
}

.popup-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1;
}

.popup-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px 0;
  text-align: center;
  line-height: 1.25;
}

.popup-inner > p {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 22px 0;
  text-align: center;
}

.popup-email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-email-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.popup-email-input:focus {
  outline: none;
  border-color: #d946ef;
}

.popup-email-form button[type="submit"] {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #d946ef 0%, #9333ea 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.popup-email-form button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 70, 239, 0.4);
}

.popup-email-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.popup-fine-print {
  font-size: 12px !important;
  color: #9ca3af !important;
  text-align: center;
  margin: 4px 0 0 0 !important;
}

/* Success state — discount code display */
.popup-code-box {
  background: linear-gradient(135deg, #fdf4ff 0%, #f3e8ff 100%);
  border: 2px dashed #d946ef;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
}

.popup-code-label {
  font-size: 13px !important;
  color: #7c3aed !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px 0 !important;
}

.popup-code-value {
  font-family: 'Courier New', monospace;
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.popup-copy-btn {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, #d946ef 0%, #9333ea 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.popup-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 70, 239, 0.35);
}

.popup-code-instructions {
  font-size: 14px !important;
  color: #6b7280 !important;
  text-align: center;
  margin: 0 !important;
}

.popup-message {
  font-size: 14px;
  text-align: center;
  margin: 10px 0 0 0 !important;
  min-height: 18px;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .popup-content {
    padding: 32px 20px;
    width: 92%;
  }

  .popup-inner h2 {
    font-size: 22px;
  }

  .popup-inner > p {
    font-size: 14px;
  }

  .popup-email-input,
  .popup-email-form button[type="submit"] {
    font-size: 15px;
  }

  .popup-code-value {
    font-size: 22px;
  }
}
