/* Focused Google-only login, using the theme's canonical light/dark tokens. */
@font-face {
    font-family: 'Google Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    /* Official subset for the normal and outgoing-navigation button labels. */
    src: url('../fonts/google-sans-medium.woff2') format('woff2');
}

body.auth-login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    /* The regular site reserves space for a fixed header and bottom nav. */
    padding: 0 !important;
    letter-spacing: normal;
}

.auth-login-page .auth-site-header {
    position: static;
    height: auto !important;
    flex: 0 0 auto;
    /* Mobile site-header rules are locked with !important in the shared CSS. */
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    will-change: auto;
}

.auth-login-page .container {
    padding-inline: 16px;
}

.auth-site-header .site-header-container {
    height: auto;
    max-width: 1280px;
    min-height: 80px;
    gap: 16px;
}

.auth-header-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.auth-header-browse {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--foreground);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.auth-header-browse:hover {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-header-actions .theme-toggle {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
}

.auth-header-actions .theme-toggle:hover {
    background: var(--muted);
}

.auth-login-page .site-main {
    display: flex;
    flex: 1 0 auto;
    padding: 0;
}

.auth-login-page .auth-page {
    display: grid;
    place-items: center;
    min-height: 0;
    padding-block: 40px;
}

.auth-login-page .auth-panel {
    width: 100%;
    max-width: 448px;
    margin: 0;
    padding: 32px;
    background: var(--card);
    border: 0;
    border-radius: var(--radius-xl);
    text-align: left;
}

.auth-panel .auth-brand-name {
    margin: 0 0 20px;
    color: var(--primary);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.5;
}

.auth-panel #auth-heading {
    margin: 0 0 12px;
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: var(--font-size-2xl);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
    text-wrap: balance;
}

.auth-panel .auth-intro {
    max-width: none;
    margin: 0 0 32px;
    color: var(--muted-foreground);
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

.auth-panel .google-login-btn {
    min-height: 48px;
    padding: 12px;
    gap: 10px;
    background: #fff;
    border: 1px solid #747775;
    border-radius: var(--radius-xl);
    box-shadow: none;
    color: #1f1f1f;
    font-family: 'Google Sans', var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: normal;
    text-decoration: none;
    transition: background-color 180ms ease;
}

.auth-panel .google-login-btn:hover,
.auth-panel .google-login-btn:focus-visible,
.auth-panel .google-login-btn[aria-busy="true"] {
    background: #f2f2f2;
    border-color: #747775;
    box-shadow: none;
    color: #1f1f1f;
    transform: none;
}

.auth-panel .google-brand-logo {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

.auth-provider-note {
    min-height: 24px;
    margin: 12px 0 0;
    color: var(--muted-foreground);
    font-size: var(--font-size-xs);
    line-height: 1.7;
    text-align: center;
}

.auth-new-account {
    margin: 24px 0 0;
    color: var(--foreground);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    text-wrap: pretty;
}

.auth-panel .auth-note {
    max-width: none;
    margin: 24px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: var(--font-size-xs);
    line-height: 1.8;
}

.auth-note a {
    display: inline-block;
    color: var(--foreground);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.auth-note a:hover {
    color: var(--primary);
}

.auth-panel .auth-error {
    margin-bottom: 24px;
    padding: 16px;
    color: var(--foreground);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.auth-error strong {
    display: block;
    margin-bottom: 4px;
    color: var(--destructive);
    font-weight: 600;
}

.auth-error p {
    margin: 0;
}

.auth-browse-link {
    width: 100%;
    min-height: 48px;
}

.auth-site-footer {
    flex: 0 0 auto;
    padding: 24px 0;
    color: var(--muted-foreground);
    font-size: var(--font-size-xs);
    line-height: 1.7;
}

.auth-site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 640px) {
    .auth-site-header .site-header-container {
        min-height: 72px;
    }
    .auth-header-actions {
        gap: 12px;
    }
    .auth-header-browse {
        font-size: var(--font-size-xs);
    }
    .auth-login-page .auth-page {
        padding-block: 24px;
    }
    .auth-login-page .auth-panel {
        padding: 24px;
    }
    .auth-site-footer .container {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 359px) {
    .auth-header-browse {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-panel .google-login-btn {
        transition: none;
    }
}
