/* ==========================================================================
   auth.css — Adorable customer auth pages (login / register / forgot / reset).
   Requires common.css. Rem-based (1rem = 10px), accent red #b91c1c — matches
   the checkout look for a consistent storefront feel.
   ========================================================================== */

.auth {
  --au-accent: #b91c1c;
  --au-ink: rgb(var(--text-color));
  --au-muted: rgba(var(--text-color), 0.6);
  --au-line: #e5e5e5;
  --au-radius: 12px;
  padding: 4rem 0 6rem;
}

.auth__shell {
  max-width: 46rem;
  margin: 0 auto;
}

.auth__title {
  margin: 0 0 0.6rem;
  font-size: 2.6rem;
  font-weight: 500;
  text-align: center;
}

.auth__subtitle {
  margin: 0 0 2.8rem;
  font-size: 1.45rem;
  color: var(--au-muted);
  text-align: center;
}

.auth__card {
  padding: 2.8rem;
  background: #fff;
  border: 1px solid var(--au-line);
  border-radius: var(--au-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ── Flash / form-level messages ──────────────────────────────────────── */
.auth__alert {
  margin: 0 0 2rem;
  padding: 1.2rem 1.4rem;
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1.5;
}
.auth__alert--error {
  background: #fdf2f2;
  border: 1px solid #f5c2c2;
  color: #991b1b;
}
.auth__alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ── Fields (mirror checkout .co-field) ───────────────────────────────── */
.auth-field { display: flex; flex-direction: column; margin-bottom: 1.8rem; }

.auth-field label {
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--au-ink);
}
.auth-req { color: var(--au-accent); }
.auth-opt { color: var(--au-muted); font-weight: 400; font-size: 1.2rem; }

.auth-field input {
  width: 100%;
  padding: 1.2rem 1.4rem;
  font-size: 1.5rem;
  font-family: inherit;
  color: var(--au-ink);
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--au-accent);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}
.auth-field.has-error input { border-color: var(--au-accent); }

.auth-field__error {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  color: var(--au-accent);
}

/* ── Two-step: "logging in as …" line ─────────────────────────────────── */
.auth__as {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  margin: 0 0 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--au-line);
  font-size: 1.4rem;
  color: var(--au-muted);
}
.auth__as strong { color: var(--au-ink); font-weight: 500; word-break: break-all; }

/* ── Row: remember-me + forgot link ───────────────────────────────────── */
.auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.auth__checkbox {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.35rem;
  color: var(--au-ink);
  cursor: pointer;
}
.auth__checkbox input {
  width: 1.7rem;
  height: 1.7rem;
  accent-color: var(--au-accent);
  flex: 0 0 auto;
}

.auth__link {
  font-size: 1.35rem;
  color: var(--au-accent);
  text-decoration: none;
}
.auth__link:hover { text-decoration: underline; }

/* ── Submit ───────────────────────────────────────────────────────────── */
.auth__submit {
  width: 100%;
  min-height: 5rem;
  padding: 0 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--au-ink);
  color: #fff;
  font-size: 1.55rem;
  font-weight: 600;
  font-family: inherit;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.auth__submit:hover { background: #000; }

/* ── Footer (switch between login / register) ─────────────────────────── */
.auth__foot {
  margin: 2.4rem 0 0;
  font-size: 1.4rem;
  text-align: center;
  color: var(--au-muted);
}
.auth__foot a { color: var(--au-accent); text-decoration: none; font-weight: 500; }
.auth__foot a:hover { text-decoration: underline; }

.auth__hint {
  margin: 0.6rem 0 0;
  font-size: 1.25rem;
  color: var(--au-muted);
}

@media (max-width: 560px) {
  .auth { padding: 2.4rem 0 4rem; }
  .auth__card { padding: 2rem; }
}
