/* Avada YouTube element — "Open in Modal Overlay" option.
   Styles the in-place preview poster and the modal overlay. */

/* --- Preview poster (replaces the inline player when modal mode is on) --- */
.awb-yt-modal .awb-yt-modal-trigger {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	padding: 0;
	border: 0;
	background: #000;
	line-height: 0;
	overflow: hidden;
	cursor: pointer;
}

.awb-yt-modal .awb-yt-modal-thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.awb-yt-modal .awb-yt-modal-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.7);
	border-radius: 12px;
	transition: background 0.2s ease;
}

.awb-yt-modal .awb-yt-modal-play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-40%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 19px;
	border-color: transparent transparent transparent #fff;
}

.awb-yt-modal .awb-yt-modal-trigger:hover .awb-yt-modal-play,
.awb-yt-modal .awb-yt-modal-trigger:focus-visible .awb-yt-modal-play {
	background: #f00;
}

/* --- Modal overlay --- */
.awb-yt-modal-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 5vmin;
	background: rgba(0, 0, 0, 0.85);
}

.awb-yt-modal-overlay.is-open {
	display: flex;
}

.awb-yt-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 1100px;
}

.awb-yt-modal-frame {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
}

.awb-yt-modal-frame iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.awb-yt-modal-close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	font-size: 30px;
	line-height: 40px;
	color: #fff;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.awb-yt-modal-close:hover,
.awb-yt-modal-close:focus-visible {
	opacity: 0.7;
}

body.awb-yt-modal-open {
	overflow: hidden;
}
