/* =============================================================================
 * OberBuilt Analysis Engine — [oae_waitlist] public signup card
 * -----------------------------------------------------------------------------
 * Restyled DARK on 2026-10-13 (FE-09, visual audit; owner default D5 = A).
 * The marketing site moved to a dark theme (body #0B1620, cyan accent), and
 * the 2026-09-13 light card keyed on the old child theme's --ob-* tokens now
 * floated as a white box on a dark page, with every var(--ob-*) resolving to
 * its fallback because the new theme defines no --ob-* names at all.
 *
 * SOURCE OF TRUTH: the plugin's OWN tokens (assets/css/tokens.css, --oae-*),
 * which already match the new site (ink #0B1620, cyan-500 #00B8D4). Never key
 * this file on a theme's token names again: the theme can rename them and the
 * plugin would not know. Every var() carries the tokens.css value as its
 * fallback so the card renders the same if tokens.css ever fails to load.
 *
 * CONTRAST (measured against the card surface #142231):
 *   fg-1 #EAF1F8 body/title ........ ~14:1
 *   fg-2 #B8C5D2 secondary text .... ~9:1
 *   cyan #00B8D4 links ............. 6.8:1
 *   danger #FF572D error text ...... 5.1:1
 *   control border #657D96 ......... 3.8:1 (SC 1.4.11, 3:1 floor)
 *   button: #062029 on #00B8D4 ..... ~8:1
 *
 * SPECIFICITY: every descendant rule is `.oae-waitlist .oae-waitlist__foo`
 * (0,2,0) on purpose. The host page can carry (0,1,1) rules against bare
 * inputs (tokens.css `[class*=" oae-"] input`, a theme's `input[type=email]`),
 * and a bare single-class rule loses to both. Do not "simplify" them.
 * ============================================================================= */

