/* Early access: a small white pill at the top centre, over the library.
   The app's dock owns the bottom centre, so this stays up here and stays slim. */
.wl {
  position: fixed; top: 24px; left: 50%; z-index: 20;
  transform: translate(-50%, 0);
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 4px 0 16px; max-width: calc(100vw - 32px);
  background: #fff; color: #111;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .06);
  font: 13px/1 -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: wl-in 520ms cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes wl-in { from { opacity: 0; transform: translate(-50%, -6px); } }
.wl[hidden] { display: none; }
.wl * { box-sizing: border-box; }
.wl > * { animation: wl-fade 220ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wl-fade { from { opacity: 0; transform: translateY(2px); } }

.wl .lead { white-space: nowrap; font-weight: 500; letter-spacing: -.005em; }
.wl .lead em { font-style: normal; color: #6b6b6b; font-weight: 400; }

.wl form { display: flex; align-items: center; gap: 4px; margin: 0; min-width: 0; }
.wl label.sr, .wl .sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.wl input {
  appearance: none; -webkit-appearance: none; min-width: 0;
  width: 208px; height: 30px; padding: 0 12px; margin-left: 6px;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 999px; background: #f6f5f3;
  font: inherit; color: #111; outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.wl input::placeholder { color: #a3a3a3; }
.wl input:focus { background: #fff; border-color: rgba(0, 0, 0, .28); }
.wl input[aria-invalid="true"] { border-color: #c2410c; background: #fff; }

.wl button { appearance: none; border: 0; font: inherit; cursor: pointer; }
.wl .go {
  height: 30px; padding: 0 14px; border-radius: 999px;
  background: #111; color: #fff; font-weight: 500; white-space: nowrap;
  transition: opacity 160ms ease, transform 160ms ease;
}
.wl .go:hover { opacity: .86; }
.wl .go:active { transform: scale(.97); }
.wl .go[disabled] { opacity: .5; cursor: default; }
.wl .x {
  width: 30px; height: 30px; border-radius: 999px; background: transparent; color: #a3a3a3;
  display: grid; place-items: center; flex: none;
}
.wl .x:hover { color: #111; background: #f6f5f3; }
.wl button:focus-visible, .wl .open:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

/* the hint under the pill (invalid / network) */
.wl .hint {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  background: #fff; border: 1px solid rgba(0, 0, 0, .08); color: #c2410c; font-size: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.wl .hint:empty { display: none; }

/* collapsed: just the invitation */
.wl.is-closed { padding: 0 6px 0 6px; }
.wl .open {
  height: 30px; padding: 0 12px; border-radius: 999px; background: transparent; color: #111;
  display: flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap;
}
.wl .open .dot { width: 6px; height: 6px; border-radius: 50%; background: #111; }
.wl .open:hover { background: #f6f5f3; }

/* done */
.wl.is-done { padding: 0 16px 0 12px; gap: 8px; }
.wl .check {
  width: 18px; height: 18px; border-radius: 50%; background: #111; color: #fff;
  display: grid; place-items: center; flex: none;
}
.wl .check svg { display: block; }
.wl .check path { stroke-dasharray: 12; stroke-dashoffset: 12; animation: wl-draw 380ms 120ms ease forwards; }
@keyframes wl-draw { to { stroke-dashoffset: 0; } }
.wl.is-small { height: 30px; padding: 0 12px 0 8px; font-size: 12px; color: #6b6b6b; }
.wl.is-small .check { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .wl { top: 18px; }
  .wl.is-open { left: 16px; right: 16px; transform: none; max-width: none; padding: 0 4px 0 6px; }
  .wl.is-open .lead { display: none; }
  .wl.is-open form { flex: 1; }
  .wl.is-open input { flex: 1; width: auto; margin-left: 0; font-size: 16px; } /* no iOS focus zoom */
  @keyframes wl-in { from { opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  .wl, .wl > *, .wl .check path { animation: none; stroke-dashoffset: 0; }
}
