/* Structural only — visuals are controlled via Elementor widget controls. */

/*
 * Allow the carousel and its immediate wrappers to shrink inside flex/grid
 * parents. Without min-width:0, the inline slide widths Swiper sets (for
 * slidesPerView × N) inflate min-content, forcing the parent column to grow.
 */
.elementor-widget-adhd-featured-carousel,
.elementor-widget-adhd-featured-carousel > .elementor-widget-container {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.adhd-efi-carousel {
	position: relative;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.adhd-efi-carousel .swiper-slide { display: block; }
.adhd-efi-carousel .swiper-slide img { display: block; max-width: 100%; }
.adhd-efi-carousel .swiper-slide a { display: block; }

/*
 * Loop Grid fix.
 *
 * The CSS Grid cell (.e-loop-item) defaults to min-width:auto, which respects
 * descendant min-content. If our carousel is inside the cell, its inflated
 * slide widths propagate up and force the column to grow to ~1933px+ per cell.
 *
 * Below we explicitly collapse min-width on the whole chain between the grid
 * cell and our widget, but ONLY for cells that actually contain the carousel
 * (via :has()), so other widgets in the loop template are unaffected.
 *
 * :has() is supported in Chrome 105+, Safari 15.4+, Firefox 121+.
 */
.elementor-loop-container > .e-loop-item:has(.elementor-widget-adhd-featured-carousel),
.elementor-loop-container > .e-loop-item:has(.elementor-widget-adhd-featured-carousel) .e-con,
.elementor-loop-container > .e-loop-item:has(.elementor-widget-adhd-featured-carousel) .e-con-inner {
	min-width: 0;
	max-width: 100%;
}
