/**
 * LT Image Text Slider - base styles.
 *
 * Every slide's *slot* is the exact same literal width/height (the Layout
 * section's Slide Width/Height) rather than a uniform auto-division of the
 * viewport: `.lt-image-text-slider__slide` is `flex: 0 0 auto`, so it
 * always sizes itself to its `.lt-image-text-slider__card`'s explicit,
 * un-transformed width/height. The selected slide's card is then grown
 * with `transform: scale()` (Active State section) - a paint-only effect
 * that never changes that width/height, so the slot never resizes and no
 * other slide ever shifts; only the active card visually paints a little
 * past its own slot. lt-image-text-slider.js measures each slide's actual
 * rendered size every layout pass to compute pixel-accurate offsets - it
 * reads the --lt-its-gap custom property below for the same reason: one
 * control drives both the visual gap and the JS math, so they can never
 * disagree.
 */

.lt-image-text-slider {
	position: relative;
	--lt-its-gap: 20px;
	--lt-its-active-scale: 1.12;
	--lt-its-arrow-top: 50%;
}

/*
 * Positioning context for the prev/next arrows (below) - scoped to just
 * the slider row, not the whole widget, so "Vertical Position: Middle"
 * centers them against the row's own height and never against the row
 * plus the Detail Panel underneath it.
 */
.lt-image-text-slider__slider {
	position: relative;
}

.lt-image-text-slider__viewport {
	/*
	 * Horizontal-only clipping: the active card paints past its slot
	 * (transform: scale(), below) and must not be cut off top/bottom, but
	 * slides scrolled out of view still need to be hidden left/right.
	 */
	overflow-x: hidden;
	overflow-y: visible;
	width: 100%;
}

.lt-image-text-slider__viewport--dragging {
	cursor: grabbing;
}

.lt-image-text-slider__track {
	display: flex;
	align-items: stretch;
	cursor: grab;
	will-change: transform;
	transition-property: transform;
	transition-timing-function: ease;
	padding: 14px 0;
}

.lt-image-text-slider--fade .lt-image-text-slider__track {
	position: relative;
	cursor: default;
}

.lt-image-text-slider__slide {
	flex: 0 0 auto;
	box-sizing: border-box;
	min-width: 0;
}

.lt-image-text-slider--fade .lt-image-text-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition-property: opacity;
}

.lt-image-text-slider--fade .lt-image-text-slider__slide--current {
	position: relative;
	opacity: 1;
	pointer-events: auto;
}

.lt-image-text-slider__card {
	position: relative;
	display: block;
	width: 220px;
	height: 150px;
	overflow: hidden;
	border-radius: 16px;
	background-color: #1c1c1c;
	color: #fff;
	text-decoration: none;
	box-sizing: border-box;
	transform: scale(1);
	transform-origin: center;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lt-image-text-slider__image {
	position: absolute;
	inset: 0;
	display: block;
}

.lt-image-text-slider__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	-webkit-user-drag: none;
}

.lt-image-text-slider__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.65) 100%);
}

.lt-image-text-slider__card[role="button"] {
	cursor: pointer;
}

.lt-image-text-slider__card[role="button"]:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

.lt-image-text-slider__content {
	position: relative;
	z-index: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 6px;
	padding: 14px;
}

.lt-image-text-slider__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.18);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.lt-image-text-slider__badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.lt-image-text-slider__badge-icon svg {
	width: 14px;
	height: 14px;
}

.lt-image-text-slider__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
}

/*
 * Active/selected slide highlight - default matches the Style tab's default
 * control values. The scale grows the card in place, paint-only (see the
 * file header comment) - the slide's own slot never resizes, so no other
 * slide ever moves. z-index on the slide (a flex item, so it doesn't need
 * `position` set) lifts the growing card above its neighbours so it isn't
 * clipped underneath them.
 */
.lt-image-text-slider__slide--active {
	z-index: 2;
}

.lt-image-text-slider__slide--active .lt-image-text-slider__card {
	--lt-its-active-border-width: 2px;
	box-shadow: 0 0 0 var(--lt-its-active-border-width) #3b82f6;
	transform: scale(var(--lt-its-active-scale, 1.12));
}

.lt-image-text-slider__arrow {
	position: absolute;
	top: var(--lt-its-arrow-top, 50%);
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.9);
	color: #1c1c1c;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.lt-image-text-slider__arrow:hover {
	background-color: #ffffff;
}

.lt-image-text-slider__arrow:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.lt-image-text-slider__arrow--prev {
	left: 8px;
}

.lt-image-text-slider__arrow--next {
	right: 8px;
}

.lt-image-text-slider__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

.lt-image-text-slider__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #d9d9d9;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.lt-image-text-slider__dot--active {
	background-color: #1c1c1c;
}

