/* Simple Story Slider — front-end styles */

:root {
	--sss-ring: conic-gradient(from 220deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
	--sss-ring-seen: #c7c7c7;
	--sss-bg: #000;
	--sss-radius: 50%;
}

.sss-wrapper {
	margin: 0;
	max-width: 100%;
}

.sss-heading {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px;
}

/* ---------- Thumbnail slider ---------- */

.sss-slider {
	position: relative;
	display: flex;
	align-items: center;
}

.sss-slider-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 6px 2px 10px;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.sss-slider-track::-webkit-scrollbar {
	display: none;
}

@media (max-width: 639px) {
	.sss-slider-track {
		gap: 0;
	}
}

.sss-item {
	flex: 0 0 auto;
	text-align: center;
	width: 84px;
}

.sss-item-btn {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	font: inherit;
}

.sss-ring {
	width: 74px;
	height: 74px;
	border-radius: var(--sss-radius);
	background: var(--sss-ring);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	transition: opacity 0.2s ease;
}

.sss-item.sss-seen .sss-ring {
	background: var(--sss-ring-seen);
}

.sss-ring-inner {
	width: 100%;
	height: 100%;
	border-radius: var(--sss-radius);
	background: #fff;
	padding: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.sss-ring-inner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--sss-radius);
	display: block;
}

.sss-thumb-placeholder {
	width: 100%;
	height: 100%;
	border-radius: var(--sss-radius);
	background: #eee;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
}

.sss-item-title {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.3;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 84px;
}

.sss-scroll {
	position: absolute;
	top: 37px;
	transform: translateY(-50%);
	z-index: 2;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #e2e2e2;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 25px !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.sss-scroll-prev {
	inset-inline-start: -6px;
	transform: rotate(180deg) translateY(50%);
}

.sss-scroll-next {
	inset-inline-end: -6px;
	transform: rotate(180deg) translateY(50%);
}

.sss-scroll[hidden] {
	display: none;
}

/* ---------- Lightbox ---------- */

.sss-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}

.sss-lightbox.sss-open {
	display: block;
}

.sss-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: var(--sss-bg);
}

.sss-lightbox-inner {
	position: relative;
	z-index: 1;
	max-width: 420px;
	height: 100%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	color: #fff;
}

@media (min-width: 640px) {
	.sss-lightbox-inner {
		height: 92vh;
		margin-top: 4vh;
		border-radius: 12px;
		overflow: hidden;
	}
}

.sss-progress-row {
	display: flex;
	gap: 4px;
	padding: 10px 10px 0;
}

.sss-progress-seg {
	flex: 1;
	height: 3px;
	background: rgba(255, 255, 255, 0.35);
	border-radius: 3px;
	overflow: hidden;
}

.sss-progress-seg-fill {
	display: block;
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 3px;
}

.sss-progress-seg.sss-progress-done .sss-progress-seg-fill {
	width: 100%;
	transition: none;
}

.sss-progress-seg.sss-progress-active .sss-progress-seg-fill {
	transition: width linear;
}

.sss-lightbox-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
}

.sss-current-avatar img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.sss-current-title {
	font-size: 14px;
	font-weight: 600;
}

.sss-header-spacer {
	flex: 1;
}

.sss-mute-btn,
.sss-close-btn {
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sss-mute-btn svg {
	width: 22px;
	height: 22px;
}

.sss-close-btn {
	font-size: 26px;
}

.sss-media-wrap {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #111;
}

.sss-media-stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sss-media-stage img,
.sss-media-stage video {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.sss-nav-zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 30%;
	z-index: 1;
	cursor: pointer;
}

.sss-nav-zone-prev {
	inset-inline-start: 0;
}

.sss-nav-zone-next {
	inset-inline-end: 0;
}

.sss-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 14px;
}

@media (min-width: 640px) {
	.sss-nav {
		display: flex;
	}
}

.sss-prev {
	inset-inline-start: 10px;
}

.sss-next {
	inset-inline-end: 10px;
}

.sss-nav[disabled] {
	opacity: 0.25;
	cursor: default;
}

.sss-cta-link {
	display: block;
	text-align: center;
	margin: 0;
	padding: 14px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sss-cta-link:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.sss-cta-link[hidden] {
	display: none;
}

.sss-media-stage.sss-paused::after {
	content: "";
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.sss-progress-seg-fill,
	.sss-slider-track {
		transition: none !important;
	}
}
