.bg__loading {
    font-size: 0;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(white, 0.4);
    z-index: 9999;
    pointer-events: none;

    .bg__spinner,
    .bg__spinner:after {
        border-radius: 50%;
        width: 80px;
        height: 80px;
    }
    .bg__spinner {
        position: absolute;
        left: 50%;
        top: 50%;
        margin-top: -40px;
        margin-left: -40px;
        border: 5px solid rgba($clDark, 0.5);
        border-left: 5px solid rgba($clDark, 0.1);
        transform: translateZ(0);
        animation: loadingSpin 0.7s infinite linear,
            loadingColors 5.1s infinite linear;
    }
}

@keyframes loadingSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingColors {
    0% {
        border-color: rgba($clDark, 0.5);
        border-left-color: rgba($clDark, 0.1);
    }
    33% {
        border-color: rgba($clPrimary, 0.5);
        border-left-color: rgba($clPrimary, 0.1);
    }
    66% {
        border-color: rgba($clSecondary, 0.5);
        border-left-color: rgba($clSecondary, 0.1);
    }
}
