/* The launch waitlist form (shared/waitlist.js). Built on tokens.css only;
   a direction places the [data-waitlist] box and may set --wl-surface. */

/* The form is a light card, so it reads the same on a violet ticket, a dark
   panel or the plain canvas. */
.wl {
  --wl-surface: var(--surface); width: 100%; max-width: 600px;
  background: var(--bg); color: var(--ink); border-radius: var(--r-card);
  padding: clamp(var(--s5), 4vw, var(--s6));
}
.wl [hidden] { display: none !important; }
.wl-form, .wl-done { display: grid; gap: var(--s4); }
@media (max-width: 480px) { .wl { padding: var(--s5) var(--s4); } }
.wl-lead { color: var(--ink-2); }
.wl-field { display: grid; gap: var(--s1); min-width: 0; margin: 0; padding: 0; border: 0; }
.wl-field > label { font-weight: 500; font-size: 1rem; line-height: 1.5; padding: 0; }
.wl-opt { color: var(--ink-3); font-weight: 400; }
.wl input[type="tel"], .wl input[type="email"], .wl input[type="text"] {
  width: 100%; min-height: 52px; padding: 0 var(--s4);
  background: var(--wl-surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-input);
  transition: border-color var(--t-state) var(--ease-out);
}
.wl input:hover { border-color: var(--ink-3); }
.wl input:focus-visible { outline: 2px solid var(--violet-700); outline-offset: 1px; border-color: var(--violet-700); }
:root[dir="rtl"] .wl input[dir="ltr"] { text-align: right; }
.wl input[aria-invalid="true"] { border-color: #B3261E; }
.wl-hint { color: var(--ink-3); font-size: var(--fs-small); }
.wl-err { color: #B3261E; font-size: var(--fs-small); font-weight: 500; }
.wl-err:empty { display: none; }
.wl-summary { color: #B3261E; font-weight: 500; background: #FCEEEE; border-radius: var(--r-chip); padding: var(--s2) var(--s3); }

.wl-consent label { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s3); align-items: start; font-size: var(--fs-small); line-height: 1.6; color: var(--ink-2); cursor: pointer; }
.wl-consent input { width: 22px; height: 22px; margin: 2px 0 0; }

.wl-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wl-submit { justify-self: start; min-width: 180px; }
.wl-submit:disabled { opacity: 0.7; cursor: progress; }

.wl:has(> .wl-done:not([hidden])) { background: var(--herb-50); }
.wl-done { color: var(--herb-900); }
.wl-done:focus { outline: none; }
.wl-done-h { font-weight: 600; font-size: var(--fs-h3); line-height: 1.3; }

/* Place chips (shared/place-chips.js): the box looks like an input; chips
   sit in it before the text being typed, and suggestions drop below. */
.wl-place { position: relative; }
.pc-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-height: 52px; padding: 6px var(--s3);
  background: var(--wl-surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-input); cursor: text;
  transition: border-color var(--t-state) var(--ease-out);
}
.pc-box:hover { border-color: var(--ink-3); }
.pc-box:focus-within { outline: 2px solid var(--violet-700); outline-offset: 1px; border-color: var(--violet-700); }
.pc-box:has(.pc-input[aria-invalid="true"]) { border-color: #B3261E; }
.pc-chips { display: contents; list-style: none; margin: 0; padding: 0; }
.pc-chip {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-height: 34px;
  padding-inline: var(--s3) 2px; border-radius: var(--r-pill); background: var(--violet-50); color: var(--violet-900, var(--ink));
  border: 1px solid var(--violet-200, var(--line-strong)); font-weight: 500; font-size: 0.9375rem;
}
.pc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-chip button {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: none; color: inherit; font-size: 1.125rem; line-height: 1; cursor: pointer;
}
.pc-chip button:hover { background: rgba(27, 23, 18, 0.08); }
.pc-chip button:focus-visible { outline: 2px solid var(--violet-700); outline-offset: -2px; }
.wl .pc-box input.pc-input { flex: 1 1 8ch; min-width: 8ch; min-height: 38px; padding: 0 var(--s1); border: 0; background: none; border-radius: 0; }
.wl .pc-box input.pc-input:focus-visible { outline: none; border: 0; }
.pc-list {
  position: absolute; z-index: 5; inset-inline: 0; inset-block-start: calc(100% + 4px); max-height: 304px; overflow-y: auto;
  list-style: none; margin: 0; padding: var(--s1); background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-input); box-shadow: 0 12px 28px rgba(27, 23, 18, 0.14);
}
.pc-list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); min-height: 44px; padding: var(--s2) var(--s3); border-radius: calc(var(--r-input) - 4px); cursor: pointer; }
.pc-list li:hover, .pc-list li[aria-selected="true"] { background: var(--violet-50); }
.pc-name { font-weight: 500; }
.pc-alt { color: var(--ink-3); font-size: var(--fs-small); white-space: nowrap; }
