/*
 * auth.css — au- prefix
 * Luxury authentication pages: Login & Register
 */

/* ── Page wrapper ─────────────────────────────────────────── */
.au-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: #FAFAF8;
}

.au-wrap {
    width: 100%;
    max-width: 440px;
}

/* ── Brand mark ───────────────────────────────────────────── */
.au-brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.au-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 50%;
    margin-bottom: 1.25rem;
    color: var(--charcoal, #1A1A1A);
    font-size: 1.25rem;
}

.au-heading {
    font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
    font-size: 2rem;
    font-weight: 500;
    color: var(--charcoal, #1A1A1A);
    margin: 0 0 0.4rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.au-subtext {
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.82rem;
    color: #999;
    margin: 0;
    letter-spacing: 0.02em;
}

/* ── Social auth buttons ──────────────────────────────────── */
.au-social-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.au-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 8px;
    background: #fff;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--charcoal, #1A1A1A);
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
    text-decoration: none;
}

.au-social-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.au-social-soon {
    position: absolute;
    top: -8px;
    right: -4px;
    background: var(--border, #E5E5E5);
    color: #999;
    font-size: 0.55rem;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 4px;
}

/* ── Divider ──────────────────────────────────────────────── */
.au-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.au-divider::before,
.au-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E5E5E5);
}

.au-divider-text {
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.7rem;
    color: #C0BAB0;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Error banner (server-side ModelState) ────────────────── */
.au-error-banner {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.78rem;
    color: #DC2626;
    display: none;
    margin-bottom: 0.5rem;
}

.au-error-banner.visible { display: block; }
.au-error-banner ul { margin: 0; padding-left: 1.2rem; }
.au-error-banner li + li { margin-top: 0.2rem; }

/* ── Form ─────────────────────────────────────────────────── */
.au-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.au-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.au-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.au-label {
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.72rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.au-input-wrap {
    position: relative;
}

.au-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 8px;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.88rem;
    color: var(--charcoal, #1A1A1A);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.au-input:focus {
    border-color: var(--charcoal, #1A1A1A);
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.05);
}

.au-input.au-input--error {
    border-color: #DC2626;
}

.au-input--pw {
    padding-right: 3rem;
}

/* ── Password show/hide toggle ────────────────────────────── */
.au-pw-toggle {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #C0BAB0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    line-height: 1;
}

.au-pw-toggle:hover { color: var(--charcoal, #1A1A1A); }
.au-pw-toggle i { font-size: 0.95rem; }

/* ── Field-level inline errors ────────────────────────────── */
.au-field-error {
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.7rem;
    color: #DC2626;
    display: none;
    margin-top: 0.1rem;
}

.au-field-error.visible { display: block; }

/* ── Password strength meter ──────────────────────────────── */
.au-strength-wrap {
    margin-top: 0.4rem;
    display: none;
}

.au-strength-wrap.visible { display: block; }

.au-strength-bar {
    display: flex;
    gap: 3px;
    margin-bottom: 0.2rem;
}

.au-strength-seg {
    flex: 1;
    height: 2px;
    background: var(--border, #E5E5E5);
    border-radius: 2px;
    transition: background 0.25s;
}

.au-strength-seg.s1 { background: #DC2626; }
.au-strength-seg.s2 { background: #D97706; }
.au-strength-seg.s3 { background: #6B7280; }
.au-strength-seg.s4 { background: #1A1A1A; }

.au-strength-label {
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.65rem;
    color: #999;
    letter-spacing: 0.04em;
}

/* ── Remember me + forgot password row ───────────────────── */
.au-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.78rem;
}

.au-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #666;
}

.au-check-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--charcoal, #1A1A1A);
    cursor: pointer;
}

.au-forgot {
    color: #999;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.au-forgot:hover { color: var(--charcoal, #1A1A1A); }

/* ── Marketing consent ────────────────────────────────────── */
.au-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.75rem;
    color: #888;
    line-height: 1.5;
}

.au-consent-label input[type="checkbox"] {
    margin-top: 2px;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    accent-color: var(--charcoal, #1A1A1A);
    cursor: pointer;
}

/* ── Submit button ────────────────────────────────────────── */
.au-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--charcoal, #1A1A1A);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.au-submit-btn:hover:not(:disabled) { background: #333; }

.au-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.au-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auSpin 0.6s linear infinite;
    display: none;
}

.au-submit-btn.loading .au-btn-spinner       { display: block; }
.au-submit-btn.loading .au-btn-label-default { display: none; }
.au-submit-btn .au-btn-label-loading         { display: none; }
.au-submit-btn.loading .au-btn-label-loading { display: inline; }

@keyframes auSpin {
    to { transform: rotate(360deg); }
}

/* ── Footer link ──────────────────────────────────────────── */
.au-footer-text {
    text-align: center;
    margin-top: 1.75rem;
    font-family: var(--sans, 'Outfit', system-ui, sans-serif);
    font-size: 0.78rem;
    color: #999;
}

.au-footer-text a {
    color: var(--charcoal, #1A1A1A);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--border, #E5E5E5);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}

.au-footer-text a:hover { border-color: var(--charcoal, #1A1A1A); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .au-page {
        padding: 2rem 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .au-heading { font-size: 1.65rem; }
    .au-name-row { grid-template-columns: 1fr; }
    .au-social-row { flex-direction: column; }
}
