.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;
}

.hvs-livid-builder-card {
	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 unmistakable and easy to edit inside Divi 4 and Divi 5. */
.et-fb-root-ancestor .et_pb_livid_background,
.et-fb-root-ancestor .hvs-livid-background-module-source,
body.et-fb .et_pb_livid_background,
body.et-fb .hvs-livid-background-module-source,
.hvs-livid-background-module-source--builder {
	position: relative;
	height: auto;
	min-height: 96px;
	margin: 10px 0 !important;
	padding: 0 !important;
	overflow: visible;
	border: 2px solid #2777e8;
	border-radius: 10px;
	background: #eff6ff;
	box-shadow: 0 5px 18px rgba(25, 76, 145, 0.16);
}

.et-fb-root-ancestor .hvs-livid-background-module-source,
body.et-fb .hvs-livid-background-module-source,
.hvs-livid-background-module-source--builder {
	height: auto;
	min-height: 92px;
}

.et-fb-root-ancestor .hvs-livid-builder-card,
body.et-fb .hvs-livid-builder-card,
.hvs-livid-background-module-source--builder .hvs-livid-builder-card {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 92px;
	box-sizing: border-box;
	padding: 16px 18px;
	color: #17375f;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.3;
}

.hvs-livid-builder-card__icon {
	position: relative;
	display: block;
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2777e8, #6d43d5);
	box-shadow: 0 4px 12px rgba(39, 119, 232, 0.3);
}

.hvs-livid-builder-card__icon::after {
	position: absolute;
	top: 50%;
	left: 52%;
	width: 0;
	height: 0;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 13px solid #fff;
	content: "";
	transform: translate(-50%, -50%);
}

.hvs-livid-builder-card__copy {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.hvs-livid-builder-card__copy strong {
	color: #16345b;
	font-size: 16px;
	font-weight: 750;
}

.hvs-livid-builder-card__copy small {
	display: block;
	color: #3c6592;
	font-size: 12px;
	font-weight: 650;
}

.hvs-livid-builder-card__video {
	overflow: hidden;
	max-width: 100%;
	color: #67819e !important;
	font-weight: 500 !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hvs-livid-builder-card__edit {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 13px;
	border-radius: 999px;
	background: #2777e8;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

@media (max-width: 600px) {
	.hvs-livid-builder-card__edit {
		display: none;
	}
}
