/**
 * Grid Background Animations - shared background host styles.
 */
.grid-bg-animation-host {
	position: relative;
}

.grid-bg-effect-host {
	position: relative;
	overflow: hidden;
}

.grid-bg-effect-host > .grid-bg-effect-layer,
.grid-bg-effect-host > .grid-bg-webgl-layer,
.grid-bg-effect-host > .grid-bg-shader-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
}

.grid-bg-effect-host > .grid-bg-effect-layer canvas,
.grid-bg-effect-host > .grid-bg-webgl-layer canvas,
.grid-bg-effect-host > .grid-bg-shader-layer canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.grid-bg-effect-host > .elementor-background-video-container,
.grid-bg-effect-host > .elementor-background-slideshow {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.grid-bg-effect-host > :not(.grid-bg-effect-layer):not(.grid-bg-webgl-layer):not(.grid-bg-shader-layer):not(.elementor-background-video-container):not(.elementor-background-slideshow) {
	position: relative;
	z-index: 2;
}

@media (max-width: 1024px) and (min-width: 768px) {
	.grid-bg-effect-host.grid-bg-effect-hide-tablet > .grid-bg-effect-layer,
	.grid-bg-effect-host.grid-bg-effect-hide-tablet > .grid-bg-webgl-layer,
	.grid-bg-effect-host.grid-bg-effect-hide-tablet > .grid-bg-shader-layer {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.grid-bg-effect-host.grid-bg-effect-hide-mobile > .grid-bg-effect-layer,
	.grid-bg-effect-host.grid-bg-effect-hide-mobile > .grid-bg-webgl-layer,
	.grid-bg-effect-host.grid-bg-effect-hide-mobile > .grid-bg-shader-layer {
		display: none !important;
	}
}

.grid-bg-animation-host > .grid-bg-dts-physics-bg {
	z-index: var(--grid-bg-animation-z-index, 1) !important;
	opacity: var(--grid-bg-animation-opacity, 1);
}

@media (max-width: 1024px) and (min-width: 768px) {
	.grid-bg-animation-hide-tablet > .grid-bg-dts-physics-bg {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.grid-bg-animation-hide-mobile > .grid-bg-dts-physics-bg {
		display: none !important;
	}
}


.grid-bg-effect-host > .grid-bg-shader-layer {
	z-index: var(--grid-bg-animation-z-index, 1);
	opacity: var(--grid-bg-animation-opacity, 1);
}

.grid-bg-effect-host > .grid-bg-shader-layer canvas {
	position: absolute;
	inset: 0;
}

/* Elementor editor containment: keep Grid background layers clipped while allowing Elementor edit handles/toolbars to render outside the container. */
body.elementor-editor-active .grid-bg-effect-host,
body.elementor-editor-preview .grid-bg-effect-host {
	overflow: visible;
}

body.elementor-editor-active .grid-bg-effect-host > .grid-bg-effect-layer,
body.elementor-editor-active .grid-bg-effect-host > .grid-bg-webgl-layer,
body.elementor-editor-active .grid-bg-effect-host > .grid-bg-shader-layer,
body.elementor-editor-preview .grid-bg-effect-host > .grid-bg-effect-layer,
body.elementor-editor-preview .grid-bg-effect-host > .grid-bg-webgl-layer,
body.elementor-editor-preview .grid-bg-effect-host > .grid-bg-shader-layer {
	overflow: hidden;
}
