/* The App Store waitlist (#511, #694): the email form and the note it shows once the address is in,
   on the home page and on /app-store; join.js runs it. Loaded after home.css, whose colours it uses. */
:root {
  --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --error: #f2b8b5;
  }
}

:root[data-theme="dark"] {
  --error: #f2b8b5;
}

/* The form, and what it shows once the address is in. */
.join {
  max-width: 560px;
  margin: 30px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.join[hidden],
.joined[hidden],
.join-error[hidden] {
  display: none;
}

.join-email {
  flex: 1 1 260px;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--band);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: start;
}

/* The address is typed left to right, but in Arabic the hint sits where the reader starts. */
[dir="rtl"] .join-email {
  text-align: right;
}

.join-email:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* For scripts only: a person never sees it, so a filled one is not a person. */
.join-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.join .store {
  min-height: 54px;
  font-size: 16px;
}

.join-error,
.join .hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.join-error {
  color: var(--error);
}

.joined {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 16px 22px;
  border-radius: 24px;
  background: var(--band);
  text-align: start;
}

.joined-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d4eb4c;
  color: #1d1d1f;
}

.joined-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.joined-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.joined-body {
  color: var(--muted);
  font-size: 15px;
}
