/* Early-access dialog, shared by the main landing and its design reference. */
#waitlist {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  overflow: auto;
}
#waitlist::backdrop { background: light-dark(var(--light-overlay), var(--dark-overlay)); backdrop-filter: none; }
#waitlist .waitlist-header { padding: 26px 80px 26px 28px; background: var(--paper); border-bottom: 1px solid var(--line); }
#waitlist h2 { margin: 0; font-size: 29px; line-height: 1.2; }
#waitlist .waitlist-fields { padding: 26px 28px 22px; }
#waitlist label { margin: 0 0 22px; font-size: 14px; color: var(--muted); }
#waitlist .waitlist-field { margin-bottom: 22px; }
#waitlist .waitlist-field label { margin: 0; }
#waitlist .waitlist-field-error { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 22px; color: var(--danger); font-size: 14px; font-weight: 400; line-height: 1.5; }
#waitlist .waitlist-field-error[hidden] { display: none; }
#waitlist .waitlist-field-error svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
#waitlist .waitlist-field-error span { min-width: 0; overflow-wrap: anywhere; }
#waitlist .waitlist-fields > label:has(+ .waitlist-field-error:not([hidden])) { margin-bottom: 0; }
#waitlist .waitlist-field .waitlist-field-error, #waitlist .check + .waitlist-field-error { margin-bottom: 0; }
#waitlist input:not([type=checkbox]), #waitlist select { padding: 12px 14px; border-color: var(--control-border); transition: background-color .15s ease; }
#waitlist .check { align-items: flex-start; margin: 26px 0 0; gap: 12px; line-height: 1.65; color: var(--muted); }
#waitlist .check a { color: var(--action); }
#waitlist .check input { margin-top: 2px; }
#waitlist .check:has(input:focus-visible) { background: var(--soft); border-radius: var(--radius-control); }
#waitlist #waitlist-error { margin: 18px 0 0; }
#waitlist #waitlist-error:empty, #waitlist .turnstile:empty { display: none; }
#waitlist .turnstile:not(:empty) { margin-top: 22px; }
#waitlist .waitlist-actions { margin: 0; padding: 20px 28px 24px; border-top: 1px solid var(--line); background: var(--paper); }
#waitlist .waitlist-actions button { width: 100%; font-weight: 600; transition: background-color .15s ease; }
#waitlist .close { top: 18px; right: 18px; z-index: 6; display: grid; place-items: center; color: var(--muted); transition: background-color .15s ease, color .15s ease; }
#waitlist .close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
#waitlist .close:hover, #waitlist .close:focus-visible { color: var(--action); background: var(--soft); }
#waitlist .close:active { color: var(--action-pressed); background: var(--soft-pressed); translate: none; }
#waitlist #waitlist-done { padding: 32px 28px; }
#waitlist #waitlist-done h2 { padding-right: 44px; margin-bottom: 20px; }
#waitlist #waitlist-done p { color: var(--muted); font-size: 16px; line-height: 1.75; }

/* Use the site's existing select behavior with dialog-scoped styling. */
#waitlist .ui-select-native[hidden] { display: none !important; }
#waitlist .plan-picker { position: relative; margin-top: 8px; min-width: 0; }
#waitlist .plan-picker-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; padding: 12px 14px; text-align: left; font: 500 16px/1.5 Manrope, Arial, sans-serif; color: var(--ink); background: var(--white); border: 1px solid var(--control-border); border-radius: var(--radius-control); transition: background-color .15s ease; }
#waitlist .plan-picker-trigger:hover, #waitlist .plan-picker-trigger[aria-expanded=true] { background: var(--soft); }
#waitlist .plan-picker svg { flex: 0 0 auto; width: 20px; height: 20px; stroke: var(--action); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#waitlist .plan-picker-trigger svg { transition: transform .15s ease; }
#waitlist .plan-picker-trigger[aria-expanded=true] svg { transform: rotate(180deg); }
#waitlist .plan-picker-options { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; max-height: min(220px, 45svh); overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-control); box-shadow: 0 8px 24px light-dark(var(--light-shadow-soft), var(--dark-shadow)); }
#waitlist .plan-picker[data-placement=above] .plan-picker-options { top: auto; bottom: calc(100% + 6px); }
#waitlist .plan-picker-options [role=option] { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 12px; font-size: 16px; line-height: 1.5; color: var(--ink); border-radius: 2px; cursor: pointer; }
#waitlist .plan-picker-options [aria-selected=true] { color: var(--action); font-weight: 600; }
#waitlist .plan-picker-options .is-active { background: var(--soft); }
#waitlist .plan-picker-options svg { visibility: hidden; }
#waitlist .plan-picker-options [aria-selected=true] svg { visibility: visible; }

/* The shared ui.css owns focus borders; fills retain the landing feedback. */
#waitlist :is(input:not([type=checkbox]), select, .plan-picker-trigger):focus { background: var(--soft); }
#waitlist .waitlist-actions button:focus-visible { background: var(--action-hover); }
#waitlist a:focus-visible { text-decoration-thickness: 2px; }

@media (max-width: 760px) {
  #waitlist .waitlist-header { padding: 24px 68px 24px 22px; }
  #waitlist h2 { font-size: 26px; }
  #waitlist .waitlist-fields { padding: 24px 22px 20px; }
  #waitlist .waitlist-actions { padding: 18px 22px 22px; }
  #waitlist .close { top: 17px; right: 12px; }
  #waitlist #waitlist-done { padding: 28px 22px; }
}
@media (max-width: 380px) {
  #waitlist { width: calc(100% - 24px); max-width: calc(100% - 24px); }
  #waitlist .waitlist-fields { padding-inline: 16px; }
}
