/* "Get notified when selling opens" (assets/waitlist.js). The pages' own tokens (--ink, --fill,
   --accent…), with fallbacks, so the same form fits the audience pages, /sell and the outreach landing,
   light and dark.

   It shows only while selling is closed. Each page's selling gate keeps [data-sell-closed] in its place
   but invisible until the answer, so the closed state (the usual one) never jumps; the rule below hides
   the form wherever the answer is "open", including /sell, which has no gate rules of its own. */
html[data-selling="open"] [data-waitlist] { display: none !important; }

.waitlist { width: 100%; max-width: 540px; margin: 0 auto; text-align: center; }
.cta + .waitlist { margin-top: 26px; }
.tile .waitlist { margin-top: 16px; }
.waitlist .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.waitlist .wl-head { margin: 0 0 12px; }
.waitlist .wl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.waitlist label { display: block; margin: 0; min-width: 0; }
.waitlist .wl-email { flex: 1 1 220px; }
.waitlist .wl-kind { flex: 0 1 auto; }
.waitlist input[type="email"], .waitlist select {
  box-sizing: border-box; width: 100%; min-width: 0; height: 44px; margin: 0; padding: 0 14px;
  border: 0; border-radius: 12px; background: var(--field, var(--surface, #fff)); color: var(--ink, #1d1d1f);
  box-shadow: inset 0 0 0 1px var(--field-line, var(--hairline-strong, rgba(0, 0, 0, 0.16)));
  font: inherit; font-size: 16px; line-height: 1.2; letter-spacing: -0.01em; text-align: left;
}
.waitlist input[type="email"]::placeholder { color: var(--tertiary, #86868b); opacity: 1; }
.waitlist select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  /* The chevron: two gradients in the secondary ink, so it follows light and dark. */
  background-image: linear-gradient(45deg, transparent 50%, var(--secondary, #6e6e73) 50%), linear-gradient(135deg, var(--secondary, #6e6e73) 50%, transparent 50%);
  background-position: right 18px top 50%, right 13px top 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.waitlist select.empty { color: var(--tertiary, #86868b); }
.waitlist select option { color: var(--ink, #1d1d1f); background: var(--surface, #fff); }
.waitlist input[type="email"]:focus-visible, .waitlist select:focus-visible { outline: 2px solid var(--accent, #0071e3); outline-offset: 1px; }
.waitlist input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #E30000; }
.waitlist .wl-btn { flex: none; min-height: 44px; height: 44px; padding: 0 20px; font-size: 16px; white-space: nowrap; }
.waitlist .wl-btn:disabled { cursor: default; }
.waitlist[data-state="sending"] .wl-btn { opacity: 0.6; }
.waitlist .wl-msg { margin: 8px 0 0; font-size: 14px; line-height: 1.35; color: #C80000; text-wrap: balance; }
.waitlist .wl-msg:empty { display: none; }
.waitlist .wl-msg:focus { outline: none; }
.waitlist .wl-fine { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--tertiary, #86868b); text-wrap: balance; }
.waitlist .wl-fine a { color: inherit; text-decoration: underline; text-decoration-color: var(--hairline-strong, rgba(0, 0, 0, 0.16)); text-underline-offset: 2px; }
.waitlist .wl-fine a:hover { color: var(--secondary, #6e6e73); }
/* Done: the thanks stands where the fields were. */
.waitlist[data-state="done"] .wl-row, .waitlist[data-state="done"] .wl-fine { display: none; }
.waitlist[data-state="done"] .wl-msg { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; font-size: 16px; color: var(--ink, #1d1d1f); }
.waitlist[data-state="done"] .wl-msg::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent, #0071e3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 5 8.6l4.6-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* The honeypot: there for a bot that fills every field, out of sight and out of the tab order. */
.waitlist .wl-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* In a narrow box (an outreach tile), or on a phone: the address on its own line, then the menu and
   the button. */
.waitlist.compact { max-width: none; text-align: left; }
.waitlist.compact .wl-row { justify-content: flex-start; }
.waitlist.compact .wl-email { flex-basis: 100%; }
.waitlist.compact .wl-kind { flex: 1 1 120px; }
.waitlist.compact[data-state="done"] .wl-msg { justify-content: flex-start; }
.waitlist.compact .wl-fine, .waitlist.compact .wl-msg { text-wrap: pretty; }
@media (max-width: 480px) {
  .waitlist .wl-email { flex-basis: 100%; }
  .waitlist .wl-kind { flex: 1 1 120px; }
}

@media (prefers-color-scheme: dark) {
  .waitlist input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #FF6961; }
  .waitlist .wl-msg { color: #FF6961; }
}
