/* ============================================
   DropshipFeed — Newsletter Popup
   Centered modal with backdrop. Matches site
   editorial aesthetic. Lives above everything else.
   ============================================ */

.df-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 13, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease;
}

.df-popup-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.df-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-card, #FDFBF7);
  border-radius: 14px;
  box-shadow:
    0 24px 60px rgba(26, 24, 22, 0.22),
    0 0 0 1px rgba(26, 24, 22, 0.04);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease, transform .32s cubic-bezier(0.2, 0.8, 0.3, 1);
  font-family: var(--font-body, -apple-system, sans-serif);
  color: var(--text, #1A1816);
}

.df-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Close button */
.df-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-muted, #6B6560);
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, color .15s ease;
  z-index: 2;
}

.df-popup-close:hover,
.df-popup-close:focus {
  background: var(--accent-soft, #F4E4DB);
  color: var(--accent, #D94F2E);
  outline: none;
}

.df-popup-close svg {
  width: 18px;
  height: 18px;
}

/* Top banner strip */
.df-popup-banner {
  background: var(--text, #1A1816);
  color: var(--bg, #F5F0E8);
  padding: 10px 24px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-radius: 14px 14px 0 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.df-popup-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #D94F2E);
  animation: df-pulse 1.6s ease-in-out infinite;
}

@keyframes df-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.df-popup-body {
  padding: 32px 32px 28px;
}

.df-popup-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent, #D94F2E);
  margin-bottom: 14px;
}

.df-popup-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text, #1A1816);
}

.df-popup-title em {
  font-style: italic;
  color: var(--accent, #D94F2E);
}

.df-popup-subtitle {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted, #6B6560);
  margin-bottom: 22px;
}

.df-popup-bullets {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.df-popup-bullets li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text, #1A1816);
}

.df-popup-bullets li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent, #D94F2E);
  margin-top: 2px;
}

/* Form */
.df-popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.df-popup-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body, sans-serif);
  font-size: 16px;
  color: var(--text, #1A1816);
  background: var(--bg, #F5F0E8);
  border: 1px solid var(--border-strong, #C9BFB0);
  border-radius: 8px;
  transition: border-color .2s ease, box-shadow .2s ease;
  /* prevent iOS zoom on focus */
  -webkit-appearance: none;
  appearance: none;
}

.df-popup-input:focus {
  outline: none;
  border-color: var(--accent, #D94F2E);
  box-shadow: 0 0 0 3px rgba(217, 79, 46, 0.16);
}

.df-popup-input::placeholder {
  color: var(--text-subtle, #9A938B);
}

.df-popup-button {
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-body, sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--bg, #F5F0E8);
  background: var(--accent, #D94F2E);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  letter-spacing: 0.01em;
}

.df-popup-button:hover:not(:disabled) {
  background: var(--accent-dark, #B33E20);
}

.df-popup-button:active:not(:disabled) {
  transform: translateY(1px);
}

.df-popup-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.df-popup-status {
  min-height: 20px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 4px;
  text-align: center;
}

.df-popup-status.error { color: #C4342A; }
.df-popup-status.success { color: #2F7A52; font-weight: 500; }

.df-popup-microcopy {
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-subtle, #9A938B);
}

.df-popup-microcopy a,
.df-popup-microcopy button {
  color: var(--text-muted, #6B6560);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.df-popup-microcopy a:hover,
.df-popup-microcopy button:hover {
  color: var(--accent, #D94F2E);
}

/* Success state — replaces body content */
.df-popup-success {
  padding: 44px 32px 40px;
  text-align: center;
}

.df-popup-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft, #F4E4DB);
  color: var(--accent, #D94F2E);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.df-popup-success-icon svg {
  width: 26px;
  height: 26px;
}

.df-popup-success-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.df-popup-success-body {
  color: var(--text-muted, #6B6560);
  font-size: 15.5px;
  line-height: 1.55;
}

/* Mobile tuning */
@media (max-width: 540px) {
  .df-popup {
    width: calc(100vw - 20px);
    border-radius: 12px;
  }
  .df-popup-banner {
    border-radius: 12px 12px 0 0;
    padding: 9px 16px;
    font-size: 10.5px;
  }
  .df-popup-body {
    padding: 28px 24px 24px;
  }
  .df-popup-title {
    font-size: 28px;
  }
  .df-popup-subtitle {
    font-size: 15px;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .df-popup-backdrop,
  .df-popup {
    transition: opacity .1s ease;
  }
  .df-popup {
    transform: translate(-50%, -50%) scale(1) !important;
  }
  .df-popup-banner-dot {
    animation: none;
  }
}

/* Prevent background scroll while popup is open */
body.df-popup-open {
  overflow: hidden;
}
