.stories-swiper__inner {
    position: relative;
    padding: 0 75px;
    overflow: hidden;
}

.stories-button__prev,
.stories-button__next {
    position: absolute;
    top: 40%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ECECEC;
    transform: translateY(-40%);
    cursor: pointer;
}

.stories-button__prev {
    left: 0;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nOCcgaGVpZ2h0PScxMicgdmlld0JveD0nMCAwIDggMTInIGZpbGw9J25vbmUnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGcgY2xpcC1wYXRoPSd1cmwoI2NsaXAwXzE5NDVfNTYzKSc+PHBhdGggZD0nTTYuNSAxTDEuNSA2TDYuNSAxMScgc3Ryb2tlPScjNTQyMDc3JyBzdHJva2Utd2lkdGg9JzInIHN0cm9rZS1saW5lY2FwPSdyb3VuZCcvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9J2NsaXAwXzE5NDVfNTYzJz48cmVjdCB3aWR0aD0nNycgaGVpZ2h0PScxMicgZmlsbD0nd2hpdGUnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDAuNSknLz48L2NsaXBQYXRoPjwvZGVmcz48L3N2Zz4K");
    background-position: center;
    background-repeat: no-repeat;
}

.stories-button__next {
    right: 0;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nOCcgaGVpZ2h0PScxMicgdmlld0JveD0nMCAwIDggMTInIGZpbGw9J25vbmUnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGcgY2xpcC1wYXRoPSd1cmwoI2NsaXAwXzE5NDVfMjY0NTQpJz48cGF0aCBkPSdNMS41IDFMNi41IDZMMS41IDExJyBzdHJva2U9JyM1NDIwNzcnIHN0cm9rZS13aWR0aD0nMicgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJy8+PC9nPjxkZWZzPjxjbGlwUGF0aCBpZD0nY2xpcDBfMTk0NV8yNjQ1NCc+PHJlY3Qgd2lkdGg9JzcnIGhlaWdodD0nMTInIGZpbGw9J3doaXRlJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjUpJy8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+Cg==");
    background-position: center;
    background-repeat: no-repeat;
}

.stories__slide {
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
}

.stories__slide .preview {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E3DCEC;
    border-radius: 50%;
}

.stories__slide .preview img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
}

.stories__slide .name {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 30px;
    text-align: center;
    color: #000000;
}

/* stories-modal */

.stories-modal {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    width: 100%;
    height: 100%;
    background-color: #404040;
    overflow: hidden;
    z-index: 9999;
}

.stories-modal.open {
    display: block;
}

.stories-modal__header {
    position: relative;
    height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.stories-modal__header .logo {
    position: relative;
    z-index: 1;
}

.stories-modal__header .controlls {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.stories-modal__header .controlls .close {
    display: block;
    width: 32px;
    height: 32px;
}

.stories-modal__header .controlls .close svg {
    width: 32px;
    height: 32px;
    color: #b3b3b3;
}

.stories-modal__content {
    position: absolute;
    top: 50%;
    right: auto;
    bottom: auto;
    left: auto;
    max-height: 608px;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    transform: translateY(-50%);
    z-index: 9;
}

.stories-modal__slide {
    width: 342px;
    overflow: hidden;
}

.stories-modal__slide .story {
    position: relative;
    width: 100%;
    height: 100%;
}

.stories-modal__slide .story img {
    width: 100%;
    height: 100%;
}

.stories-modal__slide .story .story__button {
    position: absolute;
    bottom: 32px;
    left: 50%;
    width: 90%;
    height: 47px;
    padding: 15px 60px;
    background-color: #542077;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #fff;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.stories-modal__slide.swiper-slide-active .story .story__button {
    opacity: 1;
    pointer-events: auto;
}

.stories-modal__slide .progress-bar {
    position: absolute;
    top: 0;
    height: 70px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    background: linear-gradient(180deg, #00000026, #fff0);
    box-shadow: none;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.stories-modal__slide.swiper-slide-active .progress-bar {
    opacity: 1;
    pointer-events: auto;
}

.stories-modal__slide .progress-bar .progress-step {
    position: relative;
    flex: 1;
    height: 3px;
    background-color: #bfbfbf;
    border-radius: 2px;
    overflow: hidden;
}

.stories-modal__slide .progress-bar .progress-step .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress-fill-width, 0%);
    background-color: #fff;
    transition: width 9s linear;
}

.stories-modal-button {
    position: absolute;
    top: 50%;
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #ECECEC;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(-50%);
}

.stories-modal-button.prev {
    left: 10px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nOCcgaGVpZ2h0PScxMicgdmlld0JveD0nMCAwIDggMTInIGZpbGw9J25vbmUnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGcgY2xpcC1wYXRoPSd1cmwoI2NsaXAwXzE5NDVfNTYzKSc+PHBhdGggZD0nTTYuNSAxTDEuNSA2TDYuNSAxMScgc3Ryb2tlPScjNTQyMDc3JyBzdHJva2Utd2lkdGg9JzInIHN0cm9rZS1saW5lY2FwPSdyb3VuZCcvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9J2NsaXAwXzE5NDVfNTYzJz48cmVjdCB3aWR0aD0nNycgaGVpZ2h0PScxMicgZmlsbD0nd2hpdGUnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDAuNSknLz48L2NsaXBQYXRoPjwvZGVmcz48L3N2Zz4K");
}

.stories-modal-button.next {
    right: 10px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nOCcgaGVpZ2h0PScxMicgdmlld0JveD0nMCAwIDggMTInIGZpbGw9J25vbmUnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGcgY2xpcC1wYXRoPSd1cmwoI2NsaXAwXzE5NDVfMjY0NTQpJz48cGF0aCBkPSdNMS41IDFMNi41IDZMMS41IDExJyBzdHJva2U9JyM1NDIwNzcnIHN0cm9rZS13aWR0aD0nMicgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJy8+PC9nPjxkZWZzPjxjbGlwUGF0aCBpZD0nY2xpcDBfMTk0NV8yNjQ1NCc+PHJlY3Qgd2lkdGg9JzcnIGhlaWdodD0nMTInIGZpbGw9J3doaXRlJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjUpJy8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+Cg==");

}

.stories-modal__slide.swiper-slide-active .stories-modal-button {
    display: block;
}

@media (max-width: 991px) {
    .stories-swiper__inner {
        padding: 0;
    }

    .stories-button__prev,
    .stories-button__next {
        display: none;
    }

    .stories__slide .preview {
        width: 90px;
        height: 90px;
    }

    .stories__slide .preview img {
        width: 80px;
        height: 80px;
    }

    .stories__slide .name {
        font-size: 14px;
        line-height: 19px;
    }

    .stories__slide {
        width: 90px !important;
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .stories-modal__header {
        position: absolute;
        top: 30px;
        left: 0;
        width: 100%;
        justify-content: flex-end;
        z-index: 20;
    }

    .stories-modal__header .logo {
        display: none;
    }

    .stories-modal__slide .story img {
        object-fit: cover;
    }
}