/* Tư-Trà Slider (tt-el-slider), shipped by the UI Kit v4.0.2: the stylesheet.
   The track is a native scroll snapper, so momentum, the rubber band and the snap are the system's. Every size is set
   here from custom properties, so a turn re-lays the slider out with no script. No will-change: no layer is kept for a
   slide that is off screen.

   Markup (rendered by the element; a consumer that renders its own keeps the same classes):
     .tt-el-sl-wrap                     the root; a size container
       .tt-el-sl-track                  the scroller (the script adds data-tt-pl-uk-rail: the Rail library drags it with a mouse)
         .tt-el-sl-slide > img          one per photo; the track's width at the aspect ratio
       .tt-el-sl-thumbs                 optional: over the bottom of the slides (dock) or below them (rail)
         .tt-el-sl-thumb > img          one per slide, in order; aria-current="true" on the active one (the script)
     On the root: data-tt-el-sl-thumbs="dock|rail", data-tt-el-sl-parallax, data-tt-el-sl-vignette.

   Custom properties, on the root; the element's controls write them. The thumbnail chain is the gallery's golden seed
   bound to a phi token: the thumbnail, its corner (/8), its offset from the slide's edges (/phi), the gap between
   thumbnails (/phi again), and the slide's corner, concentric with the thumbnails' (corner + offset). */
.tt-el-sl-wrap {
	--tt-el-sl-aspect: 1 / 1.618;
	--tt-el-sl-gap: var(--phi-space-m, 1.618rem);
	--tt-el-sl-bg: var(--color-linen-deep, #49443D);
	--tt-el-sl-thumb: var(--phi-space-m, 1.618rem);
	--tt-el-sl-thumb-ratio: 1 / 1;
	--tt-el-sl-thumb-r: calc(var(--tt-el-sl-thumb) / 8);
	--tt-el-sl-thumb-offset: calc(var(--tt-el-sl-thumb) / var(--phi, 1.618));
	--tt-el-sl-thumb-gap: calc(var(--tt-el-sl-thumb-offset) / var(--phi, 1.618));
	--tt-el-sl-radius: calc(var(--tt-el-sl-thumb-r) + var(--tt-el-sl-thumb-offset));
	--tt-el-sl-thumb-bg: transparent;
	--tt-el-sl-idle: var(--color-paper, #FDFBF3);
	--tt-el-sl-active: var(--color-linen-light, #BBB19A);
	--tt-el-sl-idle-w: 0.5px;
	--tt-el-sl-active-w: 1px;
	--tt-el-sl-idle-op: 0.6;
	--tt-el-sl-active-scale: 1.09;
	--tt-el-sl-parallax: 0.15;
	--tt-el-sl-ms: 0.34s;
	--tt-el-sl-ease: cubic-bezier(.32, .72, 0, 1);
	container-type: inline-size;
	position: relative;
	width: 100%;
	min-width: 0;
}

.tt-el-sl-track {
	display: flex;
	gap: var(--tt-el-sl-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--tt-el-sl-radius);
}
.tt-el-sl-track::-webkit-scrollbar { display: none; }

.tt-el-sl-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	aspect-ratio: var(--tt-el-sl-aspect);
	margin: 0;
	overflow: hidden;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	border-radius: var(--tt-el-sl-radius);
	background: var(--tt-el-sl-bg);
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}
.tt-el-sl-slide > img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}

/* the vignette: a still overlay, never a moving layer */
.tt-el-sl-wrap[data-tt-el-sl-vignette] .tt-el-sl-slide::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse at center, transparent 40%, rgba(var(--color-linen-deep-rgb, 73, 68, 61), 0.15) 100%);
}

/* Parallax, CSS only: each slide has its own view timeline on the track's inline axis, and its photo drifts inside the
   frame as the slide crosses the track. Where scroll-driven animations are not supported there is no parallax. */
@supports (animation-timeline: view()) {
	.tt-el-sl-wrap[data-tt-el-sl-parallax] .tt-el-sl-slide { view-timeline: --tt-el-sl-px inline; }
	.tt-el-sl-wrap[data-tt-el-sl-parallax] .tt-el-sl-slide > img {
		width: calc(100% * (1 + 2 * var(--tt-el-sl-parallax)));
		margin-left: calc(-100% * var(--tt-el-sl-parallax));
		animation: tt-el-sl-px linear both;
		animation-timeline: --tt-el-sl-px;
	}
}
@keyframes tt-el-sl-px {
	from { transform: translateX(calc(-100cqw * var(--tt-el-sl-parallax))); }
	to { transform: translateX(calc(100cqw * var(--tt-el-sl-parallax))); }
}

