/* The email sign-in block (templates/_signin.html). Shared by the app pages (which also load app.css) and the
   standalone landing (which does not), so it stands on the tokens `--fg --muted --line --accent --accent-fg --surface`
   and a landing sets them for itself. */
.signin { margin: 24px 0 0; text-align: left; }
.signin [hidden] { display: none !important; }
.signin-label { display: block; margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.signin-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming the page on focus */
}
.signin-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.signin-input[aria-invalid="true"] { border-color: #b42318; }
.signin-primary {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 12px 0 0;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.signin-primary[disabled] { opacity: 0.6; cursor: default; }
.signin-primary:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.signin-error { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: #b42318; }
@media (prefers-color-scheme: dark) { .signin-error { color: #fda29b; } }
.signin .hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* the code screen */
.signin-sent { margin: 0 0 8px; line-height: 1.5; overflow-wrap: anywhere; }
.signin-address { font-weight: 700; }
.signin-sent .signin-link { display: block; }
.signin-link {
  display: inline-block;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.signin-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }

/* One real input drawn as six boxes: the boxes are decoration under a transparent input that covers them, so tapping,
   pasting and the phone's code suggestion all go to the input. */
.code-boxes { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 360px; }
.code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.code-boxes:focus-within .code-box[data-active] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.code-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  letter-spacing: 40px;
  cursor: text;
}
.code-input::selection { background: transparent; }
.code-input:disabled { cursor: not-allowed; }
.signin-resend { margin: 6px 0 0; }
.signin .help { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.signin .help p { margin: 0 0 12px; }
.signin .help a { display: block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--fg); text-align: center; text-decoration: none; font-weight: 600; min-height: 24px; }

/* Yandex ID: the divider and the outlined button under the email form. Own styles, because the landing does not load
   app.css (so no .button.secondary there). */
.signin-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 14px; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.signin-yandex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--fg);
  border-radius: 12px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}
.signin-yandex:hover { background: var(--surface); }
.signin-yandex:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signin-yandex-mark { flex: none; }
