/**
 * Danesh Land — Stories bar + glass player
 * Educational luxury: navy ink, warm gold ring, IranYekan inherit.
 */

.dl-stories {
	--dl-ink: #1c2430;
	--dl-muted: #3f4064;
	--dl-gold: #c9a227;
	--dl-gold-2: #e4c56a;
	--dl-teal: #0f766e;
	--dl-navy: #16324f;
	direction: rtl;
	position: relative;
	z-index: 4;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 250, 0.9));
	padding: 14px 0 8px;
	font-family: inherit;
}

.dl-stories__inner {
	position: relative;
	max-width: 1676px;
	margin: 0 auto;
	padding: 0 16px;
}

.dl-stories__viewport {
	overflow-x: auto !important;
	overflow-y: hidden !important;
	width: 100%;
	cursor: grab;
	touch-action: pan-x pan-y;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	user-select: none;
	-webkit-user-select: none;
}

.dl-stories__viewport::-webkit-scrollbar {
	display: none;
}

.dl-stories__viewport.is-dragging {
	cursor: grabbing;
}

.dl-stories__track {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	width: max-content;
		gap: var(--dl-gap, 12px);
}

.dl-story-dot {
	flex: 0 0 auto;
	scroll-snap-align: start;
		flex: 0 0 var(--dl-story-w, 86px);
		width: var(--dl-story-w, 86px);
		min-height: var(--dl-story-h, 120px);
		max-width: var(--dl-story-w, 86px);
	scroll-snap-stop: always;
	touch-action: pan-x pan-y;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	border: 0;
	background: transparent;
	padding: 2px 0 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.dl-story-dot__ring {
	display: grid;
	place-items: center;
	width: var(--dl-circle, 74px);
	height: var(--dl-cover-h, var(--dl-circle, 74px));
	border-radius: 50%;
	padding: 2.5px;
	background: conic-gradient(from 210deg, #7c5cff, #3b82f6, #16324f, #c084fc, #7c5cff);
	box-shadow: 0 8px 18px rgba(22, 50, 79, 0.12);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.dl-story-dot:hover .dl-story-dot__ring,
.dl-story-dot:focus-visible .dl-story-dot__ring {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 24px rgba(124, 92, 255, 0.28);
}

.dl-story-dot__photo {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	box-shadow: inset 0 0 0 2.5px #fff;
}

.dl-story-dot__photo img,
.dl-story-dot__fallback {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.dl-story-dot__fallback {
	display: grid;
	place-items: center;
	background: linear-gradient(160deg, #16324f, #0f766e);
	color: #fff;
	font-weight: 800;
	font-size: 22px;
}

.dl-story-dot__title {
	max-width: 100%;
	font-size: var(--dl-title-size, 12px);
	line-height: 1.45;
	font-weight: 500;
	color: var(--dl-title-color, #3f4064);
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.9em;
}

.dl-stories__arrow {
	position: absolute;
	top: 28px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 6px 18px rgba(22, 50, 79, 0.14);
	cursor: pointer;
}

.dl-stories__arrow--next { left: 8px; }
.dl-stories__arrow--prev { right: 8px; }

.dl-stories__arrow::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 8px;
	height: 8px;
	border-right: 2px solid #16324f;
	border-bottom: 2px solid #16324f;
}

.dl-stories__arrow--next::before { transform: rotate(135deg) translate(-1px, -1px); }
.dl-stories__arrow--prev::before { transform: rotate(-45deg) translate(-1px, -1px); }

/* Overlay player */
.dl-story-overlay {
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: grid;
	place-items: center;
}

.dl-story-overlay[hidden] {
	display: none;
}

.dl-story-overlay__glass {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 28, calc(var(--dl-overlay-opacity, 58) / 100));
	backdrop-filter: blur(var(--dl-blur, 22px));
	-webkit-backdrop-filter: blur(var(--dl-blur, 22px));
}

.dl-story-overlay__stage {
	position: relative;
	width: min(420px, calc(100vw - 24px));
	height: min(92vh, 820px);
	overflow: hidden;
	border-radius: 28px;
	z-index: 1;
}

.dl-story-overlay__close {
	position: absolute;
	top: 14px;
	right: 14px;
	left: auto;
	z-index: 5;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(8, 12, 20, 0.42);
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
	backdrop-filter: blur(10px);
}

.dl-story-overlay__rail {
	display: flex;
	height: 100%;
	will-change: transform;
}

.dl-story-panel {
	flex: 0 0 100%;
	height: 100%;
}

.dl-story-panel__frame {
	position: relative;
	height: 100%;
	background: #0b1220;
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 92, 255, 0.28);
}

.dl-story-panel__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #0b1220;
}

.dl-story-panel.is-waiting-play .dl-story-panel__video {
	cursor: pointer;
}
.dl-story-panel.is-waiting-play .dl-story-panel__frame::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 4;
	width: 0;
	height: 0;
	margin: -18px 0 0 8px;
	border-style: solid;
	border-width: 18px 0 18px 30px;
	border-color: transparent transparent transparent rgba(255, 255, 255, 0.94);
	filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
	pointer-events: none;
}

.dl-story-panel__top {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 3;
	padding: 16px 16px 0 64px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent);
}

.dl-story-panel__progress {
	height: 3px;
	border-radius: 99px;
	background: rgba(255, 255, 255, 0.28);
	overflow: hidden;
}

.dl-story-panel__progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #e4c56a, #fff);
	transform-origin: right center;
}

.dl-story-panel__timer {
	position: absolute;
	top: 28px;
	left: 16px;
	font-variant-numeric: tabular-nums;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #fff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
	direction: ltr;
}

.dl-story-panel__watermark {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	overflow: hidden;
}

.dl-story-panel__watermark img {
	position: absolute;
	top: 0;
	left: 0;
	will-change: transform;
	user-select: none;
}

.dl-story-panel__bottom {
	position: absolute;
	right: 0;
	left: 0;
	bottom: 0;
	z-index: 3;
	padding: 0 12px 14px;
}

.dl-story-marquee {
	direction: ltr;
	overflow: hidden;
	margin-bottom: 15px;
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.dl-story-marquee__inner {
	display: inline-block;
	white-space: nowrap;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
	animation: dlStoryMarquee 14s linear infinite;
}

@keyframes dlStoryMarquee {
	from { transform: translateX(-100%); }
	to { transform: translateX(100%); }
}

.dl-story-light {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 10px 30px rgba(10, 16, 28, 0.18);
	color: #16324f;
}

.dl-story-light__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.dl-story-light__text strong {
	font-size: 13px;
	font-weight: 800;
	line-height: 1.4;
}

.dl-story-light__text a {
	color: #6d4aff;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.dl-story-light__download {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: #16324f;
	color: #e4c56a;
	display: grid;
	place-items: center;
}

body.dl-stories-lock {
	overflow: hidden;
}

@media (max-width: 720px) {
	.dl-story-overlay__stage {
		width: min(100vw, 100%);
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
	}

	.dl-story-panel__frame {
		border-radius: 0;
	}

	.dl-stories__inner {
		padding: 0 10px;
	}
}
