﻿@import "fonts.css";

:root {
    --width-threshold: 64em;
    --a11y-outline: #0068b5;
    accent-color: #0068b5;
}

*:focus-visible, .form-control:focus, .btn:focus {
    outline: none !important;
    box-shadow: 0px 0px 6px 2px var(--a11y-outline), inset 0px 0px 2px 1px var(--a11y-outline) !important;
}

@view-transition {
    navigation: auto;
}

@keyframes --view-transition-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


::view-transition-old(root) {
    animation: none;
}

::view-transition-new(root) {
    animation: 100ms ease both --view-transition-in;
}

body {
    font-family: "Inter","Muli-Light", "Muli-Regular", Helvetica, Arial, sans-serif;
    letter-spacing: 0.1ex;
    background-color: #FFFFFF;

    &.bg1 .background-container .bg1 {
        display: block !important;
    }

    &.bg2 .background-container .bg2 {
        display: block !important;
    }
}

.background-container {
    > svg {
        display: none;
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 100vw;
        z-index: -1;
        pointer-events: none;

        &.bg1, &.bg2 {
            right: -35vw;
        }

        &.bg2 {
            height: calc(100vh - 2em);
        }
    }
}

.environment-label {
    position: absolute;
    position-anchor: --logo-container;
    position-area: block-end;
    margin-top: -1em;
    opacity: 0.4;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 28em;
    height: 100vh;
    color: #FFFFFF;
    background-color: #2a2828;

    @media (max-width: 64em) {
        width: 100vw;
    }
}

header.logo-container {
    text-align: center;
    margin-bottom: 2.5em;
    padding-inline: 1em;
    anchor-name: --logo-container;

    .logo {
        width: 100%;
        max-width: 28em;
        margin-bottom: 3em;
    }

    h1 {
        display: none;
    }
}

footer {
    position: fixed;
    right: 1em;
    bottom: 0.5em;
    color: #DFDFDF;
    mix-blend-mode: difference;
    transition: right 200ms ease, translate 200ms ease;
    font-weight: 200;

    @media (max-width: 800px) {
        right: 50vw;
        translate: 50% 0;
    }
}

a:link, a:visited {
    position: relative;
    color: currentColor;
    font-weight: bold;

    &::after {
        content: '';
        background-color: currentColor;
        position: absolute;
        top: calc(100% - 0.1em);
        left: 50%;
        right: 50%;
        height: 1px;
        transition: left 250ms ease, right 250ms ease;
    }

    &:hover, &:focus {
        text-decoration: none;

        &::after {
            left: 0;
            right: 0;
        }
    }
}

#PageForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-inline: 3em;
}

.top-message, .other-services-link {
    display: flex;
    align-items: flex-end;
    height: 200px;
    margin-bottom: 0.5em;
}

.top-message {
    --minimized-size: 2em;
    font-size: 3em;
}

.other-services-link {
    transition: margin-bottom 200ms ease;

    @media (max-width: 800px) {
        margin-bottom: 2.25em;
    }
}

.fieldset {
    display: flex;
    justify-content: center;
    gap: 0.5em;

    .input-group .input-group-prepend {
        display: none;
    }

    .form-control, button {
        background-color: rgb(255 255 255 / 0%);
        border: 1px solid #FFFFFF;
        transition: background-color 200ms ease;
        border-radius: 12px !important;

        &:hover, &:focus {
            background-color: rgb(255 255 255 / 15%);
            border: 1px solid #FFFFFF;
        }

        &:active {
            background-color: rgb(255 255 255 / 25%) !important;
            border: 1px solid #FFFFFF !important;
        }

        &[readonly], &[disabled] {
            background-color: rgb(255 255 255 / 0%);
            border: 1px solid #FFFFFF;
            opacity: 0.6;
            cursor: not-allowed;
        }
    }

    .form-control {
        height: 100%;
        color: #FFFFFF;
    }

    button {
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 1;
        width: 50px;
    }
}

.forgotten-password-label {
    margin-top: 1em;
    text-align: center;
}

.login-suffix-info {
    text-align: center;
    margin-top: 4em;

    a {
        margin-left: 0.5ex;
    }
}

.error {
    margin-top: 0.5em;
}

@keyframes shake {
    from {
        transform: translateX(0)
    }

    10% {
        transform: translateX(10px)
    }

    20% {
        transform: translateX(0)
    }

    30% {
        transform: translateX(-10xp)
    }

    40% {
        transform: translateX(0)
    }

    50% {
        transform: translateX(10px)
    }

    60% {
        transform: translateX(0)
    }

    70% {
        transform: translateX(-10px)
    }

    80% {
        transform: translateX(0)
    }

    90% {
        transform: translateX(10px)
    }

    to {
        transform: translateX(0)
    }
}

.horizontalShake {
    animation: shake 400ms normal forwards ease;
}

/* These want to be hidden, but still power the tooltip. */
#loginError,
#lockedError,
#disabledError,
#externalError {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tooltipster-base.tooltipster-default {
    max-width: 22rem;
    background-color: #F6D2CD;
    color: #B13321;
    border-radius: 10px;
    border-color: #D94A36;
    border-width: 1px;
    letter-spacing: 0.3ex;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.external-redirect-page {
    body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100vh;
        margin: 0;
        background: linear-gradient(135deg, #4d4a4a 0%, #2a2828 100%);
    }

    .redirect-container {
        text-align: center;
        max-width: 500px;
        background: white;
        padding: 40px;
        border-radius: 10px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    }

    .spinner {
        border: 4px solid #f3f3f3;
        border-top: 4px solid #151515;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin: 0 auto 20px;
    }

    h2 {
        color: #333;
        margin: 0 0 10px 0;
    }

    p {
        color: #666;
        margin: 0;
    }

    .mt-20 {
        margin-top: 20px;
    }
}
