/* Linked Image Slider — front-end styles */

.lis-slider {
	/* How many slides are visible. Defaults to 1, so a slider that doesn't opt
	   in renders exactly as it always has. */
	--lis-per-desktop: 1;
	--lis-per-tablet: 1;
	--lis-per-mobile: 1;
	--lis-per: var(--lis-per-desktop);
	--lis-gap: 0px;

	--lis-height: auto;
	--lis-radius: 10px;
	--lis-arrow-bg: rgba(20, 20, 20, 0.55);
	--lis-arrow-bg-hover: rgba(20, 20, 20, 0.85);
	--lis-arrow-color: #ffffff;
	--lis-dot: rgba(255, 255, 255, 0.55);
	--lis-dot-active: #ffffff;

	position: relative;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

.lis-slider *,
.lis-slider *::before,
.lis-slider *::after {
	box-sizing: border-box;
}

.lis-viewport {
	overflow: hidden;
	width: 100%;
}

.lis-slider.is-rounded .lis-viewport {
	border-radius: var(--lis-radius);
}

.lis-track {
	display: flex;
	gap: var(--lis-gap);
	will-change: transform;
	transition: transform 0.5s ease;
	/* Let us own horizontal swipes while still allowing vertical page scroll. */
	touch-action: pan-y;
	cursor: grab;

	/* Distance the track moves for one step: a slide's width plus the gap. */
	--lis-step: calc(
		(100% - (var(--lis-per) - 1) * var(--lis-gap)) / var(--lis-per) + var(--lis-gap)
	);
	transform: translateX(calc(-1 * var(--lis-i, 0) * var(--lis-step)));
}

.lis-track:active {
	cursor: grabbing;
}

.lis-track.is-dragging {
	transition: none;
}

/* Stop the browser's native image/link drag from hijacking a slow swipe. */
.lis-link,
.lis-image {
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	user-drag: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

.lis-slide {
	flex: 0 0 calc((100% - (var(--lis-per) - 1) * var(--lis-gap)) / var(--lis-per));
	min-width: 0;
	position: relative;
	line-height: 0;
}

/* Breakpoints for the responsive per-view counts. */
@media (max-width: 1024px) {
	.lis-slider {
		--lis-per: var(--lis-per-tablet);
	}
}

@media (max-width: 600px) {
	.lis-slider {
		--lis-per: var(--lis-per-mobile);
	}
}

.lis-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.lis-image {
	display: block;
	width: 100%;
	max-width: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}

/* Deliberately specific: Elementor and many themes ship rules like
   `.elementor img { height: auto }`, which are more specific than a bare
   `.lis-image` and would otherwise cancel a height set in the editor. */
.lis-slider .lis-slide .lis-image {
	height: var(--lis-height);
}

/* Arrows */
.lis-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--lis-arrow-bg);
	color: var(--lis-arrow-color);
	cursor: pointer;
	z-index: 3;
	transition: background 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lis-arrow:hover,
.lis-arrow:focus-visible {
	background: var(--lis-arrow-bg-hover);
	outline: none;
}

.lis-arrow svg {
	width: 22px;
	height: 22px;
	display: block;
}

.lis-prev {
	left: 12px;
}

.lis-next {
	right: 12px;
}

.lis-arrow[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* Dots */
.lis-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
}

.lis-dots button {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--lis-dot);
	opacity: 0.9;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lis-dots button.is-active {
	background: var(--lis-dot-active);
	transform: scale(1.35);
}

.lis-dots button:focus-visible {
	outline: 2px solid var(--lis-dot-active);
	outline-offset: 2px;
}

/* When dots sit under the image, give them a neutral color so they show on light backgrounds too */
.lis-slider .lis-dots button {
	background: rgba(0, 0, 0, 0.25);
}

.lis-slider .lis-dots button.is-active {
	background: rgba(0, 0, 0, 0.75);
}

@media (max-width: 600px) {
	.lis-arrow {
		width: 36px;
		height: 36px;
	}

	.lis-arrow svg {
		width: 18px;
		height: 18px;
	}

	.lis-prev {
		left: 8px;
	}

	.lis-next {
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lis-track {
		transition: none;
	}
}

/* Used for the instant repositioning that makes looping seamless. */
.lis-track.is-instant {
	transition: none !important;
}