.oae-waitlist {
  box-sizing: border-box;
  width: 100%;
  max-width: 40rem;
  margin: var(--oae-spacing-lg, 24px) 0;
  padding: var(--oae-spacing-xl, 32px);
  background: var(--oae-color-surface, #142231);
  color: var(--oae-fg-1, #EAF1F8);
  border: 1px solid var(--oae-border, #243648);
  border-top: 2px solid var(--oae-color-primary, #00B8D4);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-family: var(--oae-font-body, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: var(--oae-text-body, 16px);
  line-height: 1.5;
  /* Native control chrome (textarea resize handle, autofill) stays dark. */
  color-scheme: dark;
}

.oae-waitlist *,
.oae-waitlist *::before,
.oae-waitlist *::after {
  box-sizing: border-box;
}

/* ---- Headings and lead copy (intro, landing cards, success, paused) ---- */

.oae-waitlist .oae-waitlist__title {
  margin: 0 0 var(--oae-spacing-sm, 8px);
  color: var(--oae-fg-1, #EAF1F8);
  font-family: var(--oae-font-heading, "Saira", "IBM Plex Sans", system-ui, sans-serif);
  font-size: var(--oae-text-heading, 20px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.oae-waitlist .oae-waitlist__title:focus {
  outline: none;
}

.oae-waitlist .oae-waitlist__lede {
  margin: 0 0 var(--oae-spacing-sm, 8px);
  color: var(--oae-fg-2, #B8C5D2);
  font-size: var(--oae-text-body, 16px);
  line-height: 1.55;
}

.oae-waitlist .oae-waitlist__intro {
  margin-bottom: var(--oae-spacing-lg, 24px);
  padding-bottom: var(--oae-spacing-lg, 24px);
  border-bottom: 1px solid var(--oae-border, #243648);
}

.oae-waitlist .oae-waitlist__intro .oae-waitlist__lede:last-child,
.oae-waitlist .oae-waitlist__state .oae-waitlist__lede:last-child {
  margin-bottom: 0;
}

.oae-waitlist .oae-waitlist__notice {
  margin: 0;
  color: var(--oae-fg-2, #B8C5D2);
}

.oae-waitlist .oae-waitlist__action-form {
  margin-top: var(--oae-spacing-lg, 24px);
}

/* ---- Form fields ---- */

.oae-waitlist .oae-waitlist__field {
  margin-bottom: var(--oae-spacing-md, 16px);
}

.oae-waitlist .oae-waitlist__label {
  display: block;
  margin-bottom: 6px;
  color: var(--oae-fg-1, #EAF1F8);
  font-size: var(--oae-text-label, 13px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.oae-waitlist .oae-waitlist__hint {
  margin: 6px 0 0;
  color: var(--oae-fg-2, #B8C5D2);
  font-size: var(--oae-text-label, 13px);
  line-height: 1.45;
}

.oae-waitlist .oae-waitlist__input,
.oae-waitlist .oae-waitlist__textarea {
  appearance: none;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  background: var(--oae-color-bg, #0B1620);
  color: var(--oae-fg-1, #EAF1F8);
  /* 3:1 control boundary (SC 1.4.11); --oae-border is decorative only. */
  border: 1px solid var(--oae-border-control, #657D96);
  border-radius: var(--oae-radius, 6px);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--oae-text-body, 16px);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.oae-waitlist .oae-waitlist__input:hover,
.oae-waitlist .oae-waitlist__textarea:hover {
  border-color: var(--oae-border-control-strong, #8AA0B8);
}

.oae-waitlist .oae-waitlist__input:focus-visible,
.oae-waitlist .oae-waitlist__textarea:focus-visible {
  border-color: var(--oae-color-primary, #00B8D4);
  outline: 2px solid var(--oae-color-primary, #00B8D4);
  outline-offset: 2px;
}

/* FE-14: an invalid field is marked in colour AND by aria-invalid + the
   linked error text, never by colour alone. */
.oae-waitlist .oae-waitlist__input[aria-invalid="true"],
.oae-waitlist .oae-waitlist__textarea[aria-invalid="true"] {
  border-color: var(--oae-color-danger, #FF572D);
}

.oae-waitlist .oae-waitlist__textarea {
  min-height: 96px;
  resize: vertical;
}

.oae-waitlist .oae-waitlist__note-count {
  margin: 4px 0 0;
  color: var(--oae-fg-2, #B8C5D2);
  font-size: var(--oae-text-label, 13px);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.oae-waitlist .oae-waitlist__error {
  display: block;
  margin: 0 0 var(--oae-spacing-md, 16px);
  color: var(--oae-color-danger, #FF572D);
  font-size: var(--oae-text-label, 13px);
  font-weight: 600;
}

/* Honeypot: off-screen and clipped, never display:none (a bot that skips
   display:none content would skip the trap). */
.oae-waitlist .oae-waitlist__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.oae-waitlist .oae-waitlist__consent {
  margin: var(--oae-spacing-md, 16px) 0 var(--oae-spacing-lg, 24px);
  color: var(--oae-fg-2, #B8C5D2);
  font-size: var(--oae-text-label, 13px);
  line-height: 1.55;
}

/* CASL sender line sits directly under the consent sentence. */
.oae-waitlist .oae-waitlist__consent:has(+ .oae-waitlist__sender) {
  margin-bottom: var(--oae-spacing-xs, 6px);
}

.oae-waitlist .oae-waitlist__sender {
  margin: 0 0 var(--oae-spacing-lg, 24px);
  color: var(--oae-fg-3, #8A99A8);
  font-size: var(--oae-text-label, 13px);
  line-height: 1.5;
}

.oae-waitlist .oae-waitlist__consent a,
.oae-waitlist .oae-waitlist__rejoin a {
  color: var(--oae-color-primary, #00B8D4);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.oae-waitlist .oae-waitlist__consent a:focus-visible,
.oae-waitlist .oae-waitlist__rejoin a:focus-visible {
  outline: 2px solid var(--oae-color-primary, #00B8D4);
  outline-offset: 2px;
}

/* ---- Buttons ---- */

.oae-waitlist .oae-waitlist__submit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 12px 24px;
  background: var(--oae-color-primary, #00B8D4);
  color: var(--oae-fg-on-primary, #062029);
  border: 1px solid var(--oae-color-primary, #00B8D4);
  border-radius: var(--oae-radius, 6px);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--oae-text-body, 16px);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.oae-waitlist .oae-waitlist__submit:hover {
  background: #2DD4E8;
  border-color: #2DD4E8;
}

.oae-waitlist .oae-waitlist__submit:focus-visible {
  outline: 2px solid var(--oae-color-primary, #00B8D4);
  outline-offset: 3px;
}

/* Unsubscribe is a deliberate, low-key action: outlined, not filled. */
.oae-waitlist .oae-waitlist__submit--quiet {
  background: transparent;
  color: var(--oae-fg-1, #EAF1F8);
  border-color: var(--oae-border-control-strong, #8AA0B8);
}

.oae-waitlist .oae-waitlist__submit--quiet:hover {
  background: var(--oae-color-bg, #0B1620);
  border-color: var(--oae-fg-1, #EAF1F8);
}

.oae-waitlist .oae-waitlist__status {
  margin: var(--oae-spacing-sm, 8px) 0 0;
  color: var(--oae-fg-2, #B8C5D2);
  font-size: var(--oae-text-label, 13px);
}

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

/* ---- Success state (JS and no-JS share this markup) ---- */

.oae-waitlist .oae-waitlist__confirmation {
  padding-left: var(--oae-spacing-md, 16px);
  border-left: 3px solid var(--oae-color-ok, #2BBF7A);
}

.oae-waitlist .oae-waitlist__resend-hint {
  margin: var(--oae-spacing-md, 16px) 0 0;
  color: var(--oae-fg-2, #B8C5D2);
  font-size: var(--oae-text-label, 13px);
  line-height: 1.5;
}

/* ---- Confirm / unsubscribe result panels ---- */

.oae-waitlist .oae-waitlist__panel {
  margin-bottom: var(--oae-spacing-lg, 24px);
  padding: var(--oae-spacing-md, 16px) 20px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: var(--oae-radius, 6px);
}

.oae-waitlist .oae-waitlist__panel:last-child {
  margin-bottom: 0;
}

.oae-waitlist .oae-waitlist__panel-body {
  margin: 0;
  color: var(--oae-fg-1, #EAF1F8);
  font-size: var(--oae-text-label, 13px);
  line-height: 1.55;
}

.oae-waitlist .oae-waitlist__panel-body + .oae-waitlist__panel-body {
  margin-top: var(--oae-spacing-sm, 8px);
}

.oae-waitlist .oae-waitlist__panel--success {
  background: var(--oae-color-ok-bg, #112A20);
  border-color: var(--oae-color-ok, #2BBF7A);
}

.oae-waitlist .oae-waitlist__panel--error {
  background: var(--oae-color-danger-bg, #311816);
  border-color: var(--oae-color-danger, #FF572D);
}

.oae-waitlist .oae-waitlist__rejoin {
  margin: var(--oae-spacing-md, 16px) 0 0;
  font-size: var(--oae-text-label, 13px);
}

@media (prefers-reduced-motion: reduce) {
  .oae-waitlist .oae-waitlist__input,
  .oae-waitlist .oae-waitlist__textarea,
  .oae-waitlist .oae-waitlist__submit {
    transition: none;
  }
}

/* Mobile: full width, tighter padding, full-width primary action. */
@media (max-width: 640px) {
  .oae-waitlist {
    max-width: none;
    padding: var(--oae-spacing-lg, 24px) var(--oae-spacing-md, 16px);
  }

  .oae-waitlist .oae-waitlist__submit {
    width: 100%;
  }
}
