:root {
    --avi-story-br: var(--main-color)
}
.avi_story_elements {
    display: flex;
    margin: 0;
    width: 100%;
    padding: 0;
    flex-direction: column;
}

.avi_story_elements::-webkit-scrollbar {
    display: none;
}

.avi_story_el_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: none;
    cursor: pointer;
    user-select: none;
}

.avi_story_picture {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
}

.avi_story_img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px !important;
    height: 70px !important;
    transform: translate(-50%, -50%);
    border-radius: 50% !important;
}

.avi_story_circle {
    fill: none;
    stroke: var(--avi-story-br);
    stroke-linecap: round;
    stroke-width: 3;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.avi_story_title {
    display: block;
    font-size: 13px;
    font-weight: bold;
    line-height: 1rem;
    overflow-wrap: break-word;
    color: var(--title-color1);
    margin: 0.25rem 0;
    text-align: center;
}

.avi_story_el_item.loading .avi_story_circle {
    animation: stroke-draw 6s ease-out infinite alternate;
}

.avi_story_el_item.seen {
    opacity: 0.75;
}

.avi_story_el_item.seen .avi_story_circle {
    stroke: #ddd;
}

.avi_story_box {
    display: none;
    position: fixed;
    inset:0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 2000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    align-items: center;
}

.avi_story_box.opened {
    display: flex;
}

.avi_story_box_elements {
    position: relative;
    width: 400px;
    max-width: 400px;
    height: 90dvh;
    overflow: hidden;
    margin: 0 auto;
    border-radius: var(--max-radius);
    display: flex;
    flex-direction: row;
    will-change: auto;
    touch-action: manipulation;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.avi_story_item {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: opacity .5s ease, filter .25s ease;
    background-color: rgba(0, 0, 0, 0.6);
}

.avi_story_elements .avina_prev_Arrow{
    left: 0;
}
.avi_story_elements .avina_next_Arrow{
    right: 0;
}
.avi_story_content {
    display: flex;
    width: 100%;
    height: 100% !important;
    padding: 0;
    margin: 0 !important;
    object-fit: cover;
}

.avi_story_item_link {
    display: inline-flex;
    align-items: center;
    gap:6px;
    position: absolute;
    right: 50%;
    bottom: 10%;
    background-color: #fff;
    transform: translateX(50%);
    color: #333;
    padding: 10px 25px;
    border-radius: var(--min-radius);
    font-size: 15px;
    z-index:1000;
    height: auto !important;
    flex-direction: row !important;
}
.avi_story_cap {
    position: absolute;
    bottom: 4%;
    background-color: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: var(--min-radius);
    font-size: 14px;
    right: 4%;
    left: 4%;
    display: flex;
    z-index:100;
    height: auto !important;
    flex-direction: row !important;
}
.avi_story_cap a, .avi_story_cap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap:10px;
    z-index:1000;
    color: #333;
}
.avi_story_cap a:hover, .avi_story_item_link:hover {
    color: var(--main-color);
}
.avi_story_cap img {
    max-width: 60px;
    border-radius: var(--min-radius);
}

.avi_story_prev,
.avi_story_next,
.avi_story_close {
    display: block;
    position: absolute;
    cursor: pointer;
    user-select: none;
    z-index: 3;
    width: 32px;
    height: 32px;
}

.avi_story_prev,
.avi_story_next {
    top: calc(50% - 16px);
    text-align: center;
    border-radius: 50%;
    background-color: #fff;
    overflow: hidden;
    opacity: .85;
    transition: opacity .25s ease;
}

.avi_story_prev::before,
.avi_story_next::before {
    content: "";
    display: block;
    position: absolute;
    top: 10px;
    width: 12px;
    height: 12px;
    border-right: 4px solid #555;
    border-bottom: 4px solid #555;
}

.avi_story_prev {
    right: calc(50% - 35vh - 80px);
}

.avi_story_prev::before {
    left: 8px;
    transform: rotate(-45deg);
}

.avi_story_next {
    left: calc(50% - 35vh - 80px);
}

.avi_story_next::before {
    right: 8px;
    transform: rotate(-225deg);
}
.avi_story_next_m {
    position: absolute;
    left: 0;
    bottom: 17%;
    top: 8%;
    width: 33%;
    z-index: 15;
}
.avi_story_prev_m {
    position: absolute;
    right: 0;
    bottom: 17%;
    top: 8%;
    width: 33%;
    z-index: 15;
}

.avi_story_close {
    top: 50px;
    color: white;
    font-size: 30px;
    right: calc(50% - 35vh - 85px);
    z-index: 30;
}

.avi_story_voice, .avi_story_play_pause{
    display: none;
    position: absolute;
    top: 75px;
    width: 35px;
    height: 35px;
    font-size: 19px;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    background: rgba(0, 0, 0, 0.33);
    justify-content: center;
    align-items: center;
    border-radius: 7px;
    z-index: 30;
}

.avi_story_voice.visible{
    display: flex;
}

.avi_story_voice {
    left: calc(47% - 85px);
    color: white;
}

.avi_story_voice.muted i:before {
    content: "\f6a9" !important;
}

.avi_story_play_pause {
    display: flex;
    left: calc(44% - 85px);
    color: white;
}

.avi_story_play_pause.playing i::before {
    content: "\f04c" !important;
}
.swiper-pagination.aviOpenStory {
    padding: 0 20px!important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6),transparent);
}

.aviOpenStory .swiper-pagination-bullet {
    height: 3px !important;
    width: 100% !important;
    margin: 0 2px !important;
    background: rgba(255,255,255,0.4) !important;
    opacity: 1 !important;
    border-radius: 0 !important;
    position: relative;
    overflow: hidden;
}
.aviOpenStory .swiper-pagination-bullet > span {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 100%;
    background: white;
    height: 100%;
}
.aviOpenStory .swiper-pagination-bullet:not(.swiper-pagination-bullet-active) > span {
    width: 100% !important;
}
.aviOpenStory .swiper-pagination-bullet-active ~ .swiper-pagination-bullet > span {
    width: 0 !important;
}

@keyframes stroke-draw {
    from {
        stroke: var(--avi-story-br);
        stroke-dasharray: 1;
    }
    to {
        stroke: var(--avi-story-br);
        transform: rotate(180deg);
        stroke-dasharray: 8;
    }
}

@media (max-width:576px){
    .avi_story_box_elements {
        width: 100%;
        max-width: 500px;
        height: 100% !important;
        margin: 0;
        border-radius: 0;
    }

    .avi_story_wrapper {
        width: 100% !important;
        height: 100% !important;
    }
    .avi_story_close {
        top: 35px;
        left: auto;
        right: 25px;
        background: rgba(0, 0, 0, 0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 7px;
    }
    .avi_story_voice {
        left: calc(35% - 80px);
        top: 35px
    }
    .avi_story_play_pause {
        left: calc(24% - 80px);
        top: 35px;
    }

}