.livid-video-embed,
.hvs-livid-dvg-player,
.hvs-livid-mfp-player,
.hvs-livid-fallback-lightbox__content {
	background: #000;
}

.hvs-livid-dvg-player,
.hvs-livid-mfp-player,
.hvs-livid-fallback-lightbox__content {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.hvs-livid-dvg-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Livid URLs converted from Divi's native Video and Video Slider modules. */
.hvs-livid-divi-native-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.hvs-livid-mfp-player {
	width: min(1100px, calc(100vw - 40px));
	margin: 40px auto;
}

.hvs-livid-mfp-player .mfp-close {
	color: #fff;
}

.hvs-livid-fallback-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.88);
}

.hvs-livid-fallback-lightbox__content {
	width: min(1100px, 100%);
}

.hvs-livid-fallback-lightbox__close {
	position: absolute;
	top: -42px;
	right: 0;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font: 36px/40px Arial, sans-serif;
	cursor: pointer;
}

/* Divi section, row, column, and module video backgrounds. */
.hvs-livid-divi-background {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.hvs-livid-divi-background__iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: none;
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* Keep Divi's unsupported HTML5 player in the builder DOM, but never show it. */
.hvs-livid-native-background-replaced > :not(.hvs-livid-divi-background__iframe),
.hvs-livid-native-background-replaced video,
.hvs-livid-native-background-replaced .mejs-container,
.hvs-livid-native-background-replaced .wp-video {
	display: none !important;
}

/* A Divi wrapper using the CSS ID fallback owns its iframe directly. */
.hvs-livid-divi-background-target {
	position: relative;
	overflow: hidden;
}

.hvs-livid-divi-background-target > .hvs-livid-divi-background__iframe {
	z-index: 0;
}

.hvs-livid-divi-background-target > :not(.hvs-livid-divi-background__iframe) {
	position: relative;
	z-index: 1;
}

/* The custom Divi module is a configuration marker, not page content. */
.et_pb_livid_background,
.hvs-livid-background-module-source {
	height: 0;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible;
}

.hvs-livid-background-module-source > span {
	display: none;
}

/* Hero and slider content stays above the chromeless background player. */
.hvs-livid-hero-target,
.hvs-livid-slide-target {
	position: relative;
	overflow: hidden;
}

.hvs-livid-hero-target > .et_pb_row,
.hvs-livid-hero-target > .et_pb_fullwidth_header,
.hvs-livid-slide-target > .et_pb_container,
.et_pb_slide > .et_pb_container {
	position: relative;
	z-index: 1;
}

/* The Module choice gives the controller module a useful visible canvas. */
.et_pb_livid_background.hvs-livid-module-self-target,
.hvs-livid-background-module-source.hvs-livid-module-self-target {
	position: relative;
	height: auto;
	min-height: 300px;
	overflow: hidden;
}

/* Keep the module easy to find and edit inside Divi's Visual Builder. */
.et-fb-root-ancestor .et_pb_livid_background {
	height: auto;
	min-height: 54px;
	padding: 12px !important;
	border: 1px dashed #2b87da;
	border-radius: 6px;
	background: rgba(43, 135, 218, 0.12);
}

.et-fb-root-ancestor .hvs-livid-background-module-source {
	height: auto;
	min-height: 28px;
}

.et-fb-root-ancestor .hvs-livid-background-module-source > span {
	display: block;
	color: #135f9f;
	font-weight: 600;
	text-align: center;
}
