/* Bridge between core block wrappers and the Elementor stylesheets.
 *
 * Every selector is wrapped in :where() so these rules carry no specificity at
 * all. They cancel the spacing core's layout support applies to the groups that
 * stand in for Elementor containers, and lose to every real rule in the
 * captured stylesheets.
 */

/* Core's flow-layout spacing is kept off these groups by removing the
   is-layout-flow class as they render (see kulc_strip_layout_classes), so the
   only thing left to undo is the group's own margin. Nothing here may touch
   the margins of the content inside — those are the design's. */
:where(.elementor .wp-block-group) { margin: 0; }

/* An Elementor image widget renders a bare <img>, and its per-element rules
   size that <img> directly. wp:image cannot exist without a <figure>, so the
   figure is made transparent to layout and the image sizes as it did before. */
.elementor .elementor-widget-image :where(figure.wp-block-image) { display: block; width: 100%; max-width: none; margin: 0; }
.elementor .elementor-widget-image :where(figure.wp-block-image > img) { width: auto; height: auto; }

/* Figures elsewhere (image boxes, carousels) keep Elementor's own spacing. */
:where(.elementor figure.wp-block-image) { margin: 0; }

/* Text-editor content that had no paragraph tag of its own in Elementor. */
.elementor-widget-text-editor > .elementor-widget-container > p.kulc-bare { margin: 0; }

/* The page wrapper is a block, not Elementor's own div. */
:where(.page-content > .elementor) { width: 100%; }

/* An Elementor Pro loop that matched nothing still reserved 30px above and
   below its empty message, and the page's rhythm includes that space. This is
   the one rule that mattered out of the 13 KB of loop-grid CSS. */
.elementor-widget-loop-grid .e-loop-nothing-found-message {
	color: #1f2124;
	padding-block: 30px;
	text-align: center;
}

/* Core puts a block gap between the top-level parts of a block template, which
   opened a 24px white band under the header — and another above the footer.
   The original site has the three regions flush against each other. */
.wp-site-blocks > * {
	margin-block-end: 0;
	margin-block-start: 0;
}
