/**
 * Custom per-block styles for [Ualett] Left Info Slider.
 *
 * The right-hand image slider is a Swiper (`slidesPerView: 'auto'`): each slide
 * is a fixed-ratio portrait card and the viewport clips everything past its
 * right edge, so partial slides are cropped by the bounding box at every snap —
 * including the end. The square pagination dots render below the slider.
 *
 * Swiper's structural CSS is hand-written below (scoped to this block) rather
 * than pulled via `@import 'swiper/css'`: in this block's build the import was
 * routed into the editor-only `index.css` instead of the frontend
 * `style-index.css`, leaving the frontend wrapper without `display:flex` so the
 * slides stacked vertically. These few rules are all `slidesPerView:'auto'`
 * needs (Swiper itself sets the inline transforms + per-slide margins).
 */

/* Horizontal spacing: a LEFT offset only (the slider bleeds to the right
   viewport edge). Applied to the inner row, NOT the section: the theme zeroes a
   full-bleed section's own padding (`.entry-content > .alignfull { px-0 }`,
   which outranks a single block-class selector), so the left offset lives here
   instead. 16px on mobile; from lg it's 150px (the design) and on screens wider
   than the 1440 frame it keeps growing — `max(150px, …)` adds half the overflow
   past 1440 — so the left text stays where a centered 1440 container would put
   it instead of drifting toward the edge on big monitors. No right padding, so
   slides clip at the true right edge. */
.ualett-left-info-slider__row {
	padding-left: 16px;
}

@media ( min-width: 1024px ) {
	.ualett-left-info-slider__row {
		padding-left: max( 150px, calc( ( 100vw - 1440px ) / 2 + 150px ) );
	}
}

/* The viewport clips slides that overflow its right edge — partial slides are
   cropped by the bounding box at every snap, including the end. */
.ualett-left-info-slider__swiper {
	position: relative;
	width: 100%;
	overflow: hidden;
	z-index: 1;
}

/* Swiper structural layout (the bit that makes it a slider, not a stack). */
.ualett-left-info-slider__track {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	box-sizing: content-box;
	transition-property: transform;
}

.ualett-left-info-slider__slide.swiper-slide {
	flex-shrink: 0;
}

/* Portrait cards: 400 × 500 on desktop (the design), shrinking responsively.
   `slidesPerView: 'auto'` reads this width to lay slides out + size the gap. */
.ualett-left-info-slider__slide {
	width: clamp( 240px, 72vw, 400px );
	aspect-ratio: 400 / 500;
	height: auto;
	overflow: hidden;
	border-radius: 12px;
}

.ualett-left-info-slider__slide img {
	display: block;
	width: 100%;
	height: 100%;
	-o-object-fit: cover;
	   object-fit: cover;
}

/* Pagination sits below the slides (not overlaid), 40px under them (the design:
   dots at 540 with images 500 tall on desktop, 434 vs 394 on mobile). The dots
   are 8px white squares, 4px apart (12px pitch); inactive drop to 20% opacity. */
.ualett-left-info-slider__pagination {
	position: static;
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-top: 40px;
}

.ualett-left-info-slider__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0;
	border-radius: 0;
	background: #ffffff;
	opacity: 0.2;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ualett-left-info-slider__pagination .swiper-pagination-bullet-active {
	opacity: 1;
}

/*
 * Entrance hide-before-paint, in CSS (head) rather than JS, to kill the flash:
 * view.js bundles Swiper + Motion and only runs on DOMContentLoaded, so hiding
 * there leaves the content painted-then-hidden (a visible flash before the
 * staggered fade). Hiding here applies before first paint. Gated to
 * `no-preference` so reduced-motion users see it immediately, and the
 * <noscript> in render.php reveals it when JS is off.
 */
@media ( prefers-reduced-motion: no-preference ) {
	.ualett-left-info-slider__title,
	.ualett-left-info-slider__desc,
	.ualett-left-info-slider__slider-col {
		opacity: 0;
	}
}

/* The body renders as stacked paragraphs split on blank lines in render.php. */
.ualett-left-info-slider__desc p {
	margin: 0;
}

.ualett-left-info-slider__desc p + p {
	margin-top: 24px;
}

