/* CSS variable defaults (fallback if script doesn't load) */
:root {
  --waitlist-primary-color: #4f46e5;
  --waitlist-primary-color-hover: #4338ca;
  --waitlist-text-color: #333;
  --waitlist-heading-color: #111;
  --waitlist-secondary-text-color: #666;
  --waitlist-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --waitlist-border-radius: 0.5rem;
  --waitlist-button-border-radius: 0.5rem;
  --waitlist-button-padding: 0.75rem 1.5rem;
  --waitlist-font-weight: 500;
  --waitlist-heading-font-weight: 700;
  --waitlist-line-height: 1.6;
}

.waitlist-form {
  max-width: 480px;
  margin: 0 auto;
  font-family: var(--waitlist-font-family);
}

.waitlist-form__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.waitlist-form__input-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.waitlist-form__input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--waitlist-border-radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: var(--waitlist-text-color);
}

.waitlist-form__input:focus {
  border-color: var(--waitlist-primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.waitlist-form__button {
  padding: var(--waitlist-button-padding);
  font-size: 1rem;
  font-weight: var(--waitlist-font-weight);
  color: white;
  background-color: var(--waitlist-primary-color);
  border: none;
  border-radius: var(--waitlist-button-border-radius);
  cursor: pointer;
  transition: background-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

.waitlist-form__button:hover:not(:disabled) {
  background-color: var(--waitlist-primary-color-hover);
}

.waitlist-form__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.waitlist-form__spinner {
  width: 20px;
  height: 20px;
  animation: waitlist-spin 1s linear infinite;
}

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

.waitlist-form__turnstile {
  margin-top: 0.5rem;
}

.waitlist-form__message {
  font-size: 0.875rem;
  margin: 0;
  min-height: 1.25rem;
}

.waitlist-form__message--success {
  color: #059669;
}

.waitlist-form__message--error {
  color: #dc2626;
}

.waitlist-form__message--info {
  color: #2563eb;
}

.waitlist-form__consent {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.waitlist-form__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--waitlist-secondary-text-color);
  line-height: 1.5;
}

.waitlist-form__consent-checkbox {
  margin-top: 0.125rem;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--waitlist-primary-color);
}

.waitlist-form__consent-text {
  flex: 1;
}

.waitlist-form__privacy-link {
  color: var(--waitlist-primary-color);
  text-decoration: underline;
  transition: opacity 0.15s;
}

.waitlist-form__privacy-link:hover {
  opacity: 0.8;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .waitlist-form__input {
    background-color: #1f2937;
    border-color: #374151;
    color: #f9fafb;
  }
  
  .waitlist-form__input:focus {
    border-color: var(--waitlist-primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
  }
  
  .waitlist-form__consent-label {
    color: #d1d5db;
  }
}

