@import '~app/components/ui/colors.scss';

.componentLoader {
    text-align: center;
    font-size: 20px;
}

.spins {
    height: 2em;
    display: flex;
    flex-shrink: 1;
    flex-basis: 0;
    flex-direction: row;
}

.spin {
    height: 1em;
    width: 1em;
    display: inline-block;
    margin: 0.5em 0.1em;
    opacity: 0;
    animation: loaderAnimation 1s infinite;
}

@for $i from 0 to 5 {
    .spin#{$i} {
        animation-delay: 0.1s * $i;
    }
}

/**
 * Skins
 */
.lightComponentLoader {
    .spin {
        background: #aaa;
    }
}

.darkComponentLoader {
    .spin {
        background: #444;
    }
}

@keyframes loaderAnimation {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
        transform: scaleY(2);
    }

    100% {
        opacity: 0;
    }
}
