/**
 * Elementor Fixed bg Fixer
 *
 * The JS owns all geometry. This file only sets up the stacking context and the
 * two layer variants.
 *
 * @package Elementor_Fixed_Bg_Fixer
 */

/**
 * `isolation` creates a stacking context so the z-index:-1 layer paints above
 * the section's own background-color but below its content -- and unlike
 * transform/filter/contain it does NOT create a containing block, so the pinned
 * layer stays anchored to the viewport.
 */
.efbf-host {
	isolation: isolate;
}

/* Only added when the section computes to position:static. */
.efbf-host--relative {
	position: relative;
}

/* Retire the native fixed background; the layer replaces it. */
.efbf-host.efbf-active {
	background-image: none !important;
}

.efbf-layer {
	z-index: -1;
	pointer-events: none;
	background-color: transparent;
	background-repeat: no-repeat;
	background-origin: border-box;
	background-clip: border-box;
}

/* Pin mode: viewport sized, clipped to the section via clip-path. */
.efbf-layer--pin {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	/* Promote to its own compositor layer so scrolling stays smooth. */
	transform: translateZ(0);
	backface-visibility: hidden;
}

/**
 * Absolute mode: used for parallax, and as the automatic fallback when an
 * ancestor (transform, filter, will-change...) makes position:fixed resolve
 * against something other than the viewport.
 */
.efbf-layer--absolute {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	border-radius: inherit;
}

/* Elementor's own overlay sits at z-index 0, so it still paints above ours. */
.efbf-host > .elementor-background-overlay {
	z-index: 0;
}
