/* استایل‌های استوری اینستاگرام */
.wp-stories-wrapper {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.highlights-bar, .latest-stories-bar {
	display: flex;
	gap: 20px;
	padding: 12px 16px;
	/* overflow-x: auto; */
	/* scrollbar-width: none; */
	background: #fff;
	flex-wrap: wrap;
	justify-content: space-between;
}

.highlights-bar::-webkit-scrollbar, .latest-stories-bar::-webkit-scrollbar {
    display: none;
}

.highlight-item, .latest-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.highlight-item:active, .latest-story-item:active {
    transform: scale(0.92);
}

.highlight-ring, .latest-story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(#f09433, #e6683c, #dc2743, #cc2366, #bc1888, #f09433);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.latest-story-ring.viewed {
    background: #404040;
}

.latest-story-ring .story-count {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #0095f6;
    color: #fff;
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    font-weight: 600;
}

.highlight-img, .latest-story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background: #e8e8e8;
    display: block;
    	max-width: 100%;
	aspect-ratio: 1/1;
	padding: 2px;
	background: #fff !important;
    	border-radius: 100px !important;
}
.highlight-name, .latest-story-name {
    font-size: 11px;
    color: #262626;
    /* max-width: 72px; */
    white-space: nowrap;
    /* overflow: hidden;
    text-overflow: ellipsis; */
    text-align: center;
    font-weight: 500;
    margin-top: 2px;
}

.story-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9999;
    touch-action: none;
}

.story-viewer.active {
    display: block;
}

.story-slide {
    width: 100%;
    height: 100%;
    position: relative;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-media-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.progress-container {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

.story-header {
    position: absolute;
    top: 20px;
    left: 16px;
    right: 16px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.story-header .story-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    flex-shrink: 0;
}

.story-header .info {
    flex: 1;
    min-width: 0;
}

.story-header .name {
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-header .time {
    font-size: 12px;
    opacity: 0.8;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.story-header .close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8);
    opacity: 0.8;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.story-header .close-btn:active {
    opacity: 0.4;
}

.touch-areas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
}

.touch-left, .touch-right {
    flex: 1;
    height: 100%;
}

.slide-counter {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    background: rgba(0,0,0,0.5);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    font-weight: 500;
}

.loading-stories {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

@media (max-width: 430px) {
    .highlight-ring, .latest-story-ring {
        width: 60px;
        height: 60px;
    }
    .highlight-item, .latest-story-item {
        min-width: 60px;
    }
    .highlight-name, .latest-story-name {
        font-size: 10px;
        max-width: 60px;
    }
    .slide-counter {
        font-size: 12px;
        padding: 4px 14px;
        bottom: 30px;
    }
    .latest-story-ring .story-count {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}