$color: white;

.loading {
    display: inline-block;
    width: 100%;
    height: 100%;
    position: relative;

    &__icon {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        font-size: 4px;
        border-top: 1.1em solid rgba($color, 0.2);
        border-right: 1.1em solid rgba($color, 0.2);
        border-bottom: 1.1em solid rgba($color, 0.2);
        border-left: 1.1em solid $color;
        -webkit-transform: translateZ(0);
        -ms-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-animation: turnAnimation 1.1s infinite linear;
        animation: turnAnimation 1.1s infinite linear;

        &,
        &:after {
            border-radius: 50%;
            width: 30px;
            height: 30px;
        }
    }

    &_large {

        .loading__icon,
        .loading__icon:after {
            font-size: 7px;
            width: 60px;
            height: 60px;
        }
    }

    &_backgrounded {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 4px;
        background-color: rgba(black, 0.2);
    }

    @-webkit-keyframes turnAnimation {
        0% {
            -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
        }
        100% {
            -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
        }
    }
    @keyframes turnAnimation {
        0% {
            -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
        }
        100% {
            -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
        }
    }
}
