/**
 * Video lightbox + visible play button for *_new pages (Elementor-free).
 * Broken eicon / FA stack glyphs → pure CSS play control.
 */

.elementor-custom-embed-image-overlay,
[data-rbd-video],
.video-thumbnail.popup-youtube,
.popup-youtube.video-thumbnail {
	cursor: pointer;
	position: relative;
}

/* Lightbox video posters */
.elementor-widget-video .elementor-open-lightbox .elementor-custom-embed-image-overlay,
.elementor-custom-embed-image-overlay {
	position: relative;
	display: block;
	overflow: hidden;
}

.elementor-widget-video .elementor-open-lightbox .elementor-custom-embed-image-overlay img,
.elementor-custom-embed-image-overlay > img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

/* —— Shared CSS play control —— */
.rbd-video-play,
.elementor-custom-embed-image-overlay > .elementor-custom-embed-play,
.elementor-widget-video .elementor-custom-embed-play {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: auto !important;
	height: auto !important;
	transform: none !important;
	-webkit-transform: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 100;
	margin: 0 !important;
	padding: 0 !important;
	background: rgba(8, 67, 76, 0.14);
	transition: background 0.2s ease;
}

.elementor-custom-embed-image-overlay:hover > .elementor-custom-embed-play,
[data-rbd-video]:hover > .elementor-custom-embed-play,
.video-thumbnail:hover > .rbd-video-play,
.popup-youtube:hover > .rbd-video-play {
	background: rgba(8, 67, 76, 0.28);
}

/* Hide broken icon fonts (eicon / FA stack squares) */
.elementor-custom-embed-play i,
.elementor-custom-embed-play .eicon-play,
.video-thumbnail .item-icon-wrap,
.video-thumbnail .item-icon-wrap i,
.popup-youtube .item-icon-wrap {
	display: none !important;
	font-size: 0 !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	visibility: hidden !important;
}

/* Teal circle */
.rbd-video-play::before,
.elementor-custom-embed-image-overlay > .elementor-custom-embed-play::before,
.elementor-widget-video .elementor-custom-embed-play::before {
	content: "" !important;
	display: block;
	width: 70px;
	height: 70px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: rgba(0, 152, 178, 0.95);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
	border: 3px solid rgba(255, 255, 255, 0.95);
	box-sizing: border-box;
	transition: transform 0.2s ease, background 0.2s ease;
	font-size: 0 !important;
}

/* White triangle */
.rbd-video-play::after,
.elementor-custom-embed-image-overlay > .elementor-custom-embed-play::after,
.elementor-widget-video .elementor-custom-embed-play::after {
	content: "" !important;
	position: absolute;
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #ffffff;
	margin-left: 5px;
	font-size: 0 !important;
}

.elementor-custom-embed-image-overlay:hover > .elementor-custom-embed-play::before,
[data-rbd-video]:hover > .elementor-custom-embed-play::before,
.video-thumbnail:hover > .rbd-video-play::before,
.popup-youtube:hover > .rbd-video-play::before {
	background: #007f96;
	transform: scale(1.06);
}

/* Home-style overlays where the image itself is the play button graphic */
.elementor-custom-embed-image-overlay:has(img[src*="Play-Button"]) .elementor-custom-embed-play,
.elementor-custom-embed-image-overlay:has(img[src*="play-button"]) .elementor-custom-embed-play,
.elementor-custom-embed-image-overlay:has(img[alt*="Play button"]) .elementor-custom-embed-play,
.elementor-custom-embed-image-overlay.rbd-play-image .elementor-custom-embed-play,
.elementor-custom-embed-image-overlay:has(img[src*="Play-Button"]) .rbd-video-play,
.elementor-custom-embed-image-overlay.rbd-play-image .rbd-video-play {
	display: none !important;
}

.elementor-custom-embed-image-overlay:has(img[src*="Play-Button"]),
.elementor-custom-embed-image-overlay:has(img[src*="play-button"]),
.elementor-custom-embed-image-overlay.rbd-play-image {
	background: transparent !important;
}

.elementor-custom-embed-image-overlay:has(img[src*="Play-Button"]) > img,
.elementor-custom-embed-image-overlay:has(img[src*="play-button"]) > img,
.elementor-custom-embed-image-overlay.rbd-play-image > img {
	width: auto;
	max-width: 150px;
	margin: 0 auto;
}

/* Keep ProWidgets dark hover veil under our play button */
.video-thumbnail.popup-youtube {
	overflow: hidden;
}

/* Inline / background-style 16:9 wrappers (non-lightbox) */
.elementor-aspect-ratio-169 .elementor-wrapper:not(.elementor-open-lightbox) {
	position: relative;
	height: 0;
	padding-bottom: 56.25%;
}

.rbd-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99999;
}

.rbd-modal.is-open {
	display: flex;
}

.rbd-modal__inner {
	position: relative;
	width: min(960px, 100%);
}

.rbd-modal__frame {
	position: relative;
	height: 0;
	padding-bottom: 56.25%;
}

.rbd-modal__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.rbd-modal__close {
	position: absolute;
	top: -42px;
	right: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 767px) {
	.rbd-video-play::before,
	.elementor-custom-embed-play::before {
		width: 58px;
		height: 58px;
	}

	.rbd-video-play::after,
	.elementor-custom-embed-play::after {
		border-width: 9px 0 9px 15px;
	}
}
