.knd-story-widget-wrapper {
    position: relative;
    width: 100%;
    direction: rtl;
    padding: 15px;
    overflow: hidden;
}

.knd-story-slider {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    margin-bottom: -20px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    flex-wrap: nowrap;
    position: relative;
    scroll-behavior: smooth;
}

.knd-story-slider::-webkit-scrollbar {
    display: none;
}

.knd-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    min-width: 90px;
    width: 90px;
    text-align: center;
    margin-left: 25px;
    scroll-snap-align: start;
}

.knd-story-image-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fca903;
    background-color: #fff;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.knd-story-item:hover .knd-story-image-wrapper {
    transform: scale(1.05);
}

.knd-story-item--seen .knd-story-image-wrapper {
    border-color: #c7c7c7;
}

.knd-story-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.knd-story-text {
    margin-top: 10px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.knd-story-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
    display: none;
    align-items: center;
    justify-content: center;
}

.knd-story-modal-content {
    position: relative;
    margin: 10px auto auto auto;
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.knd-story-modal-video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}

.knd-story-modal-video iframe,
.knd-story-modal-video video {
    width: 100%;
    display: block;
    border: none;
    height: auto;
    background-color: #000;
    max-height: 75vh;
    margin: 0 auto;
}

.knd-story-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: #fca903;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 2px solid #fff;
    z-index: 100;
}

.knd-story-modal-button {
    display: block;
    width: 100%;
    background-color: #fca903;
    color: #333;
    font-weight: bold;
    text-align: center;
    padding: 14px 20px;
    margin-top: 15px;
    border-radius: 8px;
    text-decoration: none;
}

.knd-story-progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    display: block;
    direction: ltr;
}

.knd-story-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #fca903;
    transition: none;
    will-change: width;
}

@media (max-width: 767px) {
    .knd-story-modal-content {
        max-width: 95%;
        margin: auto;
    }
    
    .knd-story-modal-nav:not(.knd-hide-mobile) {
        left: 5px;
        right: 5px;
        top: 45%;
        transform: translateY(-50%);
        position: absolute;
        z-index: 103;
    }
    
    .knd-story-modal-prev,
    .knd-story-modal-next {
        width: 45px;
        height: 60px;
        background-color: #B66C4080 !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 28px !important;
        font-weight: bold !important;
        line-height: 1 !important;
        font-family: Arial, sans-serif !important;
        border-radius: 8px !important;
        transform: scaleY(1.3) !important;
    }
}
.knd-story-modal-nav {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: -60px;
    right: -60px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 102;
}

.knd-story-modal-prev,
.knd-story-modal-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    z-index: 101;
    transition: all 0.3s ease;
}

.knd-story-modal-prev:hover,
.knd-story-modal-next:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.knd-story-modal-share {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background-color: #fca903;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #fff;
    z-index: 100;
    transition: all 0.3s ease;
    padding: 5px;
}

.knd-story-modal-share img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.knd-story-modal-share:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.knd-hide-mobile {
    display: flex;
}

@media (max-width: 767px) {
    .knd-hide-mobile {
        display: none !important;
    }
}

/* Responsive story display */
.knd-story-item {
    transition: opacity 0.3s ease;
}

.knd-story-item[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}
