/* Tau Balance marketing: waitlist modal (portable CSS, no app dependency) */

.tb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: var(--tb-brand, #0284c7);
  color: #fff;
}

.tb-cta:hover {
  background: var(--tb-brand-strong, #0369a1);
  color: #fff;
}

.tb-cta--hero {
  background: #fff;
  color: #0c4a6e;
}

.tb-cta--hero:hover {
  background: #f0f9ff;
  color: #0c4a6e;
}

.tb-cta--secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.tb-cta--block {
  width: 100%;
}

.tb-modal[hidden] {
  display: none !important;
}

.tb-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  cursor: pointer;
}

.tb-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow: auto;
  background: var(--tb-elevated, #fff);
  color: var(--tb-text, #0f172a);
  border-radius: 0.75rem;
  border: 1px solid var(--tb-border, #e2e8f0);
}

.tb-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--tb-border, #e2e8f0);
}

.tb-modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--tb-text, inherit);
}

.tb-modal__close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--tb-text-muted, #5a6779);
}

.tb-modal__body {
  padding: 1.25rem;
}

.tb-modal__lead {
  margin: 0 0 1rem;
  color: var(--tb-text-secondary, #334155);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.tb-field {
  margin-bottom: 0.9rem;
}

.tb-field label,
.tb-field legend {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tb-text, inherit);
}

.tb-field input[type="email"],
.tb-field input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 0.375rem;
  font-size: 1rem;
  background: var(--tb-elevated, #fff);
  color: var(--tb-text, #0f172a);
}

.tb-radio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--tb-text-secondary, inherit);
}

.tb-form-message {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}

.tb-form-message.is-error {
  color: #b91c1c;
}

.tb-form-message.is-ok {
  color: #047857;
}

.tb-waitlist-success {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.tb-waitlist-success h3 {
  margin: 0 0 0.5rem;
  color: var(--tb-text, inherit);
}

@media (prefers-color-scheme: dark) {
  .tb-form-message.is-error {
    color: #fca5a5;
  }

  .tb-form-message.is-ok {
    color: #6ee7b7;
  }

  .tb-field input[type="email"],
  .tb-field input[type="text"] {
    background: var(--tb-subtle, #1e293b);
    border-color: var(--tb-border, #475569);
    color: var(--tb-text, #f1f5f9);
  }
}
