/* ------------------------------------------------------------------ *
 * Leaf corners — the Loddon house shape
 *
 * Top-left and bottom-right rounded, the other two square, echoing the
 * pathway motif. Used for four things only:
 *   1. Images       — Image and Featured Image widgets (automatic)
 *   2. Videos       — Video widgets, including their poster (automatic)
 *   3. Cards        — Call to Action widgets (automatic)
 *   4. Quote boxes  — containers with the class "loddon-leaf" (opt-in)
 *
 * Other boxes (icon boxes, info panels, stat tiles) keep their own corners.
 * Opt out of any element with the class "loddon-no-leaf".
 * Header, footer and popups are never touched, nor are SVGs (logos/icons).
 *
 * Specificity: Elementor's per-element radius rules reach (0,3,1) and loop
 * templates print their CSS later in the page, so selectors here repeat
 * a class to sit one step above rather than relying on source order.
 * ------------------------------------------------------------------ */

:root {
	--loddon-leaf: 30px;
	--loddon-leaf-shape: var(--loddon-leaf) 0;
}

/* 1. Images. */
.elementor :is(.elementor-widget-image, .elementor-widget-theme-post-featured-image):not(.loddon-no-leaf):not(:is([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *).elementor-widget img:not([src$=".svg"]) {
	border-radius: var(--loddon-leaf-shape);
}

/* 2. Videos (the widget clips the player and the poster overlay). */
.elementor .elementor-widget-video:not(.loddon-no-leaf):not(:is([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *).elementor-widget,
.elementor .elementor-widget-video:not(.loddon-no-leaf):not(:is([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *).elementor-widget > .elementor-widget-container {
	border-radius: var(--loddon-leaf-shape);
	overflow: hidden;
}

/* 3. Cards: Call to Action widgets. */
.elementor .elementor-widget-call-to-action:not(.loddon-no-leaf):not(:is([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *).elementor-widget,
.elementor .elementor-widget-call-to-action:not(.loddon-no-leaf):not(:is([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *).elementor-widget > .elementor-widget-container,
.elementor .elementor-widget-call-to-action:not(.loddon-no-leaf).elementor-widget .elementor-cta {
	border-radius: var(--loddon-leaf-shape);
}

/* 4. Quote boxes: opt-in containers. */
.elementor .e-con.loddon-leaf.loddon-leaf {
	--border-radius: var(--loddon-leaf-shape);
	border-radius: var(--loddon-leaf-shape);
	overflow: hidden;
}

/* An image inside a quote box follows the box's top-left corner only. */
.elementor .e-con.loddon-leaf.loddon-leaf :is(.elementor-widget-image, .elementor-widget-theme-post-featured-image).elementor-widget img:not([src$=".svg"]) {
	border-radius: var(--loddon-leaf) 0 0 0;
}
