/* Host element (the Divi section/row/module that has data-vimeo-id) */
.dvbg-host {
	position: relative;
	overflow: hidden;
}

/* Video layer sits at the very back */
.dvbg-wrap {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none; /* let clicks pass through to Divi content */
	background-size: cover;
	background-position: center;
}

/* JS sizes the iframe to always cover; these are the base rules */
.dvbg-wrap iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 0;
	pointer-events: none;
}

/* Poster fallback (mobile / reduced-motion / pre-load facade) */
.dvbg-poster {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Optional color overlay above the video, below the content */
.dvbg-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* Push Divi's actual content above video + overlay */
.dvbg-host > .et_pb_row,
.dvbg-host > .et_pb_row_inner,
.dvbg-host > .et_pb_column,
.dvbg-host > .et_pb_module,
.dvbg-host > .et_pb_with_border {
	position: relative;
	z-index: 2;
}

/* Fade the iframe in once it's ready to avoid a flash */
.dvbg-wrap iframe {
	opacity: 0;
	transition: opacity 0.5s ease;
}
.dvbg-host.is-playing .dvbg-wrap iframe {
	opacity: 1;
}
