/*
 * RahkarTheme — product video (facade overlay inside the gallery).
 *
 * Loaded only on product pages that have a video. The ▶ badge sits over the
 * gallery viewport; clicking it (assets/js/product-video.js) reveals the
 * .rh-gallery__video layer and builds the real <video>/<iframe> on the spot —
 * nothing of the video loads before that click.
 *
 * No layout shift: the badge/layer are absolutely positioned inside the
 * existing gallery viewport, which already reserves its (square) box.
 *
 * Black media chrome (#000) is intentional letterboxing for the player, not a
 * UI surface — everything else uses theme.json tokens. The theme has no
 * global border-box, so padded/bordered boxes set box-sizing explicitly.
 */

/* The ▶ trigger now lives in the gallery action stack (.rh-gallery__action--
 * video, styled in product-share.css): top-right on desktop, bottom-left on
 * mobile. This file only owns the reveal layer + the video thumbnail mark. */

/* ── The reveal layer ──────────────────────────────────────────────── */
.rh-gallery__video {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}
.rh-gallery__video[hidden] {
	display: none;
}
.rh-gallery__video video,
.rh-gallery__video iframe {
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: contain;
}
.rh-gallery__video-close {
	box-sizing: border-box;
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	z-index: 6;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: var(--wp--custom--radius--pill, 9999px);
	background: rgba( 0, 0, 0, 0.55 );
	color: #fff;
	cursor: pointer;
}
.rh-gallery__video-close svg {
	width: 20px;
	height: 20px;
}

/* ── Video thumbnail (desktop strip) ───────────────────────────────── */
.rh-gallery__thumb--video {
	position: relative;
}
/* Slight dim on the poster so the white play badge pops. */
.rh-gallery__thumb--video .rh-gallery__thumb-img {
	filter: brightness( 0.92 );
}
/* Clean centred white play badge with a primary triangle — replaces the old
   flat full-cover overlay. */
.rh-gallery__thumb-play {
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: 26px;
	height: 26px;
	border-radius: var(--wp--custom--radius--pill, 9999px);
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 255, 255, 255, 0.94 );
	color: var(--wp--preset--color--primary, #0a66c2);
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.25 );
}
.rh-gallery__thumb-play svg {
	width: 13px;
	height: 13px;
	margin-inline-start: 1px; /* optical-centre the triangle */
}
