.evg-video-gallery {
	--evg-thumb-base: 168px;
	--evg-thumb-base-mobile: 140px;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.evg-video-display {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
	background-color: #f5f7fa;
	box-shadow:
		inset 0 0 0 1px #25a9e1,
		0 16px 30px rgba(15, 23, 42, 0.12);
	overflow: hidden;
}

.evg-video-display iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background-color: #f5f7fa;
}

.evg-video-thumbnails {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	flex-wrap: nowrap;
	gap: clamp(0.85rem, 2vw, 1.25rem);
	padding: 0 0 0.85rem;
	margin: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
	scroll-snap-type: x proximity;
}

.evg-video-thumbnails::-webkit-scrollbar {
	height: 6px;
}

.evg-video-thumbnails::-webkit-scrollbar-thumb {
	background-color: rgba(15, 23, 42, 0.18);
	border-radius: 999px;
}

.evg-video-thumb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.7rem;
	flex: 0 0 var(--evg-thumb-base);
	width: var(--evg-thumb-base);
	max-width: var(--evg-thumb-base);
	padding: 0;
	margin: 0;
	border: none;
	background: none !important;
	color: inherit;
	cursor: pointer;
	text-align: center;
	scroll-snap-align: start;
	transition: transform 0.2s ease;
}

.evg-video-thumb:focus-visible {
	outline: 2px solid rgba(37, 169, 225, 0.45);
	outline-offset: 4px;
}

.evg-thumb-ratio,
.evg-video-thumb img,
.evg-thumb-fallback {
	border-radius: 22px;
}

.evg-thumb-ratio {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f6f7f9;
	box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
	overflow: hidden;
	transition:
		background-color 0.2s ease,
		box-shadow 0.2s ease,
		border-radius 0.2s ease;
}

.evg-video-thumb img,
.evg-thumb-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	font-weight: 600;
	text-transform: uppercase;
	color: #1f2937;
	background: transparent;
}

.evg-thumb-fallback {
	font-size: 1.6rem;
}

.evg-thumb-label {
	display: -webkit-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 3.05rem;
	padding: 0 0.35rem;
	font-size: 0.9rem;
	line-height: 1.35;
	color: #0f172a;
	opacity: 0.84;
	text-align: center;
	word-break: break-word;
	white-space: normal;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.evg-video-thumb:hover,
.evg-video-thumb:focus-visible,
.evg-video-thumb.is-active {
	transform: translateY(-4px);
}

.evg-video-thumb:hover .evg-thumb-ratio,
.evg-video-thumb:focus-visible .evg-thumb-ratio {
	background: #f0f2f5;
	box-shadow:
		inset 0 0 0 1px rgba(17, 24, 39, 0.1),
		0 9px 18px rgba(15, 23, 42, 0.12);
	border-radius: 24px;
}

.evg-video-thumb.is-active .evg-thumb-ratio {
	background: #eef3f7;
	box-shadow:
		inset 0 0 0 1px #25a9e1,
		0 12px 22px rgba(37, 169, 225, 0.18);
	border-radius: 26px;
}

.evg-video-thumb.is-active .evg-thumb-label {
	opacity: 1;
	font-weight: 600;
	color: #0f172a;
}

/* Aspect ratio modifiers */
.evg-video-gallery[data-main-ratio="1-1"] .evg-video-display {
	aspect-ratio: 1 / 1;
}

.evg-video-gallery[data-main-ratio="3-4"] .evg-video-display {
	aspect-ratio: 3 / 4;
}

.evg-video-gallery[data-thumb-ratio="16-9"] {
	--evg-thumb-base: 210px;
	--evg-thumb-base-mobile: 180px;
}

.evg-video-gallery[data-thumb-ratio="16-9"] .evg-thumb-ratio {
	aspect-ratio: 16 / 9;
}

.evg-video-gallery[data-thumb-ratio="3-4"] {
	--evg-thumb-base: 150px;
	--evg-thumb-base-mobile: 130px;
}

.evg-video-gallery[data-thumb-ratio="3-4"] .evg-thumb-ratio {
	aspect-ratio: 3 / 4;
}

.evg-video-gallery[data-thumb-ratio="16-9"] .evg-thumb-label {
	min-height: 2.5rem;
}

.evg-video-gallery[data-thumb-ratio="3-4"] .evg-thumb-label {
	min-height: 3.35rem;
}

@media (max-width: 768px) {
	.evg-video-gallery {
		--evg-thumb-base: var(--evg-thumb-base-mobile);
	}

	.evg-thumb-label {
		min-height: 2.6rem;
		font-size: 0.82rem;
	}
}