@media (max-width: 767px) {
	.lt-image-text-slider__arrow {
		width: 30px;
		height: 30px;
	}
}

/**
 * Detail Panel - one full-box image with the badge/title/description
 * overlaid on top of it, shown under the slider and in sync with whichever
 * slide is selected (see lt-image-text-slider.js). The image and the text
 * are separate absolutely-positioned layers stacked inside this single box
 * (not side-by-side columns) so the image always fills the whole panel.
 * Text sits on the left by default; the widget's "Text Position" control
 * adds --text-right to move it to the right (and flip the overlay).
 */
.lt-image-text-slider__detail {
	position: relative;
	min-height: 460px;
	margin-top: 24px;
	overflow: hidden;
	border-radius: 20px;
	background-color: #1c1c1c;
}

.lt-image-text-slider__detail-media {
	position: absolute;
	inset: 0;
	transition: opacity 0.25s ease;
}

.lt-image-text-slider__detail-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lt-image-text-slider__detail-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 80%);
	pointer-events: none;
}

.lt-image-text-slider__detail--text-right .lt-image-text-slider__detail-overlay {
	background: linear-gradient(270deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 80%);
}

.lt-image-text-slider__detail-content {
	position: relative;
	z-index: 1;
	height: 100%;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 48px;
	box-sizing: border-box;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.lt-image-text-slider__detail--text-right .lt-image-text-slider__detail-content {
	margin-left: auto;
	align-items: flex-end;
	text-align: right;
}

/*
 * Crossfade toggled by JS (swapDetailContent()) while the Detail Panel's
 * image/text is being swapped to a newly-selected slide: fades the whole
 * box out, then - once the new markup is in place - removing this class
 * fades it back in. The content also drifts down slightly on the way out
 * for a touch of motion, not just a flat opacity change.
 */
.lt-image-text-slider__detail--switching .lt-image-text-slider__detail-media {
	opacity: 0;
}

.lt-image-text-slider__detail--switching .lt-image-text-slider__detail-content {
	opacity: 0;
	transform: translateY(8px);
}

.lt-image-text-slider__detail-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.lt-image-text-slider__detail-badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.lt-image-text-slider__detail-badge-icon svg {
	width: 16px;
	height: 16px;
}

.lt-image-text-slider__detail-title {
	font-size: 42px;
	font-weight: 600;
	line-height: 1.15;
	color: #ffffff;
}

.lt-image-text-slider__detail-subtitle {
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
	color: #ffffff;
}

.lt-image-text-slider__detail-desc {
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	max-width: 46ch;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Per-element spacing (each overridable via its own "Spacing Below" control).
 * Skips the last element so no stray space is left under the content.
 */
.lt-image-text-slider__detail-badge:not(:last-child),
.lt-image-text-slider__detail-title:not(:last-child),
.lt-image-text-slider__detail-subtitle:not(:last-child),
.lt-image-text-slider__detail-desc:not(:last-child) {
	margin-bottom: 16px;
}

.lt-image-text-slider__detail-desc-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	text-align: left;
}

/*
 * Themes often style `ul`/`li` with bullets (list-style or a ::before
 * marker) at higher specificity - force them off so only the check icon
 * shows.
 */
.lt-image-text-slider ul.lt-image-text-slider__detail-desc,
.lt-image-text-slider ul.lt-image-text-slider__detail-desc > li {
	list-style: none !important;
	margin-left: 0;
	padding-left: 0;
}

.lt-image-text-slider ul.lt-image-text-slider__detail-desc > li::before,
.lt-image-text-slider ul.lt-image-text-slider__detail-desc > li::marker {
	content: none !important;
	display: none !important;
}

.lt-image-text-slider__detail-check {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 1.6em; /* matches the list line-height so the icon centers on the first line */
	font-size: 16px;
	color: #ffffff;
}

/* Covers both the built-in check and any icon picked in "Description List Icon" (font <i> or uploaded SVG). */
.lt-image-text-slider__detail-check svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.lt-image-text-slider__detail-check i {
	display: block;
	font-size: 1em;
	line-height: 1;
}

.lt-image-text-slider__detail-button {
	display: inline-block;
	margin-top: 8px;
	padding: 12px 28px;
	border-radius: 999px;
	background-color: #ffffff;
	color: #111111;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.lt-image-text-slider__detail-button:hover,
.lt-image-text-slider__detail-button:focus-visible {
	background-color: rgba(255, 255, 255, 0.85);
	color: #111111;
	text-decoration: none;
}

@media (max-width: 767px) {
	.lt-image-text-slider__detail {
		min-height: 360px;
	}

	.lt-image-text-slider__detail-content {
		max-width: 100%;
		padding: 28px;
	}

	.lt-image-text-slider__detail-title {
		font-size: 30px;
	}

	.lt-image-text-slider__detail-subtitle {
		font-size: 18px;
	}
}
