/**
 * Product Video Gallery: light-DOM styles for the Video.js 10 player.
 * The skin's own styles live in its shadow root (assets/vendor/videojs).
 * Keeps the v2.x "fluid" 16:9 box and reserves space before the custom
 * elements upgrade, so the gallery does not jump.
 */
video-player.pvg-player {
	display: block;
	width: 100%;
	max-width: 100%;
	position: relative;
	background: #000;
	line-height: normal;
}

video-player.pvg-player pvg-video-skin {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

/* Lazy poster image: covers the box until the player loads, then fills the
   skin's poster slot (hidden by the skin once the video plays). */
video-player.pvg-player .pvg-poster {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	pointer-events: none;
}

/* Self-hosted video: follow the file's own aspect ratio once known (v8 "fluid"). */
video-player.pvg-player pvg-video-skin[data-pvg-intrinsic][data-pvg-ratio] {
	aspect-ratio: var(--pvg-ratio, 16 / 9);
}

video-player.pvg-player video,
video-player.pvg-player youtube-video,
video-player.pvg-player vimeo-video {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
}

/* Before upgrade (or when the player cannot load), the bare <video> still
   fills the box and shows native controls via the fallback script. */
video-player.pvg-player:not(:defined) video {
	object-fit: contain;
}

/* Old-browser fallback iframe (YouTube/Vimeo). */
.pvg-player-fallback {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}
