﻿.loader {
    color: #fff;
    position: fixed;
    box-sizing: border-box;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: 999999;
}

    .loader:after, .loader:before {
        box-sizing: border-box;
    }

    .loader.is-active {
        /*background-color: rgba(0,0,0,0.85);*/
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
    }

@keyframes rotation {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(359deg);
    }
}

@keyframes blink {
    from {
        opacity: .5;
    }

    to {
        opacity: 1;
    }
}

.loader[data-text]:before {
    position: fixed;
    left: 0;
    top: 50%;
    color: currentColor;
    font-family: Helvetica,Arial,sans-serif;
    text-align: center;
    width: 100%;
    font-size: 0.875rem;
}

.loader[data-text='']:before {
    content: 'Loading';
}

.loader[data-text]:not([data-text='']):before {
    content: attr(data-text);
}

.loader[data-text][data-blink]:before {
    animation: blink 1s linear infinite alternate;
}

.loader-default[data-text]:before {
    top: calc(50% - 3.9375rem);
}

.loader-default:after {
    content: '';
    position: fixed;
    width: 3rem;
    height: 3rem;
    border: solid 0.5rem #fff;
    border-left-color: transparent;
    border-radius: 50%;
    top: calc(50% - 1.5rem);
    left: calc(50% - 1.5rem);
    animation: rotation 1s linear infinite;
}

.loader-default[data-half]:after {
    border-right-color: transparent;
}

.loader-default[data-inverse]:after {
    animation-direction: reverse;
}

.loader-double:after, .loader-double:before {
    content: '';
    position: fixed;
    border-radius: 50%;
    border: solid 0.5rem;
    animation: rotation 2s linear infinite;
}

.loader-double:after {
    width: 3rem;
    height: 3rem;
    border-color: #682B8D;
    border-left-color: transparent;
    top: calc(50% - 1.5rem);
    left: calc(50% - 1.5rem);
}

.loader-double:before {
    width: 4.5rem;
    height: 4.5rem;
    border-color: #539636;
    border-right-color: transparent;
    animation: rotation 1.618s linear infinite;
    animation-direction: reverse;
    top: calc(50% - 2.25rem);
    left: calc(50% - 2.25rem);
}

.loader-bar[data-text]:before {
    top: calc(50% - 2.5rem);
    color: #fff;
}

.loader-bar:after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 12.5rem;
    height: 1.25rem;
    transform: translate(-50%, -50%);
    background: linear-gradient(-45deg, #4183d7 25%, #52b3d9 25%, #52b3d9 50%, #4183d7 50%, #4183d7 75%, #52b3d9 75%, #52b3d9);
    background-size: 1.25rem 1.25rem;
    box-shadow: inset 0 0.625rem 0 rgba(255,255,255,0.2),0 0 0 0.3125rem rgba(0,0,0,0.2);
    animation: moveBar 1.5s linear infinite;
}

.loader-bar[data-rounded]:after {
    border-radius: 0.9375rem;
}

@keyframes moveBar {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 1.25rem 1.25rem;
    }
}

@keyframes corners {
    6% {
        width: 3.75rem;
        height: 0.9375rem;
    }

    25% {
        width: 0.9375rem;
        height: 0.9375rem;
        left: calc(100% - 0.9375rem);
        top: 0;
    }

    31% {
        height: 3.75rem;
    }

    50% {
        height: 0.9375rem;
        top: calc(100% - 0.9375rem);
        left: calc(100% - 0.9375rem);
    }

    56% {
        width: 3.75rem;
    }

    75% {
        width: 0.9375rem;
        left: 0;
        top: calc(100% - 0.9375rem);
    }

    81% {
        height: 3.75rem;
    }
}

.loader-border[data-text]:before {
    color: #fff;
}

.loader-border:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.9375rem;
    height: 0.9375rem;
    background-color: #fff000;
    animation: corners 3s ease both infinite;
}

.loader-ball:before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    left: 50%;
    margin: -31.5625rem 0 0 -31.5625rem;
    background-color: #fff;
    border-radius: 50%;
    z-index: 1;
    animation: kick 1s infinite alternate ease-in both;
}

.loader-ball[data-shadow]:before {
    box-shadow: -0.3125rem -0.3125rem 0.625rem 0 rgba(0,0,0,0.5) inset;
}

.loader-ball:after {
    content: '';
    position: absolute;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 2.8125rem;
    height: 1.25rem;
    top: calc(50% + 0.625rem);
    left: 50%;
    margin: 0 0 0 -1.40625rem;
    z-index: 0;
    animation: shadow 1s infinite alternate ease-out both;
}

@keyframes shadow {
    0% {
        background-color: transparent;
        transform: scale(0);
    }

    40% {
        background-color: transparent;
        transform: scale(0);
    }

    95% {
        background-color: rgba(0,0,0,0.75);
        transform: scale(1);
    }

    100% {
        background-color: rgba(0,0,0,0.75);
        transform: scale(1);
    }
}

@keyframes kick {
    0% {
        transform: translateY(-5rem) scaleX(0.95);
    }

    90% {
        border-radius: 50%;
    }

    100% {
        transform: translateY(0) scaleX(1);
        border-radius: 50% 50% 20% 20%;
    }
}
