/* Reusable waitlist modal — VistaCriativa.
 *
 * Drop-in interest capture for "coming soon" product pages. Pairs with
 * waitlist.js, which builds the DOM and posts to /api/waitlist. Styling leans on
 * the shared brand tokens (--vc-navy / --vc-gold) with hard fallbacks so the
 * widget looks right even on a page that doesn't define them.
 *
 * CSP note: all styling lives here (a 'self' stylesheet). The script sets only a
 * couple of class toggles, no inline <style>.
 */

.wl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 12, 22, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.wl-overlay.wl-open { display: flex; }

.wl-modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fffdf8;
  color: var(--vc-navy, #34233a);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(20, 12, 22, 0.45);
  padding: 30px 28px 26px;
  position: relative;
  font-family: var(--font-ui, "Figtree", system-ui, sans-serif);
  animation: wl-rise 0.22s ease-out;
}
@keyframes wl-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .wl-modal { animation: none; } }

.wl-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--vc-navy, #34233a);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
}
.wl-close:hover { opacity: 1; background: rgba(52, 35, 58, 0.08); }

.wl-title {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 6px 8px 0;
  font-weight: 600;
}
.wl-sub {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(52, 35, 58, 0.78);
}

.wl-field { margin-bottom: 12px; }
.wl-field label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: rgba(52, 35, 58, 0.7);
}
.wl-input,
.wl-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid rgba(52, 35, 58, 0.22);
  border-radius: 10px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--vc-navy, #34233a);
  background: #fff;
}
.wl-input:focus,
.wl-textarea:focus {
  outline: none;
  border-color: var(--vc-gold, #b08828);
  box-shadow: 0 0 0 3px rgba(176, 136, 40, 0.18);
}
.wl-textarea { min-height: 64px; resize: vertical; }

/* Honeypot: off-screen, never shown to humans, not announced to AT. */
.wl-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.wl-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--vc-gold, #b08828);
  color: #2a1c12;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.wl-submit:hover { filter: brightness(1.06); }
.wl-submit:disabled { opacity: 0.6; cursor: default; }

.wl-note {
  margin: 14px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(52, 35, 58, 0.55);
}

.wl-status {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  min-height: 1.2em;
}
.wl-status.wl-err { color: #b3261e; }
.wl-status.wl-ok { color: #1c7d3f; }

/* Success state: collapse the form, show the confirmation prominently. */
.wl-modal.wl-done .wl-field,
.wl-modal.wl-done .wl-submit,
.wl-modal.wl-done .wl-note,
.wl-modal.wl-done .wl-sub { display: none; }
.wl-modal.wl-done .wl-status.wl-ok {
  font-size: 1.05rem;
  margin-top: 4px;
}
