/* Modern Glassmorphic Interactive Newsletter Modal */
:root {
  --gold-primary: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --gold-glow-weak: rgba(212, 175, 55, 0.1);
  --bg-dark: rgba(8, 8, 8, 0.85);
  --border-color: rgba(212, 175, 55, 0.2);
  --text-white: #f5f5f7;
  --text-stone: #d4d4d8;
}

/* Modal Overlay */
.newsletter-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
  pointer-events: none;
}

.newsletter-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modal Box */
.newsletter-modal-content {
  position: relative;
  width: 90%;
  max-width: 480px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px 32px 32px 32px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.8),
    0 0 40px var(--gold-glow-weak);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
}

.newsletter-modal-overlay.active .newsletter-modal-content {
  transform: translateY(0) scale(1);
}

.newsletter-modal-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Close Button */
.newsletter-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--text-stone);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 0;
}

.newsletter-close-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
  color: #fff;
  transform: rotate(90deg);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Header Section */
.newsletter-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 28px;
}

/* Interactive Lock Icon */
.newsletter-icon-container {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  color: var(--text-stone);
  transition: all 0.5s ease;
}

.newsletter-lock-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.4s ease, color 0.4s ease;
}

#lock-shackle {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 17px 11px;
  transform-box: view-box;
}

/* Valid input state for icon */
.email-valid .newsletter-icon-container {
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px var(--gold-glow);
}

.email-valid #lock-shackle {
  transform: rotate(30deg);
}

/* Pulsing Ring */
.newsletter-pulse-ring {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 1px solid var(--gold-primary);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.email-valid .newsletter-pulse-ring {
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Typography */
.newsletter-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.3em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.newsletter-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9) !important;
  line-height: 1.6;
  font-weight: 400;
  max-width: 380px;
  margin: 0 auto;
}

/* Interactive Input */
.newsletter-form {
  position: relative;
  z-index: 1;
}

.newsletter-input-wrapper {
  position: relative;
  margin-bottom: 16px;
  border-radius: 30px;
  overflow: visible;
}

.newsletter-form input[type="email"] {
  width: 100%;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  color: #fff;
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.05em;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.newsletter-form input[type="email"]:focus {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.02);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.05);
}

.email-valid .newsletter-form input[type="email"] {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* Input Glow Overlay */
.newsletter-input-glow {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  pointer-events: none;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.newsletter-form input[type="email"]:focus + .newsletter-input-glow {
  border-color: rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.1) inset;
}

/* Sci-fi Progress / Loading Bar */
.newsletter-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1px;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.newsletter-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.5), var(--gold-primary));
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
  box-shadow: 0 0 8px var(--gold-primary);
}

.email-valid .newsletter-progress-fill {
  background: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-primary);
}

/* Feedback Message */
.newsletter-feedback {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7) !important;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  min-height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.newsletter-feedback.active {
  color: #fca5a5; /* red-300 */
}

.email-valid ~ .newsletter-feedback {
  color: var(--gold-primary);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Submit Button */
.newsletter-submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
}

.newsletter-submit-btn:not(:disabled) {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #000;
  cursor: pointer;
  box-shadow: 0 0 20px var(--gold-glow);
}

.newsletter-submit-btn:not(:disabled):hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.newsletter-submit-btn svg.arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.newsletter-submit-btn:not(:disabled):hover svg.arrow-icon {
  transform: translateX(4px);
}

/* Tech Info Footer */
.newsletter-tech-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-t: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.15em;
}

/* Particles Container */
.newsletter-input-particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}

.gold-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--gold-primary) 70%, transparent 100%);
  box-shadow: 0 0 8px var(--gold-primary);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: particle-fly 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes particle-fly {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0);
    opacity: 0;
  }
}

/* Success State Styles */
.newsletter-success-state {
  text-align: center;
  padding: 20px 0;
  animation: success-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes success-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-primary);
  animation: laser-scan 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 5;
}

@keyframes laser-scan {
  0% {
    top: 0%;
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.success-checkmark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px auto;
  color: var(--gold-primary);
  filter: drop-shadow(0 0 10px var(--gold-glow));
}

/* GDPR Marketing Consent styles */
.newsletter-consent-wrapper {
  margin-bottom: 20px;
  text-align: left;
}

.newsletter-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.newsletter-consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: rgba(255, 255, 255, 0.02);
  margin-top: 2px;
}

.newsletter-consent-label:hover .custom-checkbox {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

.newsletter-consent-label input[type="checkbox"]:checked + .custom-checkbox {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.custom-checkbox::after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.newsletter-consent-label input[type="checkbox"]:checked + .custom-checkbox::after {
  display: block;
}

.consent-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8) !important;
  line-height: 1.5;
  font-weight: 400;
}

.policy-link {
  color: var(--gold-primary);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.policy-link:hover {
  color: #fff;
}

/* Cursor overrides when newsletter modal is active */
.newsletter-modal-overlay {
  cursor: default !important;
}

.newsletter-modal-content, 
.newsletter-modal-content * {
  cursor: default !important;
}

.newsletter-form input[type="email"] {
  cursor: text !important;
}

.newsletter-close-btn,
.newsletter-submit-btn,
.newsletter-submit-btn *,
.newsletter-consent-label,
.newsletter-consent-label * {
  cursor: pointer !important;
}

/* Inline Trigger Pill Button */
.newsletter-pill-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  padding: 14px 36px;
  border-radius: 50px; /* pill shape */
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  pointer-events: auto;
}

.newsletter-pill-btn:hover {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 20px var(--gold-glow);
  transform: translateY(-2px);
}

.newsletter-pill-btn:active {
  transform: translateY(0);
}

/* Already Subscribed Toast */
.subscribed-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--gold-primary);
  border-radius: 30px;
  padding: 14px 28px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--gold-glow-weak);
  z-index: 20000;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease, visibility 0.5s;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  width: max-content;
  max-width: 90%;
  box-sizing: border-box;
}

.subscribed-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.subscribed-toast svg {
  width: 16px;
  height: 16px;
  color: var(--gold-primary);
  filter: drop-shadow(0 0 4px var(--gold-glow));
  flex-shrink: 0;
}

