/* Shared external sign-in buttons for login, registration and the home account card. */
:is(.oauth-block, .oauth-account) {
    --oauth-ink: var(--ui-ink); --oauth-muted: var(--ui-muted); --oauth-line: var(--ui-border);
    --oauth-surface: var(--ui-surface); --oauth-surface-hover: var(--ui-selected);
    --oauth-accent: var(--ui-accent); --oauth-focus: var(--ui-focus-wash);
}
:root[data-theme="dark"] :is(.oauth-block, .oauth-account) {
    --oauth-ink: var(--ui-ink); --oauth-muted: var(--ui-muted); --oauth-line: var(--ui-border);
    --oauth-surface: var(--ui-surface); --oauth-surface-hover: var(--ui-selected);
    --oauth-accent: var(--ui-accent); --oauth-focus: var(--ui-focus-wash);
}
.oauth-block { display: grid; gap: 10px; margin-top: 24px; }
.oauth-button {
    display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 11px 14px;
    border: 1px solid var(--oauth-line); border-radius: 11px;
    background: var(--oauth-surface); color: var(--oauth-ink);
    font-size: 13px; font-weight: 600; text-decoration: none;
    transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
}
.oauth-button:hover {
    border-color: var(--oauth-accent); background: var(--oauth-surface-hover);
    transform: translateY(-1px); box-shadow: 0 8px 20px -14px #1c312966;
}
.oauth-button:focus-visible { outline: none; border-color: var(--oauth-accent); box-shadow: 0 0 0 4px var(--oauth-focus); }
.oauth-logo { display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
.oauth-logo svg { display: block; width: 18px; height: 18px; }
.oauth-label { flex: 1; min-width: 0; }
:is(.login-card, .register-card) > .oauth-block {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
}
:is(.login-card, .register-card) .oauth-button { gap: 6px; padding-inline: 8px; }
:is(.login-card, .register-card) .oauth-label { overflow-wrap: anywhere; }
.oauth-arrow { color: var(--oauth-muted); transition: transform .2s, color .2s; }
.oauth-button:hover .oauth-arrow { color: var(--oauth-accent); transform: translateX(2px); }
.oauth-divider {
    display: flex; align-items: center; gap: 14px; margin: 22px 0 2px;
    font-size: 11px; font-weight: 550; letter-spacing: .3px; color: var(--oauth-muted);
}
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--oauth-line); }
.oauth-divider + .register-form, .oauth-divider + .home-form { margin-top: 12px; }

/* Completed provider identity shown before the consent step. */
.oauth-account {
    display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 12px 14px;
    border: 1px solid var(--oauth-line); border-radius: 11px; background: var(--oauth-surface);
}
.oauth-account .oauth-logo { width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb, var(--oauth-accent), transparent 90%); }
.oauth-account .oauth-logo svg { width: 22px; height: 22px; }
.oauth-account-copy { min-width: 0; }
.oauth-account-copy strong { display: block; font-size: 12.5px; color: var(--oauth-ink); }
.oauth-account-copy small { display: block; margin-top: 2px; overflow: hidden; color: var(--oauth-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.oauth-account-cancel { flex: none; margin-left: auto; color: var(--oauth-muted); font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.oauth-account-cancel:hover { color: var(--oauth-accent); }

@media (prefers-reduced-motion: reduce) {
    .oauth-button, .oauth-arrow { transition: none; }
}
