﻿.cb-stories-bar-wrapper {
    background: rgba(17, 20, 24, 0.6);
    border-bottom: 1px solid rgba(206, 162, 119, 0.1);
    padding: 15px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cb-stories-bar {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    direction: rtl;
}

    .cb-stories-bar::-webkit-scrollbar {
        display: none;
    }

.cb-story-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
    width: 76px;
    transition: transform 0.2s;
}

    .cb-story-item:active {
        transform: scale(0.95);
    }

.cb-story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #cea277, #e2b78d, #b3855c);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-story-item.seen .cb-story-ring {
    background: rgba(255, 255, 255, 0.2);
}

.cb-story-thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #090b0d;
    padding: 2px;
    overflow: hidden;
}

    .cb-story-thumb img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        display: block;
    }

.cb-story-title {
    font-size: 11px;
    color: #f6f5f5;
    font-weight: 500;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.cb-story-viewer {
    position: fixed;
    inset: 0;
    background: rgba(9, 11, 13, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

    .cb-story-viewer.open {
        display: flex;
    }

.cb-viewer-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.cb-story-stage {
    position: relative;
    width: min(420px, 95vw);
    height: min(90vh, 780px);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.8);
    z-index: 2;
}

@media (max-width: 767.98px) {
    .cb-story-stage {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
    }
}

.cb-story-progress {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 3px;
    z-index: 10;
}

    .cb-story-progress .cb-bar {
        flex: 1;
        height: 2.5px;
        background: rgba(255,255,255,.35);
        border-radius: 2px;
        overflow: hidden;
    }

        .cb-story-progress .cb-bar .cb-fill {
            display: block;
            height: 100%;
            width: 0;
            background: #fff;
            border-radius: 2px;
            transition: width .05s linear;
        }

.cb-story-header {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
}

.cb-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #333;
    border: 2px solid #cea277;
}

    .cb-header-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.cb-header-text strong {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: block;
}

.cb-header-text small {
    color: rgba(255,255,255,.7);
    font-size: 11px;
}

.cb-header-actions {
    display: flex;
    gap: 6px;
}

.cb-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s;
}

    .cb-icon-btn:hover {
        background: rgba(255,255,255,.15);
    }

    .cb-icon-btn svg {
        width: 20px;
        height: 20px;
    }

.cb-story-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    overflow: hidden;
}

    .cb-story-media img, .cb-story-media video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

.cb-story-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 14px 20px;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

@media (max-width: 767.98px) {
    .cb-story-footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

.cb-caption {
    color: #fff;
    font-size: 13px;
    text-align: center;
}

.cb-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #000;
    padding: 8px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: transform .15s;
    border: none;
}

    .cb-link-btn:hover {
        transform: translateY(-1px);
        color: #000;
    }

.cb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.1);
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    color: #fff;
    transition: background .2s;
}

    .cb-nav-btn:hover {
        background: rgba(255,255,255,.25);
    }

    .cb-nav-btn svg {
        width: 20px;
        height: 20px;
    }

.cb-nav-prev {
    right: calc(50% + min(220px, 48vw) + 16px);
}

.cb-nav-next {
    left: calc(50% + min(220px, 48vw) + 16px);
}

@media (max-width: 767.98px) {
    .cb-nav-btn {
        display: none;
    }
}
