/**
 * Corrections for pages built in Elementor.
 *
 * Loaded only when the plugin is active, after main.css. Everything here
 * exists because the builder wraps a widget in markup the templates lack.
 */

/* The section widgets are full-bleed and set their own grounds, so the
   container around them must not pad, centre or constrain them. */
.bf-section-widget {
	width: 100%;
	max-width: none;
}

.elementor-widget-wrap > .elementor-element.bf-section-widget,
.e-con > .bf-section-widget,
.e-con-inner > .bf-section-widget {
	padding: 0;
	margin: 0;
}

.bf-elementor .e-con,
.bf-elementor .e-con-inner {
	--container-max-width: 100%;
}

/* Elementor ships `.elementor img { height: auto }` at one class of
   specificity, which ties with a single-class rule here and wins on source
   order. Every cover image would collapse to its intrinsic ratio, so they are
   restored at a specificity the reset cannot match. */
.elementor .bf-hero__media img,
.elementor .bf-pagehead__media img,
.elementor .bf-service__media img,
.elementor .bf-hero__card-img img {
	height: 100%;
	object-fit: cover;
}

/* The hero's lines carry their own spacing. */
.bf-section-widget .bf-hero__eyebrow,
.bf-section-widget .bf-hero__place { margin: 0; }
.bf-section-widget .bf-hero__text { margin: 26px 0 0; }

/* The other direction: images that keep a set ratio rather than fill a box. */
.elementor .bf-room__thumb img,
.elementor .bf-offer__thumb img,
.elementor .bf-post__thumb img,
.elementor .bf-about__shot img,
.elementor .bf-facility__media img,
.elementor .bf-price__thumb img,
.elementor .bf-member__thumb img,
.elementor .bf-footer__gallery img {
	height: auto;
	object-fit: cover;
}

/* Elementor's paragraph and list resets would strip the sections' rhythm. */
.bf-section-widget p { margin-block: 0 1em; }
.bf-section-widget p:last-child { margin-bottom: 0; }

/* Inside the editor the widget gains an extra positioned wrapper; absolute
   media must measure against the section, not escape. */
.elementor-element.bf-section-widget > .elementor-widget-container { position: relative; }

.elementor-editor-active .bf-section-widget { outline: none; }

/* Nothing fades in the builder: the editor scrolls the iframe itself and
   re-renders widgets on every edit, so an observer set up at load never sees
   them and they would sit at opacity 0 — a blank canvas. `bf-editing` is the
   theme's own class on the previewed page; scoped to body so it wins on
   specificity, not source order. */
body.bf-editing .bf-reveal {
	opacity: 1;
	transform: none;
	transition: none;
}

body.bf-editing .bf-hero__slide * {
	opacity: 1;
	transform: none;
}
