/* The "Join waitlist" button in the home page's header and the /join-waitlist page's card, in the site's own tokens:
   home.css :root for ink, paper, the fonts and the easing; the chat's field, line and button from site.css (white
   surface, #9a9198 field, ink pill). */

.mast nav {
  margin-left: auto;
}
.join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 15px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.join:hover {
  opacity: 0.88;
}
.join:active {
  transform: scale(0.97);
}
.join:focus-visible {
  border-radius: 999px;
}
/* On a phone the header keeps the logo and the button; Terms and Privacy stay in the footer. */
@media (max-width: 559px) {
  .mast:has(.join) nav {
    display: none;
  }
}

/* The join page: the card sits in the exact middle of the screen, like Instinct's sign-in. The header and footer lie
   over the top and bottom edges, and the page keeps the same room for both, so neither pushes the card off center. */
.wl-body {
  position: relative;
}
.wl-body .mast {
  position: absolute;
  inset: 0 0 auto;
}
.wl-body .foot {
  position: absolute;
  inset: auto 0 0;
  margin-top: 0;
}
.wl-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(104px, 16vh, 128px) var(--gx-r) clamp(104px, 16vh, 128px) var(--gx);
}
.wl {
  --wl-surface: #ffffff;
  --wl-surface-2: #f5eff3;
  --wl-line: #e6dfe5;
  --wl-field: #9a9198;
  --wl-hint: #746c73;
  --wl-error: #c8333a;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid var(--wl-line);
  border-radius: 22px;
  background: var(--wl-surface);
  color: var(--ink);
  font-family: var(--sans);
  box-shadow:
    0 1px 2px rgba(11, 11, 12, 0.04),
    0 18px 48px -20px rgba(11, 11, 12, 0.18);
}
.wl-card {
  position: relative;
  margin: 0;
  padding: 30px 24px 24px;
}
.wl h2 {
  margin: 0;
  font: 600 26px/1.15 var(--sans);
  letter-spacing: -0.02em;
  outline: none;
}
.wl-sub {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
  text-wrap: pretty;
}

.wl-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 22px;
  border: 1px solid var(--wl-field);
  border-radius: 26px;
  background: var(--wl-surface);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.wl-field:focus-within {
  border-color: color-mix(in srgb, var(--ink) 45%, var(--wl-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 6%, transparent);
}
.wl-field[data-bad] {
  border-color: var(--wl-error);
}
.wl-cc {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  margin: 0;
  padding: 0 12px 0 18px;
  border: 0;
  border-radius: 26px 0 0 26px;
  background: transparent;
  color: var(--ink);
  font: 500 15px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.wl-cc::after {
  content: "";
  width: 1px;
  height: 22px;
  margin-left: 6px;
  background: var(--wl-line);
}
.wl-flag {
  font-size: 19px;
  line-height: 1;
}
.wl-cc svg {
  width: 10px;
  height: 10px;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}
.wl-cc:focus-visible {
  border-radius: 26px 0 0 26px;
  outline-offset: -3px;
}
.wl-cc[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.wl-tel {
  flex: 1;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0 18px 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 16px/1 var(--sans);
  letter-spacing: -0.005em;
}
.wl-tel::placeholder {
  color: var(--wl-hint);
  opacity: 1;
}

.wl-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--wl-line);
  border-radius: 16px;
  background: var(--wl-surface);
  box-shadow: 0 12px 32px -12px rgba(11, 11, 12, 0.28);
}
.wl-pop[hidden] {
  display: none;
}
.wl-find {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 16px 0 40px;
  border: 0;
  border-bottom: 1px solid var(--wl-line);
  border-radius: 0;
  outline: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%235f585e' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath d='M9.5 9.5 13 13'/%3E%3C/svg%3E") no-repeat 16px 50%;
  color: var(--ink);
  font: 400 16px/1 var(--sans);
}
.wl-find::placeholder {
  color: var(--wl-hint);
  opacity: 1;
}
.wl-list {
  max-height: 264px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.wl-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
.wl-list li.is-active {
  background: var(--wl-surface-2);
}
@media (hover: hover) {
  .wl-list li:hover {
    background: var(--wl-surface-2);
  }
}
.wl-list li[aria-selected="true"] .n {
  font-weight: 600;
}
.wl-list .f {
  flex: none;
  font-size: 17px;
  line-height: 1;
}
.wl-list .n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wl-list .k {
  flex: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.wl-list .wl-none,
.wl-list .wl-none:hover {
  background: none;
  color: var(--muted);
  cursor: default;
}

.wl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.wl-err {
  margin: 10px 0 0;
  color: var(--wl-error);
  font-size: 14px;
  line-height: 1.4;
}
.wl-go {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin: 16px 0 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font: 500 16px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.wl-go:hover {
  opacity: 0.88;
}
.wl-go:active {
  transform: scale(0.98);
}
.wl-go:focus-visible {
  border-radius: 999px;
}
.wl-go[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}
.wl-fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-wrap: pretty;
}
.wl-fine a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wl-fine a:hover {
  color: var(--ink);
}
.wl-hi {
  font-weight: 600;
  color: var(--ink-2);
}
.wl-line,
.wl-you {
  color: var(--ink-2);
  white-space: nowrap;
}

/* Short screens keep the open country list in view; narrow ones give the number more room. */
@media (max-height: 700px) {
  .wl-list {
    max-height: 176px;
  }
}
@media (max-width: 360px) {
  .wl-card {
    padding: 26px 18px 20px;
  }
  .wl-cc {
    padding-left: 14px;
  }
  .wl-tel {
    padding-right: 12px;
  }
}
