/**
 * Elementor <-> theme reconciliation.
 *
 * Elementor pages sit inside the theme shell (header.php / footer.php) but
 * manage their own width and spacing. These rules stop the theme's article
 * chrome from constraining them, and make Elementor's defaults inherit the
 * theme's type and colour system so a page built in the editor still looks
 * like the rest of the site.
 */

/* --- Width ------------------------------------------------------------- */

/*
 * Elementor reads its container width from the Global Kit, which we sync from
 * the Customizer. This keeps flex containers aligned to the same rail even
 * before the Kit stylesheet loads.
 */
.ei-elementor-page .e-con {
	--container-max-width: var(--ei-container, 1560px);
}

/* An Elementor page supplies its own sections — drop the article wrapper. */
.ei-elementor-page .ei-page-content-section {
	padding-block: 0;
}

.ei-elementor-wrap {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.ei-entry--elementor,
.ei-entry--elementor .ei-entry__content {
	max-width: none;
	margin: 0;
	padding: 0;
}

.ei-entry--elementor .ei-entry__content > .elementor {
	margin-block: 0;
}

/* --- Inherited typography ---------------------------------------------- */

.elementor-widget-heading .elementor-heading-title {
	color: var(--ei-primary);
	font-family: var(--ei-heading-font);
}

.elementor-widget-text-editor,
.elementor-widget-text-editor p {
	color: var(--ei-text);
	font-family: var(--ei-body-font);
	line-height: var(--ei-line-height);
}

.elementor-widget-text-editor a {
	color: var(--ei-link);
}

.elementor-widget-text-editor a:hover {
	color: var(--ei-link-hover);
}

/* --- Buttons ------------------------------------------------------------ */

/*
 * Match the theme's gold gradient button so an Elementor button dropped on a
 * page does not read as a different design system.
 */
.elementor-button:not(.elementor-button-link) {
	border-radius: calc(var(--ei-radius) - 2px);
	font-family: var(--ei-ui-font);
	letter-spacing: 0.04em;
}

.elementor-widget-button .elementor-button {
	background: linear-gradient(180deg, #f2d175, var(--ei-primary) 58%, #9d6e23);
	color: #1a1206;
	box-shadow: 0 0 var(--ei-shadow-strength) rgba(216, 167, 67, 0.28);
}

.elementor-widget-button .elementor-button:hover,
.elementor-widget-button .elementor-button:focus-visible {
	color: #1a1206;
	filter: brightness(1.06);
}

/* --- Editor-only ------------------------------------------------------- */

/*
 * Inside the editor iframe the theme's reveal-on-scroll animation would leave
 * blocks invisible, because the IntersectionObserver never fires there.
 */
.elementor-editor-active .ei-reveal {
	opacity: 1;
	transform: none;
}
