/* Reset and base styles */
body {
    margin: 0;
}

* {
    box-sizing: border-box;
}

hr {
    width: 100%;
}

/* Custom login page layout */
.custom-login-page .page-wrapper {
    position: relative;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100svh;
    padding-top: 0;
}

.custom-login-page .page-content {
    width: 100%;
    box-sizing: border-box;
}

/* Custom banner and logo */
.page-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.page-background::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}

.page-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-login-page .page-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
}

.custom-login-logo {
    display: block;
    margin: 0 auto;
    height: 5.6rem;

    img {
        height: 100%;
        width: auto;
        object-fit: contain;
    }
}

/* Custom login container */
.login-form {
    position: relative;
    text-align: center;
    overflow: hidden;
    width: 100%;
    max-width: 45rem;
    padding: 2rem;
    margin: 0 auto;
    border-radius: 1rem;
    box-shadow: 0 0.2rem 2rem 0 rgba(50, 50, 50, 0.15);
    background-color: var(--background, #fff);
}

.login-form .form-title {
    margin: 1rem auto 2rem;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--main, #000);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    border: 0.1rem solid var(--border, #ccc);
}

.login-form input:focus,
.login-form input:focus-visible {
    outline: var(--main, #000) auto 0.1rem;
}

/* Form group */
.login-form .form-field {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    color: var(--text, #000);
    font-size: 1.4rem;
}

.btn-wrapper {
    position: relative;
    margin-top: 1rem;
}

.login-form .btn-wrapper .loader-wrapper .loader {
    width: 3rem;
}

.login-form .form-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 1.4rem;
    color: var(--main, #000);
}

/* System message */
.system-message {
    color: red;
    font-size: 1.2rem;
    margin: 0.5rem 0;
    text-align: left;
}

.response-message {
    text-align: center;
    font-size: 1.4rem;
}

.page-footer {
    --color: var(--text, #fff);
    padding: 0 var(--page-edge-padding, 1rem) 8rem;
    color: var(--color);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: end;
    gap: 0.5rem;
}

.login-form .loader-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background);
    opacity: 0.7;
    z-index: 999999;

    .loader {
        position: absolute;
        display: block;
        width: 5rem;
        inset: 0;
        margin: auto;

        &:before {
            content: "";
            display: block;
            padding-top: 100%;
        }

        .path {
            stroke: var(--main);
        }
    }

    .circular {
        animation: custom-login-rotate 2s linear infinite;
        height: 100%;
        transform-origin: center center;
        width: 100%;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
    }

    .path {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
        animation: custom-login-dash 1.5s ease-in-out infinite;
        stroke-linecap: round;
    }
}

@keyframes custom-login-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes custom-login-dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124px;
    }
}

@media (max-width: 768px) {
    .custom-login-logo {
        height: 4rem;
    }

    .login-form {
        min-width: auto;
    }

    .login-form .form-title {
        font-size: 2rem;
    }

    .login-form input[type="text"],
    .login-form input[type="password"] {
        padding: 0.8rem;
    }

    .login-form .form-field {
        margin-bottom: 0.8rem;
    }

    .page-header {
        padding-bottom: 3rem;
    }

    .page-footer {
        padding: 1rem;
    }
}
