.stories-wrapper {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .stories-wrapper::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .stories-wrapper .story-list {
        display: flex;
        gap: 1em;
    }

body.rtl .stories-wrapper {
    direction: rtl;
}

/* Story Circle  */
.story-circle {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 3px;
    flex-shrink: 0;
    background: linear-gradient(45deg, #ff0066, #ffcc00);
}

    .story-circle img {
        width: 100%;
        height: 100%;
        aspect-ratio:1/1;
        border-radius: 50%;
        object-fit: cover;
        position: relative;
        border: 3px solid #fff;
        z-index: 2;
    }

.story-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient( #ff004f, #ffe400, #ff004f );
    z-index: 1;
    animation: spin 1.2s linear infinite;
    opacity: 0;
}

.story-open {
    user-select: none;
}

    .story-open.loading .story-ring {
        opacity: 1;
    }


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.story-open .title, .story-open .head {
    text-align: center;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: var(--textcolormed)
}

/* Story Modal  */

.story-modal {
    overflow: hidden;
    color: #fff;
}

    .story-modal .modal-dialog .modal-content .modal-body {
        height: calc(100vh - 3.5rem);
        max-height: calc(100vh - 3.5rem)
    }

    .story-modal .icon {
        filter: drop-shadow(1px 1px 1px rgba(0, 0, 0,.8));
    }

    .story-actions .icon {
        stroke: #fff;
        cursor: pointer;
        transition: all 0.2s ease 0s;
    }

        .story-actions .icon:hover, .story-modal .story-link .btn:hover {
            opacity: .7;
        }

    .story-actions .btn {
        padding: 0;
        font-size: inherit;
    }

    .story-actions .actions ul {
        padding: .75em;
    }

        ..story-actions .actions ul li a {
            text-shadow: none;
            color: #777;
            padding: .7em;
        }

            .story-actions .actions ul li a:hover {
                color: #444;
            }



.story-container {
    height: 100%;
}

/* Story Slide  */
.story-slide {
    display: none;
    height: 100%;
}

    .story-slide.active {
        display: block;
    }

    .story-slide .slide-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

        .story-slide .slide-inner .slide-body {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 1 1 0%;
            min-height:0;
        }

    .story-slide .story-title, .story-slide .story-title a{
        font-weight: 600;
        font-size: 1.1em;
        color:#fff;
        text-align:start
    }

    .story-slide .story-link {
        display: flex;
        justify-content: end
    }

        .story-slide .story-link .btn {
            border: solid 3px #fff;
            border-radius: 8px;
            padding: 5px 12px;
            font-weight: 600;
            color: #fff;
            margin: 0;
            transition: all 0.2s ease 0s;
        }

    .story-slide .story-date {
        color: #ccc;
        font-weight: 300;
        font-size: 1em;
    }

    .story-slide .story-media {
        width: 100%;
        object-fit: cover;
    }

    .story-slide video.story-media, .story-modal img.story-media {
        width: 100%;
        height: auto;
        max-height: 100%;
        border-radius: .3rem;
    }

/* Story Progress */

.story-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.9);
    display: flex;
    gap: 4px;
    z-index: 20;
    border-radius: .3rem .3rem 0 0;
}

.progress-item {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
}

body.rtl .progress-fill {
    left: auto;
    right: 0;
}

/* Slide Header/footer */

.story-actions, .slide-actions, .story-header, .story-footer {
    position: absolute;
    top: 2em;
    left: 2em;
    right: 2em;
    z-index: 10;
    text-shadow: 1px 1px 1px rgba(0, 0, 0,.8);
}

    /* Slide Action */
    .story-actions.top {
        left: .5em;
        right: .5em;
    }

    .slide-actions.bottom {
        left: auto;
        top: auto;
        bottom: 5em;
    }

    .slide-actions .action-item{
        display:flex;
        flex-direction:column;
        align-items:center;
        gap:.3em;
    }

        .slide-actions .action-item .title {
            font-size: .8em;
        }

        .slide-actions .action-item.heart.active svg{
            color: var(--lightred);
            fill: var(--lightred);
        }

    .story-header {
        top: 2.25em;
        left: 6em;
    }

.story-footer {
    top: auto;
    bottom: 2em;
    right: 5.5em
}

/* Click areas */
.story-mute {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 48px;
    height: 48px;
    z-index: 5;
    opacity: .8;
    transition: all 0.2s ease 0s;
    cursor: pointer
}

.story-click {
    position: absolute;
    display: flex;
    align-items: center;
    top: 0;
    bottom: 0;
    width: 20%;
    z-index: 5;
    opacity: .15;
    transition: all 0.2s ease 0s;
    cursor: pointer
}

    .story-click:hover {
        opacity: .8;
    }

    .story-click.back {
        padding-right: 1em;
        left: 0;
        justify-content: end
    }

body.rtl .story-click.back {
    left: auto;
    right: 0;
    justify-content: start
}

.story-click.next {
    padding-left: 1em;
    right: 0;
    justify-content: start
}

body.rtl .story-click.next {
    right: auto;
    left: 0;
    justify-content: end
}

/* Products list */

.story-products {
    display: flex;
    flex-grow: 0;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: .4rem;
    background: var(--bgcolor);
    color: var(--textcolormed);
    border-radius: 0 0 .3rem .3rem;
}

body.rtl .story-products {
    direction: rtl;
}

.story-products .product-item {
    padding: 4px 6px;
    display: flex;
    width: 240px;
    flex-shrink: 0;
    flex-grow: 0;
    border: solid 1px #ccc;
    border-radius: var(--brediussmall);
}

    .story-products .product-item .image {
        width: 30%;
        margin-right: 5%;
    }

body.rtl .story-products .product-item .image {
    margin-right: 0;
    margin-left: 5%;
}

.story-products .product-item .text {
    width: 70%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--textcolormed);
    font-weight: 300
}

.story-products .product-item .title {
    font-size: 1em;
    font-weight: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

@media (min-width: 767px) {
    .story-click {
        opacity: .5;
    }

        .story-click:hover {
            opacity: .9;
        }

        .story-click.next, body.rtl .story-click.back {
            transform: translateX(5em);
        }

        body.rtl .story-click.next, .story-click.back {
            transform: translateX(-5em);
        }

        .story-click .bt {
            background: #fff;
            border-radius: 50rem;
            color: #777;
            width: 40px;
            height: 40px;
        }

            .story-click .bt .icon {
                filter: none;
                width: 24px;
                height: 24px;
            }
}
