/* MihanWP WooCommerce Product Video – frontend */

/* Gallery slide */
.woocommerce-product-gallery .mwpv-slide a.mwpv-open {
	position: relative;
	display: block;
	cursor: pointer;
}

.woocommerce-product-gallery .mwpv-slide .mwpv-poster,
.woocommerce-product-gallery .mwpv-slide .mwpv-preview {
	display: block;
	width: 100%;
	height: auto;
}

.woocommerce-product-gallery .mwpv-slide .mwpv-preview {
	object-fit: cover;
	background: #000;
	pointer-events: none;
}

/* A zoom layer must never cover the video slide. */
.woocommerce-product-gallery .mwpv-slide .zoomImg {
	display: none !important;
}

.mwpv-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 68px;
	margin: -34px 0 0 -34px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, background-color 0.15s ease;
	pointer-events: none;
}

.mwpv-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -12px 0 0 -7px;
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}

.mwpv-open:hover .mwpv-play,
.mwpv-open:focus-visible .mwpv-play {
	transform: scale(1.08);
	background: rgba(0, 0, 0, 0.8);
}

.mwpv-open:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

/* Thumbnail */
.woocommerce-product-gallery .flex-control-thumbs li.mwpv-thumb {
	position: relative;
}

.woocommerce-product-gallery .flex-control-thumbs li.mwpv-thumb .mwpv-thumb__placeholder {
	opacity: 0 !important;
}

.woocommerce-product-gallery .flex-control-thumbs li.mwpv-thumb .mwpv-thumb__preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.5;
	pointer-events: none;
}

.woocommerce-product-gallery .flex-control-thumbs li.mwpv-thumb::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -6px 0 0 -4px;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
	pointer-events: none;
}

/* PhotoSwipe slide */
.mwpv-pswp {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 56px 16px 64px;
}

/* Keep PhotoSwipe's arrows off the video on larger screens. */
@media (min-width: 768px) {
	.mwpv-pswp {
		padding-left: 72px;
		padding-right: 72px;
	}
}

.mwpv-pswp video {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	background: #000;
	outline: none;
}

/* Fallback lightbox */
html.mwpv-modal-open {
	overflow: hidden;
}

.mwpv-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 16px;
	background: rgba(0, 0, 0, 0.94);
}

.mwpv-modal__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.mwpv-modal__video {
	display: block;
	max-width: 100%;
	max-height: 100%;
	background: #000;
}

.mwpv-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 32px;
	line-height: 44px;
	cursor: pointer;
}

.mwpv-modal__close:hover,
.mwpv-modal__close:focus-visible {
	background: rgba(255, 255, 255, 0.15);
}

.rtl .mwpv-modal__close {
	right: auto;
	left: 8px;
}
