/* --------------------------------------------------------------------------
   LMH carousel (Nov 2026). Base layout that slick.css used to provide, now on
   CSS scroll snap. Theme styles for .slick-arrow, .slick-dots, .slick-track
   and .slick-list in style.css and the block stylesheets still apply.
   Guide: carousel.
   -------------------------------------------------------------------------- */
.lmh-carousel {
	position: relative;
	display: block;
	box-sizing: border-box;
}

.lmh-carousel .slick-list {
	position: relative;
	display: block;
	overflow: hidden;
	/* Slick gave the list a transform; isolation keeps its pseudo-element fades under the arrows the same way. */
	isolation: isolate;
	margin: 0;
	padding: 0;
	transition: height 0.3s ease;
}

.lmh-carousel .slick-track {
	position: relative;
	display: flex;
	width: 100%;
	min-width: 0;
	align-items: stretch;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	touch-action: manipulation;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.lmh-carousel .slick-track::-webkit-scrollbar {
	display: none;
}

.lmh-carousel .slick-track:focus-visible {
	outline: 2px solid var(--yellow, #fff200);
	outline-offset: 2px;
}

.lmh-carousel .slick-slide {
	/* Like Slick: each slide's margin box fills its share of the track. */
	flex: 0 0 calc(100% / var(--lmh-show, 1) - var(--lmh-offset, 0px));
	min-width: 0;
	scroll-snap-align: start;
	/* Snap to the margin edge, as Slick positioned slides, not the border edge. */
	scroll-margin-inline-start: var(--lmh-mstart, 0px);
	box-sizing: border-box;
	float: none;
	height: auto;
}

.lmh-carousel--center .slick-track {
	padding-inline: var(--lmh-center-pad);
	scroll-padding-inline: var(--lmh-center-pad);
}

.lmh-carousel--center .slick-slide {
	flex-basis: calc(100% - var(--lmh-offset, 0px));
	scroll-snap-align: center;
}

.lmh-carousel--adaptive .slick-track {
	align-items: flex-start;
}

/* Ported from slick-theme.css (minus the icon font). :where() keeps these at
   Slick's low specificity so the theme's own arrow and dot styles still win. */
:where(.lmh-carousel) .slick-arrow {
	position: absolute;
	top: 50%;
	transform: translate(0, -50%);
	display: block;
	padding: 0;
	border: none;
	font-size: 0;
	line-height: 0;
	color: transparent;
	touch-action: manipulation;
	cursor: pointer;
}

:where(.lmh-carousel) .slick-prev {
	left: -25px;
}

:where(.lmh-carousel) .slick-next {
	right: -25px;
}

.lmh-carousel [hidden] {
	display: none !important;
}

:where(.lmh-carousel).slick-dotted {
	margin-bottom: 30px;
}

:where(.lmh-carousel) .slick-dots {
	position: absolute;
	bottom: -25px;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
}

:where(.lmh-carousel) .slick-dots li {
	position: relative;
	display: inline-block;
	height: 20px;
	margin: 0 5px;
	padding: 0;
}

.lmh-carousel .slick-arrow[disabled] {
	opacity: 0.4;
	cursor: default;
}

/* 24px tap target (WCAG 2.5.8) while the visible bar keeps the theme's
   3.5px height: the fill is clipped to the content box. */
.lmh-carousel .slick-dots li button {
	display: block;
	min-width: 24px;
	height: 24px;
	padding: 10.25px 0;
	/* Pull the 24px target up so the visible bar sits where Slick drew it. */
	margin-top: -10.25px;
	border: 0;
	font-size: 0;
	line-height: 0;
	color: transparent;
	background-clip: content-box;
	touch-action: manipulation;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	.lmh-carousel .slick-list {
		transition: none;
	}
}
