/* Cotton Video Gallery for Elementor */

.cvg-grid {
	--cvg-play-size: 64px;
	--cvg-play-color: #fff;
	--cvg-play-bg: rgba(0, 0, 0, .35);
	--cvg-hover: rgba(0, 0, 0, .15);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.cvg-item {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #111;
	cursor: pointer;
	text-decoration: none;
	isolation: isolate;
}

.cvg-item img,
.cvg-item .cvg-poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
	pointer-events: none;
}

/* hover tint */
.cvg-item::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--cvg-hover);
	opacity: 0;
	transition: opacity .3s ease;
	z-index: 1;
}
.cvg-item:hover::before,
.cvg-item:focus-visible::before { opacity: 1; }

.cvg-zoom .cvg-item:hover img,
.cvg-zoom .cvg-item:hover .cvg-poster { transform: scale(1.05); }

.cvg-item:focus-visible { outline: 2px solid var(--cvg-play-color); outline-offset: 2px; }

/* play icon (inline SVG, color via currentColor) */
.cvg-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: var(--cvg-play-size);
	height: var(--cvg-play-size);
	transform: translate(-50%, -50%);
	color: var(--cvg-play-color);
	transition: transform .3s ease;
	pointer-events: none;
}
.cvg-play svg { display: block; width: 100%; height: 100%; }
.cvg-play .cvg-play-bg { fill: var(--cvg-play-bg); }
.cvg-item:hover .cvg-play { transform: translate(-50%, -50%) scale(1.08); }

.cvg-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 13px;
	border: 1px dashed #bbb;
	background: #f6f6f6;
}

/* ---------- Lightbox (appended to <body>) ---------- */
.cvg-lock { overflow: hidden !important; }

.cvg-lightbox {
	--cvg-ui: #fff;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .92);
	opacity: 0;
	transition: opacity .25s ease;
}
.cvg-lightbox.is-open { display: flex; }
.cvg-lightbox.is-visible { opacity: 1; }

.cvg-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 90vw;
}

.cvg-video {
	display: block;
	max-width: 90vw;
	max-height: 82vh;
	background: #000;
	outline: none;
}

.cvg-caption {
	margin-top: 12px;
	color: var(--cvg-ui);
	font-size: 15px;
	text-align: center;
}
.cvg-caption:empty { display: none; }

.cvg-lightbox .cvg-btn {
	position: absolute;
	padding: 10px 14px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--cvg-ui) !important;
	font: 300 48px/1 Arial, sans-serif !important;
	cursor: pointer;
	opacity: .8;
	transition: opacity .2s ease;
}
.cvg-lightbox .cvg-btn:hover,
.cvg-lightbox .cvg-btn:focus-visible { opacity: 1; }

.cvg-lightbox .cvg-close { top: 12px; right: 16px; font-size: 44px !important; }
.cvg-lightbox .cvg-prev,
.cvg-lightbox .cvg-next { top: 50%; transform: translateY(-50%); font-size: 64px !important; }
.cvg-lightbox .cvg-prev { left: 8px; }
.cvg-lightbox .cvg-next { right: 8px; }
.cvg-lightbox.no-nav .cvg-prev,
.cvg-lightbox.no-nav .cvg-next { display: none; }

@media (max-width: 767px) {
	.cvg-video { max-width: 100vw; }
	.cvg-lightbox .cvg-prev,
	.cvg-lightbox .cvg-next { top: auto; bottom: 16px; transform: none; font-size: 48px !important; }
}
