$sizes: 12, 16, 24, 48, 80;

@keyframes loading-spinner {
    0% {
        transform: rotate(0deg);
    }

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

.LoadingSpinner {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    opacity: 0;
    transition: ease 1s;
    width: 100%;
    position: relative;

    &.show {
        opacity: 100;
    }

    &-inline {
        width: unset;
        height: unset;
        display: inline-flex;
    }

    &-inner {
        animation: loading-spinner 0.75s infinite linear;
        border: 3px solid var(--loading-patterns-spinners-light-base);
        border-left-color: var(--loading-patterns-spinners-light-accent);
        border-radius: 50%;
        height: 30px;
        width: 30px;

        @each $size in $sizes {
            &.size-#{$size} {
                width: #{$size}px;
                height: #{$size}px;
            }
        }

        &.size-12 {
            border-width: 2px;
        }
        &.size-16 {
            border-width: 2.5px;
        }
        &.size-24 {
            border-width: 3px;
        }
        &.size-48 {
            border-width: 5px;
        }
        &.size-80 {
            border-width: 6px;
        }
    }

    &-percentage {
        position: absolute;
        margin: 0 !important;
    }
}
