/* ============================================================
   Elioplus Design System - split-screen login layout
   ============================================================

   Used by Components/ElioplusLoginPage.razor, and by pages that reuse the same
   classes for a second screen (a register form, say) without going through the
   component. Those classes are therefore plain global class names, not scoped:
   a consuming page gets them by linking this file, not by importing anything.

   --ds-login-* are this component's own values. They point at the legacy brand
   primitives in foundations/tokens.css (the only place a colour literal lives) and
   are declared here because they describe the login surface, not a role the rest of
   the system shares. An application that wants a different login skin overrides
   them in its own stylesheet, linked after this one.

   MudBlazor's controls inside the form are shaped through MudBlazor's own custom
   property (--mud-default-borderradius) rather than by reaching into its markup or
   forcing the cascade.
   ============================================================ */

:root {
    --ds-login-brand: var(--ds-legacy-blue-600);
    --ds-login-brand-dark: var(--ds-legacy-blue-800);
    --ds-login-bg: var(--ds-legacy-blue-50);
    --ds-login-muted: var(--ds-legacy-steel);
    /* The form's fields and submit button are a touch rounder than the app's 8px. */
    --ds-login-radius: 10px;
}

.login-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--ds-login-bg);
}

/* Left brand panel */
.login-brand {
    flex: 1 1 42%;
    min-width: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    color: var(--ds-text-inverse);
    background: linear-gradient(135deg, var(--ds-login-brand) 0%, var(--ds-login-brand-dark) 100%);
}

/* Two faint decorative discs. Tints of white too faint for the --ds-white-a* text
   ladder, so they are mixed from the token rather than written down. */
.login-brand::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ds-white) 7%, transparent);
    pointer-events: none;
}

.login-brand::after {
    content: '';
    position: absolute;
    bottom: -90px;
    left: -70px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ds-white) 5%, transparent);
    pointer-events: none;
}

.login-brand-logo {
    position: relative;
    z-index: 1;
    font-size: var(--ds-text-20);
    font-weight: var(--ds-weight-bold);
    letter-spacing: 0.02em;
    color: var(--ds-text-inverse);
}

.login-logo {
    position: relative;
    z-index: 1;
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.login-brand-mid {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-product-name {
    margin: 0 0 20px 0;
    font-size: 0.78rem;
    font-weight: var(--ds-weight-semibold);
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--ds-white-a75);
}

.login-heading {
    margin: 0 0 16px 0;
    font-size: 2.5rem;
    line-height: 1.15;
    font-weight: var(--ds-weight-bold);
    color: var(--ds-text-inverse);
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.login-subtext {
    margin: 0;
    max-width: 380px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ds-white-a90);
}

.login-brand-foot {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    color: var(--ds-white-a75);
}

/* Right form panel */
.login-form-panel {
    flex: 1 1 58%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: var(--ds-surface);
}

/* MudBlazor reads its field outline and button radius from this property, so setting
   it here rounds every control in the form without touching MudBlazor's markup. */
.login-form-wrap {
    width: 100%;
    max-width: 380px;
    --mud-default-borderradius: var(--ds-login-radius);
}

/* MudBlazor's filled-button rules are single classes linked before this file, so these
   win on order. The glow is the brand blue, mixed from its token. */
.login-submit-btn {
    height: 50px;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--ds-login-brand) 18%, transparent);
    transition: transform 0.1s ease, box-shadow 0.18s ease;
}

.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--ds-login-brand) 28%, transparent);
}

.login-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ds-login-brand) 16%, transparent);
}

/* In-form footer */
.login-footer {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.login-footer-caption {
    font-size: 0.78rem;
    color: var(--ds-login-muted);
}

.login-help-link {
    font-size: 0.78rem;
    font-weight: var(--ds-weight-semibold);
    color: var(--ds-login-brand);
    text-decoration: none;
}

.login-help-link:hover {
    color: var(--ds-login-brand-dark);
    text-decoration: underline;
}

/* Small screens show the form alone. The brand panel holds the page's h1, so it is
   hidden visually rather than with display: none, which would take the heading out of
   the accessibility tree and leave the page without one. */
@media (max-width: 900px) {
    .login-brand {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .login-form-panel {
        flex: 1 1 100%;
    }
}
