/* =========================================================================
   QuickPay Bill Pay — Sign-in page
   -------------------------------------------------------------------------
   Adopts the api.identity login design pattern: a split brand / form hero.
   Here it is rendered as one elevated card centered on the portal's global
   brand-green gradient body, so the global layout, footer, and other pages
   stay untouched. Tokens come from css/design-system/tokens.css (--cy-*);
   typography is Hanken Grotesk (loaded in App.razor), scoped to the card.

   All selectors are namespaced under .login-hero / .login-* so nothing here
   leaks into the rest of the (MudBlazor / Cerebri Sans) app.
   ========================================================================= */

.login-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.75rem 1rem;
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-footer {
    position: relative;
    background: #23272a;
    color: rgba(255, 255, 255, 0.66);
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.25rem 2rem;
}

.login-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer-logo img {
    display: block;
    width: auto;
    height: 22px;
}

.login-footer-social,
.login-footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
}

.login-footer-social a {
    display: inline-flex;
    color: rgba(255, 255, 255, 0.75) !important;
}

.login-footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 1.75rem 0;
}

.login-footer-column {
    display: grid;
    align-content: start;
    gap: 0.55rem;
}

.login-footer-column h2 {
    margin: 0 0 0.3rem;
    color: #5fae66;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.74) !important;
    font-size: 0.88rem;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.login-footer a:hover {
    color: #fff !important;
}

.login-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

/* Light surface painted over the global brand-green body — scoped to the
   login page only (other pages keep the green gradient). A whisper of green
   tint keeps it on-brand without being a green page. */
.login-hero::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 520px at 84% -10%, var(--cy-tint-06), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #e8edea 100%);
    background-color: #e8edea;
}

/* ---- The split card --------------------------------------------------- */
.login-card {
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    background: var(--cy-surface);
    border: 1px solid var(--cy-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 22px 54px -30px rgba(16, 40, 28, 0.32);
    animation: cybsRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- Brand panel (the one bold green moment) -------------------------- */
.login-brand {
    position: relative;
    overflow: hidden;
    /* Deepened green so the panel reads as elevated against the lighter
       body gradient behind the card. */
    background: linear-gradient(160deg, var(--cy-primary-strong) 0%, var(--cy-primary) 92%);
    padding: 3rem 2.4rem;
    display: flex;
    align-items: center;
}

.login-brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.login-brand-logo {
    height: 30px;
    width: auto;
    display: block;
    margin-bottom: 2.25rem;
}

.login-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.login-brand-headline {
    margin: 0.85rem 0 0;
    font-size: 1.95rem;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.025em;
    color: #fff;
}

.login-brand-sub {
    margin: 1rem 0 0;
    max-width: 32ch;
    font-size: 0.98rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

.login-markers {
    list-style: none;
    margin: 1.9rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.login-markers li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.login-markers svg {
    flex: 0 0 auto;
}

.login-secure {
    margin-top: 1.9rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.84rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

/* Inline "Sign in instead" link on the green panel — white + underlined so it
   reads against the green (overrides util.Blazor's global green `a` color). */
.login-secure a {
    color: #fff !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-secure a:hover {
    color: #fff !important;
    text-decoration-thickness: 2px;
}

/* ---- Form panel ------------------------------------------------------- */
.login-form {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-head {
    margin-bottom: 1.4rem;
}

.login-title {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--cy-text);
}

.login-sub {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--cy-text-muted);
}

/* The .fp-form grid gap alone reads tight for a four-field lookup, so each
   field carries a little extra room below it. Scoped to the login form, so
   forms elsewhere keep the design system's default rhythm. */
.login-form .fp-field {
    margin-bottom: 0.625rem; /* 10px */
}

.login-submit.fp-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background-color: var(--cy-primary);
    border-radius: var(--cy-radius-sm);
    box-shadow: 0 10px 24px -12px rgba(31, 80, 38, 0.7);
}

.login-submit.fp-btn:not(:disabled):hover {
    background-color: var(--cy-primary-strong);
}

/* ---- "or" divider ----------------------------------------------------- */
.login-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.35rem 0;
    color: var(--cy-text-faint);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--cy-border);
}

/* ---- Secondary "Sign in with My Frontpoint" button -------------------- *
   A real anchor (full GET) so it hits the /account/login-sso challenge
   endpoint. !important beats util.Blazor's global `a { color … !important }`. */
.login-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.8rem 1.15rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cy-primary-strong) !important;
    background: var(--cy-surface);
    border: 1px solid var(--cy-border-strong);
    border-radius: var(--cy-radius-sm);
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.login-sso:hover {
    background: var(--cy-tint-06);
    border-color: var(--cy-tint-14);
    transform: translateY(-1px);
}

.login-sso:focus-visible {
    outline: none;
    box-shadow: var(--cy-ring);
    border-color: var(--cy-primary);
}

.login-sso svg {
    flex: 0 0 auto;
    color: var(--cy-primary);
}

/* ---- Magic-link confirmation state ------------------------------------ */
.login-confirm {
    text-align: center;
    padding: 1rem 0;
}

.login-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--cy-tint-10);
    color: var(--cy-primary);
}

.login-confirm .login-title {
    margin-bottom: 0.5rem;
}

/* Turnstile (interaction-only) — collapses to nothing until challenged. */
.login-turnstile {
    display: flex;
    justify-content: center;
    margin-top: 1.1rem;
}

.login-turnstile:empty {
    display: none;
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 820px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .login-brand {
        padding: 2.25rem 2rem;
    }

    .login-brand-logo {
        margin-bottom: 1.5rem;
    }

    .login-brand-headline {
        font-size: 1.7rem;
    }

    .login-form {
        padding: 2.25rem 1.75rem 2.5rem;
    }
}

/* On the smallest screens, drop the brand panel's supporting detail so the
   form stays close to the top — keep the eyebrow + headline for identity. */
@media (max-width: 560px) {
    .login-brand-sub,
    .login-markers,
    .login-secure {
        display: none;
    }

    .login-brand {
        padding: 1.9rem 1.6rem;
    }

    .login-brand-logo {
        margin-bottom: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card {
        animation: none;
    }
}

@media (max-width: 560px) {
    .login-footer-inner {
        padding: 2rem 1.5rem;
    }

    .login-footer-columns {
        gap: 2rem;
    }

    .login-footer-legal {
        align-items: flex-start;
        flex-direction: column;
    }
}
