/* WideoShop — Gallery Video slide (Phase 2: static poster + play icon;
   actual playback behaviour comes in Phase 3). Scoped entirely under
   .wds-gallery-video-slide so it can't affect WooCommerce's own
   gallery slides. */

.wds-gallery-video-slide {
	position: relative;
}

.wds-gallery-video-slide .wds-gallery-video-link {
	display: block;
	position: relative;
}

.wds-gallery-video-slide .wds-gallery-video-poster {
	width: 100%;
	height: auto;
	display: block;
}

.wds-gallery-video-slide .wds-gallery-video-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.wds-gallery-video-slide .wds-gallery-video-play-icon::before {
	content: '';
	display: block;
	width: 0;
	height: 0;
	border-top: 14px solid transparent;
	border-bottom: 14px solid transparent;
	border-left: 22px solid #fff;
	margin-left: 4px;
}

.wds-gallery-video-slide .wds-gallery-video-el {
	display: none;
	width: 100%;
}

/* Phase 3 — self-contained lightbox used only for "Lightbox" display
   mode (kept separate from the shortcode widget's own reel-style
   lightbox in frontend.css, since this is a single static video, not a
   swipeable multi-video reel). */
.wds-gv-lightbox-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.85 );
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.wds-gv-lightbox-overlay.is-open {
	display: flex;
}

body.wds-gv-lightbox-lock {
	overflow: hidden;
}

.wds-gv-lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
}

.wds-gv-lightbox-video {
	max-width: 90vw;
	max-height: 90vh;
	display: block;
	background: #000;
}

.wds-gv-lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.15 );
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wds-gv-lightbox-close:hover {
	background: rgba( 255, 255, 255, 0.3 );
}

/* Phase 4 — mobile: close button sitting above the video (as on desktop)
   can end up off-screen/clipped on short viewports, so it moves inside
   the video's own top-right corner instead. */
@media ( max-width: 600px ) {
	.wds-gv-lightbox-overlay {
		padding: 12px;
	}

	.wds-gv-lightbox-close {
		top: 8px;
		right: 8px;
		background: rgba( 0, 0, 0, 0.55 );
		z-index: 1;
	}
}
