/**
 * Video Gallery Styles
 *
 * Styles for video thumbnails in the product gallery
 * and video playback in the lightbox.
 *
 * @package VHP_Theme
 * @since 1.1.0
 */

/* -----------------------------------------------------------------------------
 * Video Thumbnails in Gallery
 * -------------------------------------------------------------------------- */

.image-gallery__thumb--video {
	position: relative;
}

.image-gallery__thumb--video::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 50%;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.image-gallery__thumb--video::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-40%, -50%);
	border: solid transparent;
	border-width: 8px 0 8px 12px;
	border-left-color: #fff;
	z-index: 1;
}

.image-gallery__thumb--video:hover::after {
	background: var(--color-primary, #4a7c59);
	transform: translate(-50%, -50%) scale(1.1);
}

/* Video thumbnail image */
.image-gallery__video-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* -----------------------------------------------------------------------------
 * Video in Main Gallery
 * -------------------------------------------------------------------------- */

.image-gallery__main--video {
	position: relative;
	cursor: pointer;
}

.image-gallery__main--video::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80px;
	height: 80px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 50%;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.image-gallery__main--video::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-35%, -50%);
	border: solid transparent;
	border-width: 20px 0 20px 32px;
	border-left-color: #fff;
	z-index: 1;
}

.image-gallery__main--video:hover::after {
	background: var(--color-primary, #4a7c59);
	transform: translate(-50%, -50%) scale(1.1);
}

/* -----------------------------------------------------------------------------
 * Video in Lightbox
 * -------------------------------------------------------------------------- */

.lightbox-overlay__video-wrapper {
	position: relative;
	width: 100%;
	max-width: 1000px;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.lightbox-overlay__video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Video title in lightbox */
.lightbox-overlay__video-title {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 16px 20px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
	color: #fff;
	font-size: 1rem;
	margin: 0;
}

/* -----------------------------------------------------------------------------
 * Video Section Label
 * -------------------------------------------------------------------------- */

.image-gallery__section-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted, #666);
	margin: 16px 0 8px;
	padding-left: 4px;
}

.image-gallery__section-label:first-of-type {
	margin-top: 0;
}

/* -----------------------------------------------------------------------------
 * Responsive Adjustments
 * -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.image-gallery__thumb--video::after {
		width: 24px;
		height: 24px;
	}

	.image-gallery__thumb--video::before {
		border-width: 6px 0 6px 10px;
	}

	.image-gallery__main--video::after {
		width: 60px;
		height: 60px;
	}

	.image-gallery__main--video::before {
		border-width: 16px 0 16px 26px;
	}

	.lightbox-overlay__video-wrapper {
		border-radius: 0;
	}
}
