/* Stories Container */
.stories-container {
	padding-left: 0px;
	width: 100%;
	max-width: 1500px;
	margin: 0px auto;
}

/* Stories Preview (horizontal scroll) */
.stories-preview {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 10px 0px 20px 10px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: center;
	justify-content: flex-start;
	align-items: center;
}

.stories-preview::-webkit-scrollbar {
	display: none;
}

.story-avatar {
	flex-shrink: 0;
	cursor: pointer;
	text-align: center;
}

.story-avatar-ring {
	width: 96px;
	height: 96px;
	padding: 3px;
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}

.story-avatar-ring:hover {
	transform: scale(1.05);
}

.story-avatar-ring.viewed {
	background: #c7c7c7;
}

.story-avatar-inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 3px solid white;
	overflow: hidden;
}

.story-avatar-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-username {
	font-size: 14px;
	margin-top: 5px;
	color: #262626;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 96px;
}

/* Full Story Modal */
.story-modal {
	display: none;
	position: fixed;
	top: 0px;
	left: 0;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	min-height: -webkit-fill-available;
	background: rgba(0, 0, 0, 0.95);
	z-index: 9999;
	align-items: center;
	justify-content: center;	
}

/* или с webkit-fill-available */
@supports (-webkit-touch-callout: none) {
  .story-modal {
	min-height: -webkit-fill-available !important;
  }
}

.story-modal.active {
	display: flex;
}

.story-viewer {
	position: relative;
	width: 100%;
	max-width: 500px;
	height: 100%;
	max-height: 90vh;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

/* Fullscreen mode */
.story-modal.fullscreen {
	background: #000;
}

.story-modal.fullscreen .story-viewer {
	max-width: 100%;
	max-height: 100vh;
	border-radius: 0;
}

/* Progress Bars */
.story-progress-bars {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	gap: 4px;
	z-index: 10;
}

.progress-bar {
	flex: 1;
	height: 3px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
	overflow: hidden;
}

.progress-bar-fill {
	height: 100%;
	background: white;
	width: 0%;
	transition: width 0.1s linear;
}

/* Header */
.story-header {
	position: absolute;
	top: 20px;
	left: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 10;
	margin-top: 15px;
}

.story-user-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.story-user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid white;
	object-fit: cover;
}

.story-user-name {
	color: white;
	font-weight: 600;
	font-size: 14px;
}

.story-time {
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	margin-left: 5px;
}

.story-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.fullscreen-btn {
	background: none;
	border: none;
	color: white;
	font-size: 20px;
	cursor: pointer;
	padding: 5px;
	line-height: 1;
}

.story-close {
	background: none;
	border: none;
	color: white;
	font-size: 28px;
	cursor: pointer;
	line-height: 1;
	padding: 5px;
}

/* Content */
.story-content {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.story-media {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
video.story-media {
	object-fit: cover !important;
}

/* Call to Action Button */
.story-cta {
	position: absolute;
	bottom: 80px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	width: calc(100% - 40px);
	max-width: 400px;
	animation: ctaSlideUp 0.5s ease-out;
}

@keyframes ctaSlideUp {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

.cta-button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 20px;
	background: var(--primary-color);
	border: none;
	border-radius: 22px;
	color: #fff;
	font-size: 15px;
	font-weight: normal;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
	background: var(--primary-color);
	/* transform: translateY(-2px); */
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
	text-decoration: none;
	opacity: 0.9;
}

.cta-button:active {
	transform: translateY(0);
}

.cta-text {
	flex: 1;
	text-align: left;
}

.cta-icon {
	font-size: 18px;
	margin-left: 10px;
}

/* Swipe up indicator (опционально) */
.swipe-indicator {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	animation: bounce 2s infinite;
	z-index: 9;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateX(-50%) translateY(0);
	}
	40% {
		transform: translateX(-50%) translateY(-10px);
	}
	60% {
		transform: translateX(-50%) translateY(-5px);
	}
}

.swipe-icon {
	font-size: 20px;
}

/* Navigation Areas */
.story-nav-area {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 30%;
	cursor: pointer;
	z-index: 5;
}

.story-nav-prev {
	left: 0;
}

.story-nav-next {
	right: 0;
}

/* Navigation Buttons (mobile) */
.story-nav-buttons {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	padding: 0 10px;
	pointer-events: none;
	z-index: 9;
}

.nav-btn {
	pointer-events: all;
	background: rgba(0, 0, 0, 0.3);
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	display: none;
}

@media (max-width: 768px) {
	.nav-btn {
		display: none;
	}
	.stories-preview {
		padding: 0px 0px 20px 10px;
	}
	.story-avatar-ring {
		width: 76px;
		height: 76px;
	}
	.story-username {
		font-size: 12px;
		max-width: 76px;
	}
}

/* Pause indicator */
.story-paused {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 48px;
	z-index: 10;
	opacity: 0;
	transition: opacity 0.2s;
}

.story-viewer.paused .story-paused {
	opacity: 0.8;
}

@media (max-width: 768px) {
	.story-viewer {
		max-width: 100%;
		max-height: 100vh;
		border-radius: 0;
	}
}