/* Foxlight Product Video - front-end styling. */

/* ----- Video slide (main stage) ----- */

.foxlight-pv-slide {
	position: relative;
}

.foxlight-pv-trigger {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	line-height: 0;
	cursor: pointer;
}

.foxlight-pv-poster {
	display: block;
	width: 100%;
	height: auto;
}

.foxlight-pv-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.foxlight-pv-play-icon {
	width: 72px;
	height: 72px;
	filter: drop-shadow( 0 2px 6px rgba( 0, 0, 0, 0.4 ) );
	transition: transform 0.15s ease;
}

.foxlight-pv-play-icon circle {
	fill: rgba( 0, 0, 0, 0.55 );
}

.foxlight-pv-play-icon path {
	fill: #fff;
}

.foxlight-pv-trigger:hover .foxlight-pv-play-icon,
.foxlight-pv-trigger:focus-visible .foxlight-pv-play-icon {
	transform: scale( 1.08 );
}

/* Neutralise any theme/browser border, outline or shadow on the poster
   button for mouse hover and click-focus (scoped to beat theme rules). */
.woocommerce-product-gallery__image .foxlight-pv-trigger,
.woocommerce-product-gallery__image .foxlight-pv-trigger:hover,
.woocommerce-product-gallery__image .foxlight-pv-trigger:focus {
	border: 0;
	box-shadow: none;
	outline: none;
}

.foxlight-pv-poster {
	border: 0;
}

/* Keep a visible focus ring for keyboard users only. */
.woocommerce-product-gallery__image .foxlight-pv-trigger:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

/* ----- Play badge on the nav thumbnail ----- */

.flex-control-thumbs li.foxlight-pv-thumb {
	position: relative;
}

.flex-control-thumbs li.foxlight-pv-thumb::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 26px;
	transform: translate( -50%, -50% );
	background: rgba( 0, 0, 0, 0.55 );
	border-radius: 50%;
	pointer-events: none;
}

.flex-control-thumbs li.foxlight-pv-thumb::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -35%, -50% );
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent #fff;
	pointer-events: none;
}

/* ----- Fullscreen modal ----- */

body.foxlight-pv-modal-open {
	overflow: hidden;
}

.foxlight-pv-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.foxlight-pv-modal[hidden] {
	display: none;
}

.foxlight-pv-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.85 );
}

.foxlight-pv-modal__dialog {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min( 92vw, 1200px );
	height: min( 88vh, 100% );
}

.foxlight-pv-modal__video {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	background: #000;
}

.foxlight-pv-modal__close {
	position: fixed;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.foxlight-pv-modal__close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}
