/* Require actual sibling slides: a wrapper may still be receiving its markup. */
.tib-loop-carousel-initial-layout > .swiper:not(.swiper-initialized) > .swiper-wrapper:has(> .swiper-slide ~ .swiper-slide) > .swiper-slide,
.tib-loop-carousel-initial-layout > .elementor-widget-container > .swiper:not(.swiper-initialized) > .swiper-wrapper:has(> .swiper-slide ~ .swiper-slide) > .swiper-slide {
	--number-of-gaps: max(calc(var(--swiper-slides-to-display, 1) - 1), 0);
	/* An absent native gap variable leaves the flex gap at zero. */
	--gaps-width-total: calc(var(--number-of-gaps) * var(--swiper-slides-gap, 0px));
	max-width: calc((100% - var(--gaps-width-total)) / var(--swiper-slides-to-display, 1));
}

/* Reserve the same logical-side offset padding that the native handler adds. */
.tib-loop-carousel-initial-layout:is([data-tib-carousel-offset="left"], [data-tib-carousel-offset="both"]) > .swiper:not(.swiper-initialized):has(> .swiper-wrapper > .swiper-slide ~ .swiper-slide),
.tib-loop-carousel-initial-layout:is([data-tib-carousel-offset="left"], [data-tib-carousel-offset="both"]) > .elementor-widget-container > .swiper:not(.swiper-initialized):has(> .swiper-wrapper > .swiper-slide ~ .swiper-slide) {
	padding-inline-start: var(--swiper-offset-size, 0px);
}

.tib-loop-carousel-initial-layout:is([data-tib-carousel-offset="right"], [data-tib-carousel-offset="both"]) > .swiper:not(.swiper-initialized):has(> .swiper-wrapper > .swiper-slide ~ .swiper-slide),
.tib-loop-carousel-initial-layout:is([data-tib-carousel-offset="right"], [data-tib-carousel-offset="both"]) > .elementor-widget-container > .swiper:not(.swiper-initialized):has(> .swiper-wrapper > .swiper-slide ~ .swiper-slide) {
	padding-inline-end: var(--swiper-offset-size, 0px);
}

/* The native swiper clips the preview at its outer edge, not its content box.
 * Keep the flex wrapper's automatic minimum from expanding when unclipped. */
.tib-loop-carousel-initial-layout[data-tib-carousel-offset] > .swiper:not(.swiper-initialized) > .swiper-wrapper:has(> .swiper-slide ~ .swiper-slide),
.tib-loop-carousel-initial-layout[data-tib-carousel-offset] > .elementor-widget-container > .swiper:not(.swiper-initialized) > .swiper-wrapper:has(> .swiper-slide ~ .swiper-slide) {
	overflow: visible;
	min-width: 0;
}
