﻿.story {
    position: relative;
    /*background-color: var(--bg-level-1);*/
}

.story__nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    top: -56px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-level-2);
    border: 1px solid var(--bg-level-3);
    padding: 0 8px;
}

.story__nav--prev {
    inset-inline-end: 48px;
}

.story__nav--next {
    inset-inline-end: 0;
}

.story__nav i {
    font-size: 34px;
    line-height: 17px;
    margin-block-start: 3px;
    color: var(--icon-level-high);
}

.story__swiper .swiper-slide {
    width: max-content;
}

.story__swiper .swiper-slide.seen .story__item img, .story__swiper .swiper-slide.seen .story__item video {
    border-color: var(--bg-level-4);
}

.story__item {
    width: 145px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    position: relative;
}

.story__item img, .story__item video {
    width: 120px;
    height: 120px;
    border-radius: 52px;
    padding: 6px;
    object-fit: cover;
    border: 2px solid var(--cwBodyAccent);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.story__item i {
    position: absolute;
    z-index: 2;
    right: 10px;
    top: -4px;
    color: var(--cwBodyAccent);
    margin: 0;
    font-size: 42px;
    line-height: 40px;
    width: 40px;
    height: 40px;
    display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border-radius: 50%;
    background: var(--bg-level-1);
}

.seen .story__item i{
    color: var(--bg-level-4)!important;
}

.story__item .story_text {
    max-width: 90%;
    min-height: 32px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.story__item .story_text p {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    color: var(--text-level-high);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.story-popup {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    background-color: rgba(40, 40, 40, 0.78);
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(32px);
    backdrop-filter: blur(32px);
}

.story-popup .btn--close {
    position: absolute;
    top: 20px;
    inset-inline-end: 30px;
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}

.story-popup__swiper {
    width: 100%;
    padding: 100px 0;
}

.story-popup__swiper-slide {
    transition: transform 0.23s;
    filter: brightness(0.3);
    border-radius: 16px;
    overflow: hidden;
}

.story-popup__swiper-nested {
    transition: .23s;
}

.story-popup__swiper-nested .swiper-slide {
    display: flex;
    align-items: center;
    height: 500px;
}

.story-popup__nested-story-item {
    width: 100%;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.story-item__header {
    width: 100%;
    height: 120px;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
    display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
    -webkit-box-align: end;
        -ms-flex-align: end;
            align-items: flex-end;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
            padding: 16px;
}

.story-item__cat{
    background: linear-gradient(0deg, var(--bg-level-5), var(--bg-level-5)), linear-gradient(0deg, var(--general-border), var(--general-border));
    border: 1px solid var(--general-border);
    border-radius: 50px;
    padding: 14px 16px;
    flex: 0 0 auto;
    display: -webkit-box;
    display: -ms-flexbox;
     display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    max-width: 100%;
    min-height: 48px;
    min-width: 121px;
}

.story-item__cat i{
    margin-inline-end: 12px;
    color: var(--icon-level-high);
    font-size: 40px;
    line-height: 20px;
}

.story-item__cat span{
    font-size: 14px;
    font-weight: 500;
    color: var(--text-level-high);
    line-height: 1.1;
}

.story-item__footer {
    width: 100%;
    height: 15%;
    padding: 12px 16px;
    position: absolute;
    z-index: 9;
    bottom: 52px;
    justify-content: center;
    align-items: flex-end;
    /*background: linear-gradient(179.75deg, rgba(0, 0, 0, 0) 37.04%, rgba(0, 0, 0, 0.6) 99.78%);*/
    display: none;
}

.story-item__shadow {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
    height: 72px;
    z-index: 1;
}

.story-link {
    width: 100%;
    padding: 14px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    background-color: var(--cwPrimary, var(--cwAccentBg));
    color: var(--text-on-primary, var(--cwAccentTxt));
    text-transform: uppercase;
}

.story-popup__swiper__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
    width: 28px;
    height: 28px;
    background-color: var(--cwPrimary);
    display: none;
    justify-content: center;
    align-items: center;
    color: var(--text-on-primary);
}

.story-popup__swiper__nav--prev {
    inset-inline-start: 16px;
}

.story-popup__swiper__nav--next {
    inset-inline-end: 16px;
}

.story-popup__swiper-slide.swiper-slide-active {
    z-index: 1;
    transform: scale(1.3);
    filter: brightness(1);
}

.story-popup__swiper-slide.swiper-slide-active .story-popup__swiper__nav, .story-popup__swiper-slide.swiper-slide-active .story-item__footer {
    display: flex;
}

.story-popup__nested-story-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-popup__nested-story-item video {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
}

.story-nested__pagination {
    width: 100%;
    top: 15px;
    padding: 0 15px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    column-gap: 1px;
    display: none;
}

/*.story-nested__pagination:has( > [data-index="15"]){
    column-gap: 8px;
}*/

.story-popup__swiper-slide.swiper-slide-active .story-nested__pagination {
    display: flex;
}

.story-nested__pagination-bullet {
    width: 100%;
    height: 4px;
    background: #757575;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    opacity: 1;
    margin: 0 .5% !important;
}

.story-nested__pagination-bullet.swiper-pagination-bullet:only-child {
    display: flex !important;
}

.story-nested__pagination-bullet span {
    position: absolute;
    width: 0;
    height: 100%;
    inset-inline-start: 0;
    background-color: #ffffff;
}

.story-popup__swiper-slide.swiper-slide-active .story-nested__pagination-bullet.nested__pagination-bullet-active span {
    animation-name: k-fill;
    animation-duration: 5s;
    animation-direction: normal;
    animation-fill-mode: forwards;
}

.story-nested__pagination-bullet.seen span {
    width: 100%;
}

@keyframes k-fill {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}


.story-group__popup .btn--close {
    position: absolute;
    width: max-content;
    top: 32px;
    inset-inline-end: 16px;
    z-index: 999;
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0;
    display: flex;
}



@media screen and (max-width: 991px) {
    .story {
        padding-inline-start: 12px;
    }

    .story .story__nav {
        display: none;
    }

    .story .story__item {
        width: 76px;
    }

    .story__item img, .story__item video {
        width: 68px;
        height: 68px;
        border-radius: 28px;
        padding: 6px;
        border-width: 1.5px;
    }

    .story__item span {
        font-size: 12px;
        min-height: 26px;
    }

    .story__item i {
        font-size: 30px;
        right: 4px;
        top: -2px;
        line-height: 28px;
        width: 24px;
        height: 24px;
    }
}


.story-nested__swiper {
    width: 100%;
    height: 100%;
}

.story-group__popup {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-group__swiper {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .8);
    position: absolute;
    left: 0;
    top: 0;
}

.story-group__swiper swiper-wrapper {
    width: 100%;
}

.swiper-slide-active .swiper-slide-active .story-item__footer {
    display: flex;
}

.story-nested__swiper .swiper-button-next,
.story-nested__swiper .swiper-button-prev {
    width: 50%;
    height: 70vh;
    top: 120px;
    opacity: 0;
}

.story-nested__pagination-bullet.nested__pagination-bullet-active span {
    animation-name: k-fill;
    animation-duration: 5s;
    animation-direction: normal;
    animation-fill-mode: forwards;
}

.swiper-slide-active .story-nested__pagination {
    display: flex;
    width: 100%;
    top: 16px!important;
    bottom: initial;
    inset-inline-start: 0;
    padding: 0 16px;
}

.btn--mute {
    position: absolute;
    top: 32px;
    width: 24px;
    height: 24px;
    inset-inline-end: 64px;
    background-color: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    padding: 0;
    z-index: 9;
}

.btn--mute svg {
    width: 100%;
    height: 100%;
    stroke: var(--cwBodyTxt, #fff);
}

.btn--mute .sound-off {
    display: none;
}

.btn--mute.muted .sound-on {
    display: none
}

.btn--mute.muted .sound-off {
    display: block;
}
.swiper-cube .swiper-slide{
    opacity:0;
}
.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-prev, .swiper-cube .swiper-slide-next {
    position: relative;
    z-index: 9;
    opacity: 1;
}
.swiper-button-next.swiper-button-disabled, .swiper-button-prev.swiper-button-disabled{
    pointer-events: auto;
    display:block;
}

/*Story item description*/
.story_description {
    position: absolute;
    width: 100%;
    height: 52px;
    bottom: 0;
    left: 0;
    overflow: hidden;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    z-index: 9;
}

.story_description:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    background: rgba(40,40,40, .81);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 0;
}

.story_description_inner > * {
    font-size: 10px;
    line-height: 12px;
    color: #FFF;
    align-self: flex-start;
    margin: 0;
}

.story_description_inner > svg,
.story_description_inner > img {
    flex-shrink: 0;
    align-self: center;
}

.story_description_inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    max-height: 100%;
    overflow: hidden;
}
/*Story item description*/
