/* Tahfidh Institute Newsletter Popup
   Headings: Playfair Display | Body: Inter
   Palette: deep emerald + warm gold on cream, matching the main site. */

#tnp-overlay, #tnp-overlay * {
  box-sizing: border-box !important;
}

#tnp-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(8, 20, 17, 0.62) !important;
  backdrop-filter: blur(4px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  padding: 20px !important;
}

#tnp-overlay.tnp-visible {
  opacity: 1;
  visibility: visible;
}

#tnp-overlay .tnp-popup {
  position: relative !important;
  width: 100% !important;
  max-width: 440px !important;
  background: #fdfaf3 !important;
  border-radius: 20px !important;
  padding: 46px 38px 34px !important;
  text-align: center !important;
  box-shadow: 0 30px 70px rgba(8, 20, 17, 0.4) !important;
  border: 1px solid rgba(201, 162, 75, 0.3) !important;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#tnp-overlay.tnp-visible .tnp-popup {
  transform: translateY(0) scale(1);
}

#tnp-overlay .tnp-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  background: #f1ece0 !important;
  color: #0c4a3e !important;
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

#tnp-overlay .tnp-close:hover {
  background: #f4e8c9 !important;
  transform: rotate(90deg);
}

#tnp-overlay .tnp-motif {
  width: 60px !important;
  height: 60px !important;
  margin: 0 auto 16px !important;
  color: #c9a24b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #e7f2ee !important;
  border-radius: 50% !important;
}

#tnp-overlay .tnp-eyebrow {
  margin: 0 0 6px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

#tnp-overlay .tnp-heading {
  margin: 0 0 14px !important;
  font-family: 'Playfair Display', serif !important;
  font-weight: 700 !important;
  font-size: 27px !important;
  line-height: 1.3 !important;
}

#tnp-overlay .tnp-subheading {
  margin: 0 0 28px !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  opacity: 0.82;
}

#tnp-overlay .tnp-form {
  margin: 0 !important;
}

#tnp-overlay .tnp-field-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 11px !important;
}

#tnp-overlay .tnp-input {
  width: 100% !important;
  padding: 13px 16px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(12, 74, 62, 0.22) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  height: auto !important;
  box-shadow: none !important;
}

#tnp-overlay .tnp-input:focus {
  border-color: #12604f !important;
  box-shadow: 0 0 0 3px rgba(18, 96, 79, 0.15) !important;
}

#tnp-overlay .tnp-submit {
  width: 100% !important;
  padding: 13px 20px !important;
  border-radius: 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: 0.01em !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: filter 0.2s ease, transform 0.15s ease;
  border: none !important;
  user-select: none;
}

#tnp-overlay .tnp-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

#tnp-overlay .tnp-submit.tnp-disabled {
  opacity: 0.6 !important;
  cursor: not-allowed;
  transform: none;
}

#tnp-overlay .tnp-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

#tnp-overlay .tnp-message {
  min-height: 20px !important;
  margin: 12px 0 0 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

#tnp-overlay .tnp-message.tnp-success {
  color: #0c4a3e !important;
}

#tnp-overlay .tnp-message.tnp-error {
  color: #b3261e !important;
}

body.tnp-no-scroll {
  overflow: hidden !important;
}

@media (max-width: 480px) {
  #tnp-overlay .tnp-popup {
    padding: 38px 24px 26px !important;
  }
  #tnp-overlay .tnp-heading {
    font-size: 22px !important;
  }
}
