/**
 * WAITLIST MODAL
 * Pre-launch email capture with Turnstile verification
 */

/**
 * LIGHTBOX VENUE MODAL
 * Auto-opens on corporate + celebrate pages to surface venue partnership
 */

/* ==========================================
   LIGHTBOX MODAL OVERLAY
   ========================================== */

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  pointer-events: none;
  visibility: hidden;
}

.lightbox-modal[hidden] {
  display: none;
}

.lightbox-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.lightbox-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 700ms ease;
}

.lightbox-modal.is-open .lightbox-modal-backdrop {
  opacity: 1;
}

/* ==========================================
   LIGHTBOX MODAL CONTENT CARD
   ========================================== */

.lightbox-modal-content {
  position: relative;
  z-index: 1;
  background: #d9ff00; /* sRGB fallback */
  background: color(display-p3 0.882 1 0); /* P3 yellow-green */
  border-radius: var(--radius-xl);
  padding: 4rem 3rem 3.5rem;
  max-width: 510px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.lightbox-modal.is-open .lightbox-modal-content {
  opacity: 1;
  transform: scale(1);
}

/* Close button — outlined circle with X */
.lightbox-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #000000;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  transition: opacity var(--transition-fast);
  padding: 0;
}

.lightbox-modal-close:hover {
  opacity: 0.5;
}

/* ==========================================
   LIGHTBOX MODAL BODY
   ========================================== */

.lightbox-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* "CURRENTLY HOSTED BY" — Graphik Medium, uppercase, 2px larger than body text */
.lightbox-modal-label {
  font-family: 'Graphik', sans-serif;
  font-weight: 500;
  font-size: calc(1.3rem + 2px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000000;
  margin: 0 0 2rem;
}

/* Lightbox wordmark SVG */
.lightbox-modal-logo {
  display: block;
  width: 90%;
  height: auto;
  margin: 0 auto 2.5rem;
}

/* Body text — Graphik Medium */
.lightbox-modal-text {
  font-family: 'Graphik', sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: #000000;
  line-height: 1.4;
  margin: 0 0 2rem;
}

/* Address — Graphik Semibold */
.lightbox-modal-address {
  font-family: 'Graphik', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: #000000;
  line-height: 1.55;
  font-style: normal;
  margin: 0;
}

@media (max-width: 640px) {
  .lightbox-modal {
    padding: var(--space-4);
  }

  .lightbox-modal-content {
    padding: 3.5rem 1.5rem 2rem;
  }

  .lightbox-modal-close {
    width: 44px;
    height: 44px;
    top: 0.65rem;
    right: 0.65rem;
  }

  .lightbox-modal-text,
  .lightbox-modal-address {
    font-size: 1.15rem;
  }
}

/* ==========================================
   MODAL OVERLAY
   ========================================== */

.waitlist-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  pointer-events: none;
  visibility: hidden;
}

.waitlist-modal[hidden] {
  display: none;
}

.waitlist-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* Backdrop with blur effect */
.waitlist-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 700ms ease;
}

.waitlist-modal.is-open .waitlist-backdrop {
  opacity: 1;
}

/* ==========================================
   MODAL CONTENT CARD
   ========================================== */

.waitlist-content {
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.waitlist-modal.is-open .waitlist-content {
  opacity: 1;
  transform: scale(1);
}

/* Close button */
.waitlist-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  padding: 0;
}

.waitlist-close:hover {
  opacity: 0.5;
}

/* ==========================================
   MODAL BODY
   ========================================== */

.waitlist-body {
  text-align: center;
}

/* "SPRING 2026" — Graphik Medium, uppercase */
.waitlist-date {
  font-family: 'Graphik', sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #000000;
  margin: 0;
}

/* "New Location" — Kleber, large */
.waitlist-headline {
  font-family: var(--font-display);
  font-size: 5.2rem;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1;
  font-feature-settings:
    'ss03' 1,
    'ss07' 1;
  white-space: nowrap;
}

/* "Opening Soon!" — Kleber, stroke outline, white fill */
.waitlist-outline {
  font-family: var(--font-display);
  font-size: 2.4rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: transparent;
  -webkit-text-stroke: 1px #000000;
  paint-order: stroke fill;
  margin: 0 0 1rem;
  line-height: 1.1;
  font-feature-settings:
    'ss03' 1,
    'ss07' 1;
}

/* Bowery render image */
.waitlist-render {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}

/* Body text — Graphik Medium */
.waitlist-subtitle {
  font-family: 'Graphik', sans-serif;
  font-weight: 500;
  font-size: var(--text-base);
  color: #000000;
  margin: 0 0.75rem 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ==========================================
   FORM — stacked input + button
   ========================================== */

.waitlist-form {
  margin-top: 1.25rem;
}

/* Rounded outline container for input + button */
.waitlist-form-fields {
  border: 1.5px solid #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.waitlist-input {
  display: block;
  width: 100%;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: #000000;
  background: #ffffff;
  border: none;
  outline: none;
  box-sizing: border-box;
}

.waitlist-input:focus {
  background: #ffffff;
}

.waitlist-input::placeholder {
  color: #000000;
}

.waitlist-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.4rem 1.75rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-on-accent);
  background: #d9ff00; /* sRGB fallback */
  background: color(display-p3 0.882 1 0); /* P3 yellow-green */
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-feature-settings:
    'ss03' 1,
    'ss07' 1;
}

.waitlist-submit:hover:not(:disabled) {
  background: #c8ee00; /* sRGB fallback */
  background: color(display-p3 0.82 0.94 0); /* P3 hover */
}

.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Submit button states — use [hidden] to respect HTML hidden attribute */
.waitlist-submit-text,
.waitlist-submit-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.waitlist-submit-text[hidden],
.waitlist-submit-loading[hidden] {
  display: none;
}

.waitlist-arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Spinner */
.waitlist-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-on-accent);
  border-top-color: transparent;
  border-radius: var(--radius-full);
  animation: waitlist-spin 0.8s linear infinite;
}

@keyframes waitlist-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   TURNSTILE CONTAINER
   ========================================== */

.turnstile-container {
  display: flex;
  justify-content: center;
}

/* ==========================================
   FEEDBACK MESSAGES
   ========================================== */

.waitlist-suggestion {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: #000000;
  margin-top: var(--space-2);
  text-align: left;
}

.waitlist-suggestion a {
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
}

.waitlist-suggestion a:hover {
  color: #004499;
}

.waitlist-error {
  font-family: 'Graphik', sans-serif;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--error);
  margin-top: var(--space-2);
  padding-left: 1.75rem;
  text-align: left;
}

/* ==========================================
   SUCCESS STATE
   ========================================== */

.waitlist-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  border-radius: var(--radius-full);
  line-height: 1;
  padding-top: 6px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
  .waitlist-modal {
    padding: var(--space-4);
  }

  .waitlist-content {
    padding: var(--space-6) var(--space-5);
  }

  .waitlist-headline {
    font-size: 3.9rem;
  }

  .waitlist-outline {
    font-size: 1.9rem;
  }

  .waitlist-close {
    top: var(--space-4);
    right: var(--space-4);
  }
}
