/* Login-only styling; authentication forms and Core templates remain intact. */
body .typo3-login {
    --typo3-login-width: 420px;
    --typo3-login-padding-x: 2.25rem;
    --typo3-login-color: #252b33;
    --typo3-login-copyright-color: #505862;
    color-scheme: light;
    background-position: var(--kjf-login-position, center);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.typo3-login .typo3-login-inner {
    background: linear-gradient(90deg, rgb(12 22 32 / 42%), rgb(12 22 32 / 8%) 72%);
}

.typo3-login .typo3-login-container {
    align-items: center;
    padding: 3rem clamp(1.5rem, 7vw, 8rem);
}

.typo3-login .typo3-login-wrap {
    margin: 0 auto;
}

.typo3-login .card-login {
    --typo3-card-bg: #fff;
    --typo3-text-color-base: #252b33;
    --typo3-text-color-variant: #505862;
    background: #fff;
    color: #252b33;
    border: 0;
    border-top: 6px solid var(--kjf-login-primary);
    border-radius: 12px;
    margin-bottom: 0;
    box-shadow: 0 16px 64px rgb(0 0 0 / 24%);
    overflow: hidden;
}

.typo3-login .typo3-login-logo img,
.typo3-login .typo3-login-logo svg {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 128px;
    object-fit: contain;
}

.typo3-login .card-login .card-heading {
    padding-top: 2rem;
}

.typo3-login .card-login .card-body {
    padding-top: 1.75rem;
    padding-bottom: 1.5rem;
}

.typo3-login .card-login .card-footer {
    color: #505862;
    background: #f6f7f8;
    border-top: 4px solid var(--kjf-login-secondary);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Preserve the original TYPO3 logo color independently of site accents. */
.typo3-login .typo3-login-copyright-link svg {
    --typo3-login-highlight: #ff8700;
}

.typo3-login .card-login a {
    color: var(--kjf-login-link);
    text-underline-offset: 3px;
}

.typo3-login .form-label {
    color: #252b33;
}

.typo3-login .form-control {
    color: #252b33;
    background-color: #fff;
    border-color: #767d86;
    min-height: 46px;
}

.typo3-login .form-control::placeholder {
    color: #616872;
    opacity: 1;
}

.typo3-login .btn-login {
    --typo3-btn-color: var(--kjf-login-button-text);
    --typo3-btn-hover-color: var(--kjf-login-button-text);
    --typo3-btn-focus-color: var(--kjf-login-button-text);
    --typo3-btn-disabled-color: var(--kjf-login-button-text);
    --typo3-btn-hover-bg: var(--kjf-login-primary);
    --typo3-btn-focus-bg: var(--kjf-login-primary);
    --typo3-btn-hover-border-color: var(--kjf-login-primary);
    --typo3-btn-focus-border-color: var(--kjf-login-primary);
    min-height: 46px;
    font-weight: 700;
}

.typo3-login .btn-login:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.typo3-login :is(input, button, a):focus-visible {
    outline: 3px solid var(--kjf-login-link);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px #fff;
}

.typo3-login .typo3-login-footnote {
    position: static;
    margin: 0;
    padding: 1rem clamp(1.5rem, 7vw, 8rem);
    color: #fff;
    background: rgb(12 22 32 / 88%);
    text-align: left;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    body .typo3-login {
        --typo3-login-padding-x: 1.5rem;
        background-attachment: scroll;
        background-position: center top;
    }

    .typo3-login .typo3-login-inner {
        background: rgb(12 22 32 / 20%);
    }

    .typo3-login .typo3-login-container {
        align-items: center;
        padding: 2.5rem 1rem;
    }

    .typo3-login .typo3-login-footnote {
        padding: 1rem;
        text-align: center;
    }
}

@media (forced-colors: active) {
    .typo3-login .card-login {
        border: 1px solid CanvasText;
    }

    .typo3-login :is(input, button, a):focus-visible {
        outline-color: Highlight;
    }
}
