﻿.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, var(--cwButtonSecondaryBg));
    border: 1px solid var(--bg-level-3, var(--cwButtonSecondaryBgHover));
    color: var(--icon-level-high, var(--cwButtonSecondaryTxt));
    padding: 0 8px;
    cursor: pointer;
}

    .story__nav.swiper-button-disabled {
        opacity: .4;
    }

.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;
}

.dynamic_container.empty_title .story {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dynamic_container.empty_title .story__swiper {
    width: 100%;
}

.dynamic_container.empty_title .story__nav:not(.swiper-button-lock) {
    position: relative;
    margin-inline-start: auto;
    display: flex;
    top: 0;
    margin-bottom: 16px;
}

.dynamic_container.empty_title .story__nav--next:not(.swiper-button-lock) {
    margin-inline-start: 8px;
}

.dynamic_container.empty_title .story__nav--prev:not(.swiper-button-lock) {
    inset-inline-end: 0;
}

.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, var(--cwBodyBg2));
    }

.story__item {
    width: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    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(--cwPrimary,var(--cwBodyAccent));
        cursor: pointer;
        position: relative;
        z-index: 1;
    }

    .story__item i {
        position: absolute;
        right: 10px;
        top: -4px;
        z-index: 2;
        margin: 0;
        color: var(--cwPrimary,var(--cwBodyAccent));
        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, var(--cwBodyBg));
    }

.seen .story__item i {
    color: var(--bg-level-4, var(--cwBodyBg2)) !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;
        text-overflow: ellipsis;
        overflow: hidden;
        color: var(--text-level-high,var(--cwBodyTxt));
        white-space: nowrap;
    }

.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);
    color: var(--cwBodyTxt2, #ccc);
    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;
        z-index: 999;
        color: currentColor;
    }

.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: 10.5vh;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    background: linear-gradient(180deg, var(--cwBodyShadow, rgba(0, 0, 0, 0.25)) 0%, var(--cwBodyShadowFade, rgba(0, 0, 0, 0)) 100%);
    color: var(--cwBodyTxt, #fff);
    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: var(--bg-level-4, var(--cwButtonSecondaryG));
    border: 1px solid var(--bg-level-5, var(--cwButtonSecondaryBgHover));
    color: var(--text-level-high, var(--cwButtonSecondaryTxt2));
    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, var(--cwButtonSecondaryTxt));
        font-size: 31px;
        line-height: 20px;
    }

    .story-item__cat span {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.1;
    }

.story-item__footer {
    width: 100%;
    height: 15%;
    padding: 12px 16px;
    position: absolute;
    bottom: 52px;
    justify-content: center;
    align-items: flex-end;
    /*background: linear-gradient(180deg, var(--cwBodyShadowFade, rgba(0, 0, 0, 0)) 38%, var(--cwBodyShadow, rgba(0, 0, 0, 0.6)) 100%);*/
    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: 62px;
}

.story-link {
    width: 100%;
    height: 34px;
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 12px;
    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, var(--cwAccentBg));
    color: var(--text-on-primary, var(--cwAccentTxt));
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 28px;
    line-height: 1.1;
}

.story-popup__swiper__nav {
    padding-bottom: 4px;
}

.story-popup__swiper__nav--prev {
    inset-inline-start: 16px;
    padding-inline-end: 2px;
}

.story-popup__swiper__nav--next {
    inset-inline-end: 16px;
    padding-inline-start: 2px;
}

.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, .story-popup__nested-story-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-pagination-bullets.swiper-pagination-horizontal.story-nested__pagination {
    width: 100%;
    top: 15px;
    bottom: initial;
    padding: 0 15px;
    z-index: 2;
    justify-content: space-between;
    column-gap: 1px;
    display: none;
}

.story-popup__swiper-slide.swiper-slide-active .swiper-pagination-bullets.story-nested__pagination {
    display: flex;
}

.story-nested__pagination-bullet {
    width: 100%;
    height: 4px;
    background:  #757575; /*remove if needed*/
    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: var(--cwAccentBg, #fff);  /*remove if needed*/
    }

.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 {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 110;
}

    .story-group__popup .btn--close {
        position: absolute;
        width: max-content;
        top: 24px;
        inset-inline-end: 16px;
        z-index: 999;
        background-color: transparent;
        border: none;
        outline: none;
        box-shadow: none;
    }


.story-nested__swiper {
    width: 100%;
    height: 100%;
}

.story-group__popup {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    z-index: 110;
    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: 90%;
    top: 0;
    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;
}

.btn--mute {
    position: absolute;
    width: 30px;
    top: 28px;
    inset-inline-end: 15px;
    background-color: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

    .btn--mute svg {
        stroke: var(--cwBodyTxt, #fff);
        width: 22px;
        background-size: contain;
    }

    .btn--mute .sound-off {
        display: none;
    }

    .btn--mute.muted .sound-on {
        display: none
    }

    .btn--mute.muted .sound-off {
        display: block;
    }

/*Story item description*/
.story_description {
    position: absolute;
    width: 100%;
    height: 52px;
    bottom: -1px;
    left: 0;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    overflow: hidden;
    padding: 8px 16px;
    opacity: 0;
    display: flex;
    align-items: center;
}

.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;
}

.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-popup__swiper-slide.swiper-slide-active .story_description {
    opacity: 1;
}
/*Story item description*/
