/* ==========================================================================
 * Video Post Format — Modal & Play Overlay Styles.
 * ========================================================================== */

/* ---------------------------------------------------------------
 * MODAL
 * --------------------------------------------------------------- */

.kvc-video-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kvc-video-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	cursor: pointer;
}

.kvc-video-modal-content {
	position: relative;
	width: 90%;
	max-width: 900px;
	z-index: 1;
}

.kvc-video-modal-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
	padding: 0 8px;
	opacity: 0.8;
	transition: opacity 0.2s ease;
	z-index: 2;
}

.kvc-video-modal-close:hover,
.kvc-video-modal-close:focus {
	opacity: 1;
}

/* 16:9 aspect ratio wrapper. */
.kvc-video-modal-iframe-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	background: #000;
}

.kvc-video-modal-iframe-wrap iframe,
.kvc-video-modal-iframe-wrap video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------------------------------------------------------------
 * PLAY OVERLAY
 * --------------------------------------------------------------- */

.kvc-play-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: background 0.2s ease;
}

.kvc-play-overlay:hover {
	background: rgba(0, 0, 0, 0.15);
}

/* SVG play button. */
.kvc-play-overlay::before {
	content: '';
	display: block;
	width: 45px;
	height: 45px;
	background: url("data:image/svg+xml,%3Csvg width='45' height='45' viewBox='0 0 45 45' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath opacity='0.85' fill-rule='evenodd' clip-rule='evenodd' d='M22.5 0C34.9263 3.81396e-05 45 10.0737 45 22.5C45 34.9263 34.9263 45 22.5 45C10.0736 45 0 34.9264 0 22.5C4.43248e-05 10.0737 10.0737 0 22.5 0ZM15.7109 34.2588L36.0771 22.5L15.7109 10.7412V34.2588Z' fill='%23F5F2F1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kvc-play-overlay::after {
	content: none;
}

/* ---------------------------------------------------------------
 * THEME TEMPLATE — Video trigger elements.
 * --------------------------------------------------------------- */

.kvc-video-trigger {
	cursor: pointer;
}

/* Ensure the thumbnail wrapper has relative positioning for the overlay. */
.kvc-video-trigger .et_pb_post_main_image,
.kvc-video-trigger img {
	display: block;
	width: 100%;
}

/* ---------------------------------------------------------------
 * RESPONSIVE
 * --------------------------------------------------------------- */

@media screen and (max-width: 768px) {
	.kvc-video-modal-content {
		width: 95%;
	}

	.kvc-video-modal-close {
		top: -36px;
		right: -4px;
		font-size: 32px;
		padding: 4px 12px;
	}

	.kvc-play-overlay::before {
		width: 36px;
		height: 36px;
	}
}

