/* /login + /register — token-backed auth pages.
   Reuses the setup shell (.setup-card / .btn-primary / .setup-notice / .step-*
   from /css/routes/setup/layout.css). This file adds only the form-field,
   password reveal toggle, terms row, turnstile spacing, and footer-link styling
   those two pages need — all token-backed, no hardcoded design values. */

/* ── Form fields ─────────────────────────────────────────── */
.auth-form { margin-top: 0.25rem; }

/* Progressive-reveal (register): the native `hidden` attribute is otherwise a
   no-op on .btn-primary / the panel because .btn-primary sets display:block.
   This class+attribute selector (0,2,0) outranks .btn-primary (0,1,0). */
.auth-form [hidden] { display: none; }
.auth-reveal { text-align: left; }

.auth-field { margin-bottom: 0.85rem; text-align: left; }

.auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input::placeholder { color: var(--muted-light); }
.auth-field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.auth-hint {
    font-size: var(--text-xs);
    color: var(--muted-light);
    margin-top: 0.4rem;
    line-height: 1.5;
}

.auth-optional {
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--muted-light);
}

/* ── Password reveal toggle ──────────────────────────────── */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted-light);
    transition: color 0.2s;
}
.pw-toggle:hover { color: var(--brand); }
.pw-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.pw-toggle svg { width: 20px; height: 20px; display: block; }
.pw-toggle .icon-off { display: none; }
.pw-toggle.is-visible .icon-on { display: none; }
.pw-toggle.is-visible .icon-off { display: block; }

/* ── Terms checkbox row (register) ───────────────────────── */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    text-align: left;
}
.auth-terms input[type="checkbox"] {
    width: auto;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--brand);
}
.auth-terms label {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--muted);
    line-height: 1.5;
}
.auth-terms a { color: var(--brand); text-decoration: none; font-weight: 500; }
.auth-terms a:hover { text-decoration: underline; }

/* ── Turnstile spacing ───────────────────────────────────── */
.auth-turnstile { margin: 0.25rem 0 1.1rem; }

/* ── "or" divider between password + Etsy sign-in ────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--muted-light);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Social sign-in buttons (Google / Etsy) — secondary to the password CTA ── */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-size: var(--text-base);
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-social:last-of-type { margin-bottom: 0; }
.btn-social:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.btn-social svg { flex-shrink: 0; }

.auth-hint--center { text-align: center; }
.auth-hint--center a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth-hint--center a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .btn-social { min-height: var(--m-tap); }
}

/* ── Alternate-action link under the card ────────────────── */
.auth-alt {
    margin-top: 1rem;
    text-align: center;
    font-size: var(--text-sm);
    color: var(--muted);
}
.auth-alt a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-field input { min-height: var(--m-tap); font-size: var(--m-input-min-fs); }
    .pw-toggle { width: 38px; height: 38px; }
}
