/**
 * DeL Vimeo Product Video for WooCommerce
 * v1.0.5
 */

.del-vimeo-media-target,
.del-vimeo-thumb-wrap {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
	isolation: isolate;
}

.del-vimeo-media-target > img,
.del-vimeo-media-target > picture,
.del-vimeo-media-target picture > img,
.del-vimeo-thumb-wrap > img,
.del-vimeo-thumb-wrap > picture,
.del-vimeo-thumb-wrap picture > img,
.del-vimeo-single-image-target img {
	display: block;
	width: 100%;
	height: auto;
}

/* The old snippets/themes may also style .del-play-overlay, so these values are intentionally strong. */
.del-play-overlay.del-vimeo-product-play {
	position: absolute !important;
	top: 50% !important;
	right: auto !important;
	bottom: auto !important;
	left: 50% !important;
	z-index: 60 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 58px !important;
	height: 58px !important;
	min-width: 58px !important;
	min-height: 58px !important;
	max-width: 58px !important;
	max-height: 58px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #f57921 !important;
	box-shadow: 0 10px 26px rgba(245, 121, 33, 0.34) !important;
	transform: translate(-50%, -50%) !important;
	cursor: pointer !important;
	text-decoration: none !important;
	line-height: 1 !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transition: background 180ms ease, box-shadow 180ms ease, opacity 180ms ease, transform 180ms ease !important;
	-webkit-tap-highlight-color: transparent;
}

.del-play-overlay.del-vimeo-product-play::before {
	content: "" !important;
	display: block !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 0 0 5px !important;
	padding: 0 !important;
	border-top: 12px solid transparent !important;
	border-bottom: 12px solid transparent !important;
	border-left: 18px solid #fff !important;
	background: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
}

.del-play-overlay.del-vimeo-product-play:hover,
.del-play-overlay.del-vimeo-product-play:focus-visible {
	background: #f57921 !important;
	box-shadow: 0 14px 32px rgba(245, 121, 33, 0.44) !important;
	outline: none !important;
}

.product.del-vimeo-player-open .del-play-overlay.del-vimeo-product-play,
.del-vimeo-player-open > .del-play-overlay.del-vimeo-product-play {
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ShopBuilder / RTSB course-grid support. The button is a link to the product page, not a video player. */
.rtsb-product-img.del-vimeo-rtsb-card-target {
	position: relative !important;
	overflow: hidden !important;
}

.rtsb-product-img.del-vimeo-rtsb-card-target img {
	display: block;
}

.del-play-overlay.del-vimeo-card-link-play {
	z-index: 65 !important;
}

.del-play-overlay.del-vimeo-card-link-play[href],
a.del-play-overlay.del-vimeo-card-link-play {
	color: transparent !important;
	text-decoration: none !important;
}

.del-play-overlay.del-vimeo-card-link-play:visited,
.del-play-overlay.del-vimeo-card-link-play:hover,
.del-play-overlay.del-vimeo-card-link-play:focus {
	color: transparent !important;
	text-decoration: none !important;
}

.del-vimeo-product-video-frame {
	position: absolute !important;
	inset: 0 !important;
	z-index: 80 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	background: #000 !important;
	line-height: 0 !important;
	overflow: hidden !important;
}

.del-vimeo-product-video-frame iframe {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	border: 0 !important;
	background: #000 !important;
}

.del-vimeo-product-video-close {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	z-index: 90 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: rgba(0, 0, 0, 0.55) !important;
	color: #fff !important;
	font-family: Arial, sans-serif !important;
	font-size: 24px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: none !important;
}

.del-vimeo-product-video-close:hover,
.del-vimeo-product-video-close:focus-visible {
	background: rgba(0, 0, 0, 0.82) !important;
	outline: none !important;
}

.del-vimeo-product-video-frame.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin-top: -17px;
	margin-left: -17px;
	border: 3px solid rgba(255, 255, 255, 0.32);
	border-top-color: #fff;
	border-radius: 999px;
	animation: del-vimeo-product-spin 800ms linear infinite;
}

@keyframes del-vimeo-product-spin {
	to {
		transform: rotate(360deg);
	}
}

/*
 * Migration guard: this plugin is replacing WPC Product Videos for Vimeo.
 * Hide all old WPCPV video triggers and old snippet overlays in WooCommerce product contexts.
 * Only .del-vimeo-product-play created from this product's own Vimeo embed field is allowed to display.
 */
body.woocommerce .wpcpv-item.wpcpv-item-video,
body.woocommerce-page .wpcpv-item.wpcpv-item-video,
body.single-product .wpcpv-item.wpcpv-item-video,
.product .wpcpv-item.wpcpv-item-video,
.woocommerce .product .del-play-overlay:not(.del-vimeo-product-play),
body.single-product .del-play-overlay:not(.del-vimeo-product-play) {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
}

/* Keep the old WPCPV lookup/search image icon hidden when it is not useful. */
body.single-product.del-hide-wpcpv-image-trigger .ct-product-gallery-container .wpcpv-item.wpcpv-item-image,
body.single-product.del-hide-wpcpv-image-trigger .woocommerce-product-gallery .wpcpv-item.wpcpv-item-image,
.product.del-hide-wpcpv-image-trigger .ct-product-gallery-container .wpcpv-item.wpcpv-item-image,
.product.del-hide-wpcpv-image-trigger .woocommerce-product-gallery .wpcpv-item.wpcpv-item-image {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: hidden !important;
}

body.single-product.del-hide-wpcpv-image-trigger .ct-product-gallery-container .wpcpv-item.wpcpv-item-image::before,
body.single-product.del-hide-wpcpv-image-trigger .woocommerce-product-gallery .wpcpv-item.wpcpv-item-image::before,
.product.del-hide-wpcpv-image-trigger .ct-product-gallery-container .wpcpv-item.wpcpv-item-image::before,
.product.del-hide-wpcpv-image-trigger .woocommerce-product-gallery .wpcpv-item.wpcpv-item-image::before {
	content: none !important;
	display: none !important;
	font-size: 0 !important;
	width: 0 !important;
	height: 0 !important;
	line-height: 0 !important;
}
