/* =========================================================
   DuskBloom Email Popup CSS
   Warm amber/cream palette matching the storefront.
   ========================================================= */

/* ── Overlay (backdrop) ───────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 32, 0.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

/* ── Modal ────────────────────────────────────────────────── */
.popup-modal {
  background: var(--cream, #f9f3ea);
  border: 1px solid var(--accent-soft, #e8c9a4);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(44, 36, 32, 0.18);
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 540px) {
  .popup-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .popup-modal {
    border-radius: 20px 20px 0 0;
    padding: 2.5rem 1.75rem 2rem;
    max-width: 100%;
    transform: translateY(100%);
    border-bottom: none;
  }

  .popup-overlay.is-visible .popup-modal {
    transform: translateY(0);
  }
}

/* ── Close button ─────────────────────────────────────────── */
.popup-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--fg-light, #b5a898);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover { color: var(--fg, #2c2420); }

/* ── Label ─────────────────────────────────────────────────── */
.popup-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent, #c8874d);
  margin-bottom: 1rem;
}

/* ── Headline ──────────────────────────────────────────────── */
.popup-headline {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 400;
  color: var(--fg, #2c2420);
  line-height: 1.25;
  margin-bottom: 0.875rem;
}

.popup-headline em {
  font-style: italic;
  color: var(--accent, #c8874d);
}

/* ── Body copy ─────────────────────────────────────────────── */
.popup-body {
  font-size: 0.95rem;
  color: var(--fg-muted, #7a6e63);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* ── Lead magnet icon / visual ────────────────────────────── */
.popup-visual {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-warm, #f3ece2);
  border: 1px solid var(--accent-soft, #e8c9a4);
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.popup-visual-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow, rgba(200, 135, 77, 0.15));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #c8874d);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.popup-visual-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg, #2c2420);
  margin-bottom: 0.15rem;
}

.popup-visual-text span {
  font-size: 0.8rem;
  color: var(--fg-muted, #7a6e63);
}

/* ── Form ──────────────────────────────────────────────────── */
.popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.popup-email-row {
  display: flex;
  gap: 0.5rem;
}

.popup-email-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1px solid var(--accent-soft, #e8c9a4);
  border-radius: 8px;
  font-family: var(--sans, 'Outfit', -apple-system, sans-serif);
  font-size: 0.95rem;
  color: var(--fg, #2c2420);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.popup-email-input::placeholder {
  color: var(--fg-light, #b5a898);
}

.popup-email-input:focus {
  border-color: var(--accent, #c8874d);
}

.popup-submit {
  padding: 0.875rem 1.5rem;
  background: var(--accent, #c8874d);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: var(--sans, 'Outfit', -apple-system, sans-serif);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.popup-submit:hover {
  background: #b5713a;
  transform: translateY(-1px);
}

.popup-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Error message ─────────────────────────────────────────── */
.popup-error {
  font-size: 0.82rem;
  color: #b45309;
  padding: 0.5rem 0;
  display: none;
}

.popup-error.is-visible { display: block; }

/* ── Note / privacy ────────────────────────────────────────── */
.popup-note {
  font-size: 0.75rem;
  color: var(--fg-light, #b5a898);
  text-align: center;
  margin-top: 0.5rem;
}

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

.popup-success.is-visible { display: block; }

.popup-success-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-glow, rgba(200, 135, 77, 0.15));
  border: 2px solid var(--accent-soft, #e8c9a4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--accent, #c8874d);
  font-size: 1.4rem;
}

.popup-success h2 {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--fg, #2c2420);
  margin-bottom: 0.5rem;
}

.popup-success p {
  font-size: 0.9rem;
  color: var(--fg-muted, #7a6e63);
  margin-bottom: 1.5rem;
}

.popup-download-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--accent, #c8874d);
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
}

.popup-download-btn:hover {
  background: #b5713a;
  transform: translateY(-1px);
}

.popup-success-note {
  font-size: 0.75rem;
  color: var(--fg-light, #b5a898);
  margin-top: 0.75rem;
}

/* ── Form hide / success show ─────────────────────────────── */
#popup-form-wrap { display: flex; flex-direction: column; }
#popup-form-wrap.is-hidden { display: none; }

/* Mobile adjustments */
@media (max-width: 540px) {
  .popup-email-row {
    flex-direction: column;
  }

  .popup-submit {
    width: 100%;
  }
}

/* ── Sunset Springs Co overrides ──────────────────────────── */
/* Applied via .springs-cta / .springs-icon / .springs-download-btn */
.springs-cta {
  background: #2a9d8f;
}
.springs-cta:hover {
  background: #21867a;
  transform: translateY(-1px);
}
.springs-icon {
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%) !important;
  color: #f4a261 !important;
  font-size: 1.3rem;
  border: none !important;
}
.springs-download-btn {
  background: #2a9d8f;
}
.springs-download-btn:hover {
  background: #21867a;
}