$offset: 187;
$duration: 1.4s;


@keyframes im-spinner-colors {
    0% { stroke: #4285F4; }
    25% { stroke: #DE3E35; }
    50% { stroke: #F7C223; }
    75% { stroke: #1B9A59; }
    100% { stroke: #4285F4; }
}

@keyframes im-spinner-monochrome {
    0% { stroke: #FFFFFF; }
    25% { stroke: #FFFFFF; }
    50% { stroke: #FFFFFF; }
    75% { stroke: #FFFFFF; }
    100% { stroke: #FFFFFF; }
}

@keyframes im-spinner-dash {
    0% {
        stroke-dashoffset: $offset;
    }
    50% {
        stroke-dashoffset: $offset/4;
        transform:rotate(135deg);
    }
    100% {
        stroke-dashoffset: $offset;
        transform:rotate(450deg);
    }
}

@keyframes rotator {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(270deg);
    }
}


.im-spinner {
    animation: rotator $duration linear infinite;

    .path {
        animation: im-spinner-dash $duration ease-in-out infinite,
                    im-spinner-colors ($duration*4) ease-in-out infinite;
        stroke-dasharray: $offset;
        stroke-dashoffset: 0;
        transform-origin: center;

        &.monochrome {
            animation: im-spinner-dash $duration ease-in-out infinite,
                        im-spinner-monochrome ($duration*4) ease-in-out infinite;
        }
    }


}
