@keyframes spin {
    100% {
        transform: rotateZ(360deg);
    }
}

@keyframes loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

[stories-placeholder] {
    box-sizing: border-box;
    margin: 0 0 0 -40px;
    display: flex;
    padding: 0;
    list-style: none;
}

[stories-placeholder] > * {
    display: block;
    padding: 0 0 0 40px;
    box-sizing: border-box;
    width: calc(100% * 1 / 7.001);
}

[stories-placeholder] > * > * {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    aspect-ratio: 1/1;
    background: linear-gradient(100deg, #eceff1 30%, #f6f7f8 50%, #eceff1 70%);
    background-size: 400%;
    animation: loading 1.2s ease-in-out infinite;
}

[stories] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

[stories-previews] ul:not(.uk-grid) {
    margin-left: -40px;
}

[stories-previews] ul:not(.uk-grid) > * {
    padding-left: 40px;
    width: calc(100% * 1 / 7.001);
}

[stories-previews-wrap] {
    position: relative;
    border-radius: 50%;
    padding: 3px;
    box-sizing: border-box;
    background-clip: padding-box;
    transition: transform 300ms;
}

[stories-previews-wrap]:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(to right, #f1c43f, #de8700);
    transform: rotate(-45deg);
    transition: transform 300ms;
}

[stories-previews-wrap].view {
    background: #e2e2e2;
}

[stories-previews-wrap]:hover::before {
    transform: rotate(135deg);
    transition: transform 500ms;
}

[stories-previews] [stories-previews-item] {
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}

[stories-previews] [stories-previews-item]:hover {
    cursor: pointer;
    border-color: #eee;
    transition: border-color 300ms;
}

[stories-previews] [stories-previews-item] .background {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
}

[stories-previews] [stories-previews-item] .background-blur {
    filter: blur(10px);
}

[stories-previews] [stories-previews-item] img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 2;
}

[stories-previews] [stories-previews-item] .text {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    z-index: 2;
}

[stories-previews] [stories-previews-item] .text div {
    border-radius: 4px;
    background: #fff;
    padding: 5px;
    margin: 5px 20px;
    color: #000;
    font-size: 11px;
    line-height: 13px;
    text-align: center;
}

