/* Passwordless login/register: email + Continue, then or + OAuth; OTP code step. */

.auth-passwordless {
  display: flex;
  flex-direction: column;
}

.auth-passwordless .auth-subtitle {
  margin: 0 0 1.1rem;
  color: var(--muted, #696175);
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-passwordless .auth-subtitle a {
  color: #6340a0;
  font-weight: 600;
}

.auth-passwordless .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-passwordless .lai-otp-email-form {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.auth-passwordless .auth-title {
  line-height: 1.2;
}

.auth-passwordless .auth-email-input,
.auth-shell .auth-passwordless .field input.auth-email-input,
.auth-shell .auth-passwordless input[type="email"].auth-email-input,
.auth-shell input[type="email"][data-lai-otp-email-input] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border, #e3deeb) !important;
  border-radius: 999px !important;
  padding: 0.75rem 2.75rem 0.75rem 1.5rem !important;
  padding-left: 1.5rem !important;
  background: #fff !important;
  color: var(--text, #20172d) !important;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box !important;
}

.auth-passwordless .lai-otp-status.is-error {
  color: #991b1b;
}

.auth-passwordless .lai-otp-digit {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}

.auth-passwordless .lai-otp-digit.has-value,
.auth-passwordless .lai-otp-digit:not(:placeholder-shown) {
  font-size: 1.65rem;
  font-weight: 700;
  color: #c9a227;
}

.auth-passwordless .lai-otp-link {
  font-size: 0.78rem;
  text-decoration: none;
  color: #8b5cf6;
}

.auth-passwordless .lai-otp-link:hover {
  color: #a78bfa;
  text-decoration: none;
}

.auth-passwordless .terms {
  text-align: center;
  line-height: 1.45;
}

.auth-passwordless .auth-email-input:focus,
.auth-shell .auth-passwordless .field input.auth-email-input:focus {
  outline: 2px solid rgba(139, 92, 246, 0.35);
  border-color: #8b5cf6;
}

.auth-continue-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #8b5cf6;
  color: #fff !important;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-continue-btn:hover,
.auth-continue-btn:focus-visible {
  background: #7c3aed;
  outline: none;
}

.auth-passwordless .auth-oauth-providers {
  margin-top: 0;
}

.auth-passwordless .auth-oauth-divider {
  margin: 0.85rem 0;
}

.auth-passwordless .terms {
  margin-top: 1rem;
}

.auth-passwordless [data-lai-otp-email-panel][hidden],
.auth-passwordless [data-lai-otp-code-panel][hidden],
.auth-passwordless [data-lai-otp-providers][hidden],
.auth-passwordless [data-lai-otp-or][hidden],
.auth-passwordless [data-lai-otp-footer][hidden],
.auth-passwordless [data-lai-otp-status][hidden] {
  display: none !important;
}

/* Code step: title → instruction → digits → or → social */
.auth-passwordless[data-otp-step="code"] .auth-top,
.auth-passwordless[data-otp-step="code"] .terms,
.auth-passwordless[data-otp-step="code"] [data-lai-otp-email-panel] {
  display: none !important;
}

.auth-passwordless[data-otp-step="code"] [data-lai-otp-title] { order: 1; }
.auth-passwordless[data-otp-step="code"] [data-lai-otp-subtitle] { order: 2; text-align: center; }
.auth-passwordless[data-otp-step="code"] [data-lai-otp-status] { order: 3; }
.auth-passwordless[data-otp-step="code"] [data-lai-otp-code-panel] { order: 4; display: block; }
.auth-passwordless[data-otp-step="code"] [data-lai-otp-or] { order: 5; }
.auth-passwordless[data-otp-step="code"] [data-lai-otp-providers] { order: 6; }

.auth-passwordless .lai-otp-status.is-error a,
.auth-passwordless .lai-otp-signin-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
