:root {
    --flex-loader-primary-color: #222;
    --flex-loader-secondary-color: #444;
}

.flex-loader-overlay, .flex-loader-overlay * {
    box-sizing: border-box;
}

.flex-loader-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 100vw;
    min-height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    padding: 30px;
    margin: 0;
    z-index: 1090;
    animation: flexLoaderOverlayAnimation 0.5s;
    animation-fill-mode: both;
}

.flex-loader-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flex-loader-box > * {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 10px;
}

.flex-loader-body {
    width: 90px;
    height: 90px;
}

.flex-loader-text {
    color: var(--primary-color);
    font-weight: bold;
}

.flex-loader-inside-overlay {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.flex-loader-inside-overlay .flex-loader-inside-element {
    animation: flexLoaderInsiderElementAnimation 0.5s;
    animation-fill-mode: both;
}

.flex-loader-circle {
    width: 90px;
    height: 90px;
    border: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: flexLoaderCircleAnimation 3s infinite;
    animation-timing-function: linear;
    animation-fill-mode: both;
    position: absolute;
}

.flex-loader-inside-overlay .flex-loader-circle {
    width: 30px;
    height: 30px;
}

.flex-loader-circle:nth-child(1) { animation-delay: 0s; }
.flex-loader-circle:nth-child(2) { animation-delay: 1s; }
.flex-loader-circle:nth-child(3) { animation-delay: 2s; }

@keyframes flexLoaderOverlayAnimation {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes flexLoaderCircleAnimation {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    
    50% {
        opacity: 1;
        transform: scale(0.5);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

@keyframes flexLoaderInsiderElementAnimation {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}