[stories-previews] [stories-previews-item] .icon {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    z-index: 2;
    border: none;
    color: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

[stories-previews] [stories-previews-item]:hover .icon {
    background-color: #222;
    color: #fff;
}

[stories-modal] {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1010;
    overflow-y: auto;
    padding: 0;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    transition: opacity .15s linear;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

[stories-modal].open {
    opacity: 1;
    transition: opacity .15s linear;
}

[stories-modal-container] {
    display: flow-root;
    position: relative;
    box-sizing: border-box;
    margin: calc(5vh / 2) auto auto;
    height: 95vh;
    max-width: 100% !important;
    aspect-ratio: auto 9 / 16;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: .3s linear;
    transition-property: opacity, transform;
    z-index: 2;
}

[stories-modal] [stories-close],
[stories-modal] [stories-toggle] {
    position: absolute;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 5px;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 50%;
    z-index: 9;
    background-color: rgba(255, 255, 255, .2);
    transition: background-color 300ms;
}

@media screen and (hover: hover) {
    [stories-modal] [stories-close]:hover,
    [stories-modal] [stories-toggle]:hover {
        cursor: pointer;
        background-color: rgba(255, 255, 255, .5);
        transition: background-color 300ms;
    }
}

[stories-modal] [stories-close] {
    top: 20px;
}

[stories-modal] [stories-toggle] {
    top: 80px;
}

[stories-modal] [stories-modal-prev],
[stories-modal] [stories-modal-next] {
    position: absolute;
    top: calc(50% - 30px);
    bottom: 0;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, .4);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    color: #fff;
    transition: background-color 300ms;
}

[stories-modal] [stories-modal-prev] {
    transform: rotate(-180deg);
    left: -90px;
}

[stories-modal] [stories-modal-next] {
    right: -90px;
}

@media screen and (hover: hover) {
    [stories-modal] [stories-modal-prev]:hover,
    [stories-modal] [stories-modal-next]:hover {
        cursor: pointer;
        background-color: rgba(255, 255, 255, .6);
        transition: background-color 300ms;
    }
}

[stories-modal-content] {
    width: 100%;
    height: 100%;
}

[stories-element] {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    width: 100%;
    height: 100%;
}

[stories-counter] {
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    right: 0;
    padding: 5px;
    z-index: 3;
}

[stories-counter] > div {
    position: relative;
    flex: 1;
    border-radius: 6px;
    height: 6px;
    margin-right: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

[stories-counter] > div:last-child {
    margin-right: 0;
}

[stories-counter] > div.view {
    background: #fff;
}

[stories-counter] > div .progress {
    height: 100%;
    background: transparent;
    transition: width 100ms;
}

[stories-counter] > div.view .progress {
    background: #fff;
}

[stories-counter] > div.active .progress {
    background: #fff;
    width: 0;
}

[stories-counter] > div .animate {
    animation-timing-function: ease-in-out;
    transition: width 100ms;
}

[stories-background] {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(15px);
    z-index: 1;
    transform: scale(2);
}

[stories-content] {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

[stories-type="image"] img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

[stories-type="video"] video {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

[stories-type] [stories-element-text] {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    z-index: 2;
}

[stories-type] [stories-element-text].top {
    justify-content: start;
}

[stories-type] [stories-element-text].center {
    justify-content: center;
}

[stories-type] [stories-element-text].bottom {
    justify-content: end;
    margin-bottom: 100px;
}

[stories-type] [stories-element-text] .text {
    padding: 35px;
    margin: 35px;
    background: #fff;
    border-radius: 6px;
    color: #444;
    font-size: 25px;
    line-height: 29px;
    text-align: center;
    box-shadow: 0 14px 25px rgba(0, 0, 0, .16);
}

[stories-element-action] {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 35px;
    z-index: 5;
}

[stories-prev],
[stories-next] {
    position: absolute;
    top: 0;
    width: 30%;
    bottom: 0;
    z-index: 4;
    opacity: 0;
    transition: opacity 500ms ease-in;
}

@media screen and (hover: hover) {
    [stories-prev]:hover,
    [stories-next]:hover {
        cursor: pointer;
        opacity: 1;
    }

    [stories-prev]:hover {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    }

    [stories-next]:hover {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
    }
}

[stories-prev] {
    left: 0;
}

[stories-next] {
    right: 0;
}

@media screen and (max-height: 700px) {
    [stories-type] [stories-element-text] .text {
        font-size: 20px;
        line-height: 24px;
    }
}

@media screen and (max-width: 968px) {

    [stories-modal] [stories-modal-prev],
    [stories-modal] [stories-modal-next] {
        display: none;
    }

    [stories-placeholder],
    [stories-previews] ul:not(.uk-grid) {
        margin-left: -15px;
    }

    [stories-placeholder] > *,
    [stories-previews] ul:not(.uk-grid) > * {
        padding-left: 15px;
        width: calc(100% * 1 / 3.04);
    }

    [stories-previews-wrap] {
        padding: 2px;
    }

    [stories-previews] [stories-previews-item] img {
        /*transform: scale(1.2);*/
    }

    [stories-previews] [stories-previews-item] .text div {
        background: transparent;
        font-size: 9px;
        line-height: 12px;
        padding: 0;
        margin: 0;
        color: #fff;
        text-shadow: 4px 3px 2px rgba(0, 0, 0, 0.6);
    }

    [stories-previews] [stories-previews-item] .icon {
        display: none;
    }

    [stories-modal] {
        padding: 0;
    }

    [stories-modal-container] {
        margin: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
    }

    [stories-element] {
        border-radius: 0;
    }

}