/*
 * The sign-in page, drawn like the phone's login screen (login/LoginComposable.kt): the pals' faces
 * over a soft yellow glow, the logo, "Your circle's waiting", the black (white in dark mode) Apple
 * and Google buttons, then "Trouble logging in? Contact us" and the legal line pinned at the bottom.
 */

:root {
    --wa-login-surface-variant: #666666;
    --wa-login-surface-tint: #724E4C;
    --wa-login-button: #000000;
    --wa-login-on-button: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --wa-login-surface-variant: #B3B3B3;
        --wa-login-surface-tint: #FFB3AF;
        --wa-login-button: #FFFFFF;
        --wa-login-on-button: #000000;
    }
}
:root[data-theme="dark"] {
    --wa-login-surface-variant: #B3B3B3;
    --wa-login-surface-tint: #FFB3AF;
    --wa-login-button: #FFFFFF;
    --wa-login-on-button: #000000;
}

.wa-centered-page:has(> .wa-login) {
    padding: 0;
    gap: 0;
    align-items: stretch;
    justify-content: stretch;
    background: var(--md-background);
}
.wa-centered-page:has(> .wa-login) > .wa-centered-brand { display: none; }

.wa-login {
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    color: var(--md-on-surface);
}
.wa-login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: max(32px, env(safe-area-inset-top));
    text-align: center;
    animation: wa-login-fade-in 600ms ease;
}
@keyframes wa-login-fade-in { from { opacity: 0; } to { opacity: 1; } }
/* computers: the whole sign-in block (faces, logo, words, buttons, footer) sits together in the middle of
   the window with normal spacing, instead of the phone's full-height layout that parks the buttons at the
   bottom of a tall window; phones keep the app's layout (Anudeep, 2026-10-28) */
@media (min-width: 900px) and (min-height: 700px) {
    .wa-centered-page:has(> .wa-login) { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
    .wa-login { min-height: 0; padding: 40px 24px; }
    .wa-login-content { flex: none; padding-top: 0; margin-bottom: 40px; }
}

.wa-login-face-arc {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 4px 0;
}
.wa-login-face-arc::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--md-secondary) 20%, transparent), transparent);
    pointer-events: none;
}
.wa-login-face {
    position: relative;
    width: 48px;
    height: 48px;
    border: 2px solid var(--md-background);
    border-radius: 999px;
    object-fit: cover;
    background: var(--md-surface-container-highest);
}
.wa-login-face + .wa-login-face { margin-left: -12px; }

.wa-login-logo {
    width: 128px;
    height: 128px;
    margin-top: 20px;
    border-radius: 16px;
    background: #1B1A1A;
    object-fit: cover;
}
.wa-login-title { margin: 16px 0 8px; font-size: calc(32px * var(--wa-text-scale, 1)); line-height: calc(40px * var(--wa-text-scale, 1)); font-weight: 600; letter-spacing: -0.01em; }
.wa-login-subtitle { margin: 0; font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; color: var(--wa-login-surface-variant); }

.wa-login-buttons { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 32px; }
.wa-login-status {
    min-height: 36px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(13px * var(--wa-text-scale, 1));
    color: var(--md-on-surface-variant);
    text-align: center;
}
.wa-login-status.wa-sign-in-status--error { color: var(--md-error); }
.wa-login-provider-button {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--wa-login-button);
    color: var(--wa-login-on-button);
    font: inherit;
    font-size: calc(14px * var(--wa-text-scale, 1));
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 120ms ease, transform 120ms ease;
}
.wa-login-provider-button svg { width: 20px; height: 20px; flex: none; }
.wa-login-provider-button:active { transform: scale(0.98); }
.wa-login-provider-button:disabled { opacity: 0.38; cursor: default; transform: none; }
.wa-login-provider-button:focus-visible { box-shadow: var(--wa-focus-ring); }

/* while sign-in is under way (web-app-sign-in.js): the buttons give way to a spinner and the status */
[data-sign-in-state="signing-in"] .wa-login-provider-button { display: none; }
[data-sign-in-state="signing-in"] .wa-login-status {
    min-height: 120px;
    flex-direction: column;
    gap: 16px;
    font-size: calc(16px * var(--wa-text-scale, 1));
    font-weight: 600;
    color: var(--wa-login-on-surface, var(--md-on-surface));
}
[data-sign-in-state="signing-in"] .wa-login-status::before {
    content: "";
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid currentColor;
    border-right-color: transparent;
    animation: wa-sign-in-spin 800ms linear infinite;
}
@keyframes wa-sign-in-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    [data-sign-in-state="signing-in"] .wa-login-status::before { animation-duration: 2400ms; }
}

/* store badges on a phone, under the sign-in button */
.wa-login-store-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0 16px 8px;
}
.wa-login-store-badge { display: block; height: 40px; width: auto; }
@media (min-width: 900px) {
    .wa-login-store-badges { display: none; }
}

.wa-login-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: max(8px, var(--wa-bottom-inset));
}
.wa-login-help {
    padding: 8px;
    font-size: calc(11px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    font-weight: 500;
    color: var(--wa-login-surface-variant);
    text-decoration: none;
}
.wa-login-legal {
    width: 100%;
    margin: 0;
    padding: 8px 16px 12px;
    border-top: 1px solid var(--md-outline-variant);
    font-size: calc(11px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    font-weight: 500;
    color: var(--md-on-surface);
    text-align: center;
}
.wa-login-legal a { color: var(--wa-login-surface-tint); text-decoration: none; }
