/**
 * CHCS Elementor - front-end reconciliation.
 *
 * The theme's sections are full-bleed: the coloured background spans the
 * viewport and an inner .container limits the text width. Elementor's own
 * container would inset that background, so CHCS widgets opt out of the
 * parent's horizontal padding and width limit.
 */

/* A flex container holding a CHCS section gives up its own boxing. */
.e-con:has(> .e-con-inner > .elementor-widget[data-widget_type^="chcs_"]),
.e-con:has(> .elementor-widget[data-widget_type^="chcs_"]),
.chcs-el-full {
	--width: 100%;
	--content-width: 100%;
	--padding-inline-start: 0px;
	--padding-inline-end: 0px;
	max-width: 100%;
}

.e-con > .e-con-inner:has(> .elementor-widget[data-widget_type^="chcs_"]) {
	--content-width: 100%;
	max-width: 100%;
	padding-inline: 0;
}

/* Classic section/column structure, which the migrator generates. */
.elementor-section:has(.elementor-widget[data-widget_type^="chcs_"]) > .elementor-container {
	max-width: 100%;
}

.elementor-section:has(.elementor-widget[data-widget_type^="chcs_"]) > .elementor-container > .elementor-column > .elementor-widget-wrap {
	padding: 0;
}

/* The widget wrapper must never add spacing around a section. */
.elementor-widget[data-widget_type^="chcs_"] > .elementor-widget-container {
	margin: 0;
	padding: 0;
}

.elementor-widget[data-widget_type^="chcs_"] {
	width: 100%;
}

/*
 * Fallback for browsers without :has() support. Add the class "chcs-el-full"
 * to the container in Elementor (Advanced > CSS Classes) to force it.
 */
@supports not selector(:has(*)) {
	.elementor-widget[data-widget_type^="chcs_"] {
		margin-inline: calc(-1 * var(--e-con-padding-inline, 0px));
	}
}

/* "Inner width: full" drops the theme container in favour of Elementor's. */
.chcs-bare {
	width: 100%;
}

/* Theme-builder parts render inline, adding no layout of their own. */
.chcs-el-part {
	display: contents;
}

/* Helpers for header and footer templates built from CHCS part widgets. */
.site-nav--vertical .footer-menu {
	display: flex;
	flex-direction: column;
}

.chcs-el-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	align-items: center;
}

.chcs-el-meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.chcs-el-featured img {
	display: block;
	width: 100%;
	height: auto;
}
