﻿.login-main-panel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100%;
    float: right;
    transition: all .3s;
    background-image: url(https://thumbs.dreamstime.com/b/law-firm-logo-concept-lawyer-attorney-legal-service-template-jurist-judge-business-woman-scales-justice-symbol-326864528.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.min-vh-90 {
    min-height: 90vh !important;
}

:root {
    --size: 120px; /* default size */
    --neon: goldenrod;
    --background: black;
    --timer: 1s;
}

/* Bigger screens → bigger loader */
@media (min-width: 768px) {
    :root {
        --size: 180px;
    }
}

@media (min-width: 1200px) {
    :root {
        --size: 220px;
    }
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 99999;
}

    #loader.hidden {
        display: none;
    }

@keyframes animate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader {
    width: var(--size);
    height: var(--size);
    animation: animate calc(var(--timer) * 3) linear infinite;
    position: absolute;
    border: 0px solid #6861ce
}

    .loader span {
        position: absolute;
        inset: calc(var(--size) * 0.1);
        background: var(--background);
        border-radius: 50%;
    }

div[class*='segment']:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to top, transparent, var(--neon));
    border-top-left-radius: calc(var(--size) * 0.5);
    border-bottom-left-radius: calc(var(--size) * 0.5);
}

.segment1 {
    animation-delay: calc(var(--timer) * -0);
}

.segment2 {
    animation-delay: calc(var(--timer) * -1);
}

.segment3 {
    animation-delay: calc(var(--timer) * -2);
}

.loader i {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--size) * 0.1);
    height: calc(var(--size) * 0.1);
    background: var(--neon);
    border-radius: 50%;
    box-shadow: 0 0 calc(var(--size) * 0.1) var(--neon), 0 0 calc(var(--size) * 0.2) var(--neon), 0 0 calc(var(--size) * 0.3) var(--neon), 0 0 calc(var(--size) * 0.4) var(--neon), 0 0 calc(var(--size) * 0.5) var(--neon);
}

/* Text */
#loader p {
    margin-top: calc(var(--size) * 0.1);
    font-size: clamp(1rem, 3vw, 1.5rem); /* responsive font */
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 0 10px; /* avoid overflow */
    text-shadow: 0 0 10px var(--neon);
    z-index: 99999;
}
