/* Standalone auth screens (login / email-link landings). Token-based so they match
   every theme. Shared by SharedUI/Pages/{Login,MagicVerify,ConfirmEmail,ResetPassword}.razor —
   served from any host as _content/LearnWordsAI.SharedUI/css/auth.css. */

.auth-page {
    max-width: var(--w-narrow);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px 48px;
}

.auth-brand {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    /* Gap to the card; this 6px previously sat above the tagline, now removed (#502). */
    margin-bottom: 26px;
    color: var(--text);
}
.auth-brand .auth-brand-accent { color: var(--accent); }

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px 22px;
    box-shadow: var(--shadow);
}

.auth-title { font-size: 20px; font-weight: 700; margin: 0 0 18px; color: var(--text); }

.auth-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.auth-field input {
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
}
.auth-field input:focus { outline: none; border-color: var(--accent); }

.auth-primary {
    width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 1), rgba(var(--accent-rgb), 0.86));
    color: var(--button-text);
    cursor: pointer;
    box-shadow: 0 10px 22px -10px rgba(var(--accent-rgb), 0.8);
    transition: transform .15s, box-shadow .2s, opacity .2s;
}
.auth-primary:hover:not(:disabled) { transform: translateY(-1px); }
.auth-primary:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

/* Register-only consent line: a checkbox + "I'm 16+ and accept the Terms / Privacy" with two
   inline <a> links (auth_consent_label). Previously auth.css had NO rules for it, so the row
   inherited browser defaults — the links rendered as bright-blue underlined text that clashed
   with the brand and read as "styles aren't connected" (#229). Token-based so it matches every
   theme like the rest of the auth screen. */
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 2px 0 4px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-secondary);
    cursor: pointer;
}
.auth-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--accent);
    cursor: pointer;
}
.auth-consent a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-consent a:hover { text-decoration-thickness: 2px; }

.auth-secondary { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.auth-link { background: none; border: none; padding: 0; font-size: 13px; color: var(--accent); cursor: pointer; }
.auth-link:hover:not(:disabled) { text-decoration: underline; }
.auth-link:disabled { opacity: 0.5; cursor: default; }

.auth-divider { margin: 22px 0 16px; text-align: center; border-top: 1px solid var(--card-border); }
.auth-divider span { position: relative; top: -10px; padding: 0 12px; font-size: 12px; color: var(--hint); background: var(--bg-secondary); }

.auth-social { display: flex; flex-direction: column; gap: 10px; }
.auth-social-btn {
    width: 100%; padding: 12px 16px; font-size: 14px; font-weight: 600;
    border: 1px solid var(--card-border); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); cursor: pointer;
    transition: background var(--transition);
}
.auth-social-btn:hover { background: var(--card-hover); }
/* Google renders its own (iframe) button here; GIS controls its look per brand guidelines, so we
   only center it within the social column rather than restyling it. */
.auth-social-google { display: flex; justify-content: center; }

/* Click-through consent notice under the social buttons (auth_social_consent). Social sign-in
   provisions an account on first use, so the deliberate provider-button click — with this notice
   shown — stands in for the register-only checkbox. Quieter than .auth-consent: no checkbox,
   centered, smaller. Same accent links so it matches every theme. */
.auth-social-consent {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: center;
}
.auth-social-consent a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-social-consent a:hover { text-decoration-thickness: 2px; }

.auth-info, .auth-error, .auth-ok {
    margin-bottom: 14px; padding: 11px 13px; border-radius: var(--radius-sm);
    font-size: 13px; line-height: 1.45;
}
.auth-info { background: rgba(var(--accent-rgb), 0.12); color: var(--text); }
.auth-ok   { background: rgba(var(--success-rgb), 0.14); color: var(--text); }
.auth-error { background: rgba(var(--destructive-rgb), 0.14); color: var(--text); }

/* Email-link landing pages (verify / confirm). */
.auth-cb { max-width: var(--w-narrow); margin: 0 auto; padding: 64px 20px; text-align: center; }
.auth-cb-text { font-size: 15px; color: var(--text-secondary); }
.auth-cb-spinner {
    width: 34px; height: 34px; margin: 0 auto 16px;
    border: 3px solid var(--card-border); border-top-color: var(--accent);
    border-radius: 50%; animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Legal docs (Privacy Policy / Terms of Service). Renders the rendered-Markdown
   body inside an auth-card-wide layout, with prose typography tuned for long
   reading rather than form input. */
.legal-page { max-width: var(--w-readable); padding-top: 24px; padding-bottom: 48px; min-height: auto; }
.legal-card { padding: 32px 28px; }
.legal-body { color: var(--text); font-size: 15px; line-height: 1.6; }
.legal-body h1 { font-size: 28px; margin: 0 0 16px; }
.legal-body h2 { font-size: 21px; margin: 28px 0 12px; }
.legal-body h3 { font-size: 17px; margin: 22px 0 10px; }
.legal-body p, .legal-body ul, .legal-body ol, .legal-body blockquote { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { padding-left: 22px; }
.legal-body li { margin: 4px 0; }
.legal-body a { color: var(--accent); text-decoration: underline; }
.legal-body code { background: rgba(var(--on-surface-rgb), 0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.legal-body blockquote {
    border-left: 3px solid rgba(var(--accent-rgb), 0.4);
    padding: 6px 14px;
    color: rgba(var(--on-surface-rgb), 0.78);
    background: rgba(var(--on-surface-rgb), 0.04);
    border-radius: 0 6px 6px 0;
}
.legal-body table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 14px; }
.legal-body th, .legal-body td { border: 1px solid rgba(var(--on-surface-rgb), 0.18); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-body th { background: rgba(var(--on-surface-rgb), 0.06); font-weight: 600; }
.legal-body hr { border: 0; border-top: 1px solid rgba(var(--on-surface-rgb), 0.15); margin: 28px 0; }
.legal-body em { color: rgba(var(--on-surface-rgb), 0.72); }
