.atlasblog-stories {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	direction: rtl;
}

.atlasblog-stories__viewport {
	flex: 1 1 auto;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.atlasblog-stories__viewport::-webkit-scrollbar {
	display: none;
}

.atlasblog-stories__track {
	display: flex;
	gap: var(--atlasblog-stories-gap, 18px);
	width: max-content;
	padding: 4px 2px 8px;
}

.atlasblog-stories__item {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: var(--atlasblog-stories-item-width, 92px);
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: center;
}

.atlasblog-stories .atlasblog-stories__item:hover,
.atlasblog-stories .atlasblog-stories__item:focus,
.atlasblog-stories .atlasblog-stories__item:focus-visible,
.atlasblog-stories .atlasblog-stories__item:active {
	background: transparent !important;
	color: inherit !important;
	text-decoration: none !important;
	box-shadow: none !important;
	outline: none;
}

.atlasblog-stories__ring {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--atlasblog-stories-circle-size, 78px);
	height: var(--atlasblog-stories-circle-size, 78px);
	padding: 3px;
	border-radius: 50%;
	background: var(
		--atlasblog-stories-ring-gradient,
		linear-gradient(180deg, #7c3aed 0%, #c026d3 52%, #ec4899 100%)
	);
	box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.18);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.atlasblog-stories__item:hover .atlasblog-stories__ring,
.atlasblog-stories__item:focus-visible .atlasblog-stories__ring {
	box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.28), 0 8px 20px rgba(192, 38, 211, 0.18);
	transform: scale(1.03);
}

.atlasblog-stories__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: linear-gradient(180deg, #f5f3ff 0%, #fdf2f8 100%);
}

.atlasblog-stories__media img,
.atlasblog-stories__media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.atlasblog-stories__media-fallback {
	color: #7c3aed;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.atlasblog-stories__media-poster {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.atlasblog-stories__media-poster.is-loading-poster .atlasblog-stories__media-fallback {
	opacity: 0.65;
}

.atlasblog-stories__title {
	display: block;
	overflow: hidden;
	width: 100%;
	color: #374151;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.atlasblog-stories__arrow {
	position: relative;
	z-index: 2;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
	color: #9ca3af;
	cursor: pointer;
}

.atlasblog-stories__arrow span {
	font-size: 24px;
	line-height: 1;
}

.atlasblog-stories__arrow:hover,
.atlasblog-stories__arrow:focus-visible {
	color: #4b5563;
	outline: 0;
}

.atlasblog-stories__empty {
	padding: 16px;
	border-radius: 12px;
	background: #f8fafc;
	color: #64748b;
	text-align: center;
}

.atlasblog-stories__viewer {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px 12px;
	background: #000000;
}

.atlasblog-stories__viewer.is-open {
	display: flex;
}

.atlasblog-stories__viewer-close {
	position: absolute;
	top: 20px;
	left: 20px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
}

.atlasblog-stories__viewer-close span {
	font-size: 34px;
	line-height: 1;
}

.atlasblog-stories__viewer-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 1200px;
	height: 100%;
}

.atlasblog-stories__viewer-carousel {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 0;
}

.atlasblog-stories__viewer-slide {
	flex: 0 0 auto;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.atlasblog-stories__viewer-slide.is-prev,
.atlasblog-stories__viewer-slide.is-next {
	opacity: 0.38;
	transform: scale(0.74);
}

.atlasblog-stories__viewer-slide.is-active {
	opacity: 1;
	transform: scale(1);
}

.atlasblog-stories__viewer-card {
	position: relative;
	overflow: hidden;
	width: min(360px, 78vw);
	aspect-ratio: 9 / 16;
	border-radius: 18px;
	background: #111111;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.atlasblog-stories__viewer-progress {
	position: absolute;
	top: 10px;
	right: 10px;
	left: 10px;
	z-index: 3;
	display: flex;
	gap: 4px;
}

.atlasblog-stories__viewer-progress-item {
	position: relative;
	flex: 1 1 0;
	height: 3px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.28);
}

.atlasblog-stories__viewer-progress-item.is-complete {
	background: rgba(255, 255, 255, 0.95);
}

.atlasblog-stories__viewer-progress-fill {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: #ffffff;
}

.atlasblog-stories__viewer-progress-item.is-current .atlasblog-stories__viewer-progress-fill {
	animation: atlasblog-stories-progress linear forwards;
}

@keyframes atlasblog-stories-progress {
	from {
		width: 0;
	}

	to {
		width: 100%;
	}
}

.atlasblog-stories__viewer-tools {
	position: absolute;
	top: 22px;
	left: 12px;
	z-index: 3;
	display: flex;
	gap: 8px;
}

.atlasblog-stories__viewer-tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: #ffffff;
	font-size: 11px;
	line-height: 1;
	cursor: pointer;
}

.atlasblog-stories__viewer-tool.is-paused {
	font-size: 10px;
}

.atlasblog-stories__viewer-media {
	position: absolute;
	inset: 0;
	background: #000000;
}

.atlasblog-stories__viewer-media img,
.atlasblog-stories__viewer-media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.atlasblog-stories__viewer-overlay {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	padding: 18px 16px 20px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.atlasblog-stories__viewer-title-box {
	display: inline-block;
	max-width: 100%;
	padding: 8px 12px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.88);
	color: #ffffff;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.5;
}

.atlasblog-stories__viewer-nav {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	cursor: pointer;
}

.atlasblog-stories__viewer-nav span {
	font-size: 28px;
	line-height: 1;
}

.atlasblog-stories__viewer-nav:hover,
.atlasblog-stories__viewer-nav:focus-visible,
.atlasblog-stories__viewer-close:hover,
.atlasblog-stories__viewer-close:focus-visible,
.atlasblog-stories__viewer-tool:hover,
.atlasblog-stories__viewer-tool:focus-visible {
	background: rgba(255, 255, 255, 0.22) !important;
	color: #ffffff !important;
	outline: none;
}

html.atlasblog-stories-viewer-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.atlasblog-stories__viewer {
		padding: 12px 0;
	}

	.atlasblog-stories__viewer-slide.is-prev,
	.atlasblog-stories__viewer-slide.is-next {
		display: none;
	}

	.atlasblog-stories__viewer-card {
		width: min(100vw - 88px, 360px);
	}

	.atlasblog-stories__viewer-close {
		top: 12px;
		left: 12px;
	}

	.atlasblog-stories__viewer-title-box {
		font-size: 16px;
	}
}

@media (max-width: 767px) {
	.atlasblog-stories__arrow {
		width: 34px;
		height: 34px;
	}

	.atlasblog-stories__arrow span {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atlasblog-stories__ring,
	.atlasblog-stories__viewport {
		scroll-behavior: auto;
		transition: none;
	}
}