/* The thumbnails. Dock: over the bottom of the slides, centred, inset by the offset. Rail: a row below the slides,
   from the start. Either scrolls natively when it overflows, its edges faded. */
.tt-el-sl-thumbs {
	--tt-el-sl-pad: calc(var(--tt-el-sl-thumb) * (var(--tt-el-sl-active-scale) - 1) / 2 + 2px);
	display: flex;
	gap: var(--tt-el-sl-thumb-gap);
	padding: var(--tt-el-sl-pad);
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.tt-el-sl-thumbs::-webkit-scrollbar { display: none; }
.tt-el-sl-wrap[data-tt-el-sl-thumbs="dock"] > .tt-el-sl-thumbs {
	position: absolute;
	left: var(--tt-el-sl-thumb-offset);
	right: var(--tt-el-sl-thumb-offset);
	bottom: calc(var(--tt-el-sl-thumb-offset) - var(--tt-el-sl-pad));
	z-index: 1;
	justify-content: safe center;
}
.tt-el-sl-wrap[data-tt-el-sl-thumbs="rail"] > .tt-el-sl-thumbs {
	justify-content: flex-start;
	margin-top: calc(var(--tt-el-sl-thumb-offset) - var(--tt-el-sl-pad));
	padding-inline: var(--tt-el-sl-pad);
}
/* the faded edges: the row's own scroll timeline is active only when the row overflows */
@supports (animation-timeline: scroll()) {
	.tt-el-sl-thumbs {
		animation: tt-el-sl-fade linear both;
		animation-timeline: scroll(self inline);
	}
}
@keyframes tt-el-sl-fade {
	from, to {
		-webkit-mask-image: linear-gradient(to right, transparent, currentColor var(--tt-el-sl-thumb-offset), currentColor calc(100% - var(--tt-el-sl-thumb-offset)), transparent);
		mask-image: linear-gradient(to right, transparent, currentColor var(--tt-el-sl-thumb-offset), currentColor calc(100% - var(--tt-el-sl-thumb-offset)), transparent);
	}
}
.tt-el-sl-thumb {
	flex: 0 0 auto;
	height: var(--tt-el-sl-thumb);
	aspect-ratio: var(--tt-el-sl-thumb-ratio);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--tt-el-sl-thumb-r);
	overflow: hidden;
	background: var(--tt-el-sl-thumb-bg);
	outline: var(--tt-el-sl-idle-w) solid var(--tt-el-sl-idle);
	outline-offset: 0;
	opacity: var(--tt-el-sl-idle-op);
	transform: scale(1);
	cursor: pointer;
	transition: opacity var(--tt-el-sl-ms) var(--tt-el-sl-ease), transform var(--tt-el-sl-ms) var(--tt-el-sl-ease),
		outline-color var(--tt-el-sl-ms) var(--tt-el-sl-ease), outline-width var(--tt-el-sl-ms) var(--tt-el-sl-ease);
	-webkit-tap-highlight-color: transparent;
}
.tt-el-sl-thumb[aria-current="true"] {
	opacity: 1;
	transform: scale(var(--tt-el-sl-active-scale));
	outline-width: var(--tt-el-sl-active-w);
	outline-color: var(--tt-el-sl-active);
}
.tt-el-sl-thumb:focus-visible { outline-color: var(--tt-el-sl-active); }
.tt-el-sl-thumb > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	-webkit-user-drag: none;
}

/* the builder canvas: a static preview, no script */
.tt-el-sl-wrap--builder .tt-el-sl-track { overflow: hidden; }
.tt-el-sl-empty {
	display: grid;
	place-items: center;
	aspect-ratio: var(--tt-el-sl-aspect);
	border-radius: var(--tt-el-sl-radius);
	background: var(--tt-el-sl-bg);
	color: var(--color-paper, #FDFBF3);
	font-size: var(--phi-step--1, 0.7862rem);
	text-align: center;
	padding: var(--phi-space-s, 1rem);
}

@media (prefers-reduced-motion: reduce) {
	.tt-el-sl-slide > img { animation: none !important; transform: none !important; width: 100% !important; margin-left: 0 !important; }
	.tt-el-sl-thumb { transition: none; }
}
