/* Product videos (includes/wellies-product-video.php). Colours follow wux.css. */

.wux-video {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #e9ece8;
}

.wux-video--gallery {
	aspect-ratio: 1 / 1;
}

.wux-video--feature {
	max-width: 1100px;
	margin: 0 auto 32px;
	border-radius: 12px;
}

@media (max-width: 549px) {
	.wux-video--feature {
		aspect-ratio: 1 / 1;
		margin-bottom: 24px;
		border-radius: 8px;
	}
}

.wux-video video,
.wux-video-poster,
.wux-video-poster img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.wux-video video {
	cursor: pointer;
}

.wux-video-poster {
	pointer-events: none;
	transition: opacity .3s ease;
}

.wux-video.has-played .wux-video-poster {
	opacity: 0;
}

.wux-video button {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	line-height: 1;
	text-transform: none;
	cursor: pointer;
	transition: opacity .2s ease, transform .2s ease;
}

.wux-video .wux-video-play {
	top: 50%;
	left: 50%;
	width: 72px;
	height: 72px;
	transform: translate(-50%, -50%);
	background: rgba(255, 255, 255, .94);
	color: var(--wux-green, #084325);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}

.wux-video .wux-video-play svg {
	width: 34px;
	height: 34px;
	margin-left: 4px;
}

.wux-video .wux-video-play:hover {
	transform: translate(-50%, -50%) scale(1.06);
}

.wux-video.is-auto .wux-video-play {
	opacity: 0;
	pointer-events: none;
}

.wux-video .wux-video-sound {
	right: 12px;
	bottom: 12px;
	width: 40px;
	height: 40px;
	background: rgba(5, 48, 26, .72);
	color: #fff;
}

.wux-video .wux-video-sound svg {
	width: 22px;
	height: 22px;
}

.wux-video:not(.has-played) .wux-video-sound {
	display: none;
}

.wux-video-sound[aria-pressed="false"] .wux-video-sound-on,
.wux-video-sound[aria-pressed="true"] .wux-video-sound-off {
	display: none;
}

.wux-video .wux-video-sound:focus-visible,
.wux-video .wux-video-play:focus-visible,
.wux-video-chip:focus-visible {
	outline: 3px solid var(--wux-gold, #f2c94c);
	outline-offset: 2px;
}

/* Gallery: "Watch video" chip on the main image (left: Flatsome's zoom button is bottom right),
   hidden while the video slide is showing. */
.wux-video-chip {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 0;
	margin: 0;
	padding: 8px 14px 8px 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
	color: var(--wux-green, #084325);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.wux-video-chip svg {
	width: 18px;
	height: 18px;
}

.product-images.is-video-selected .wux-video-chip,
.product-images.is-video-selected .image-tools.bottom {
	display: none;
}

.wux-video-thumb a {
	position: relative;
	display: block;
}

.wux-video-thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.wux-video-thumb-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44%;
	max-width: 34px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background: rgba(255, 255, 255, .92);
	color: var(--wux-green, #084325);
	pointer-events: none;
}

.wux-video-thumb-icon svg {
	width: 60%;
	height: 60%;
	margin-left: 8%;
}
