/**
 * Elementor Video Carousel — front-end styles.
 * All colors/sizes controlled from Elementor Style controls are passed
 * in as CSS custom properties on the widget wrapper.
 */

.evc-widget-wrapper {
	position: relative;
	direction: ltr;
}

.evc-widget-wrapper[dir="rtl"] {
	direction: rtl;
}

.evc-carousel.swiper {
	width: 100%;
	overflow: hidden;
	padding-bottom: 2px; /* avoid clipping focus outlines */
}

.evc-carousel .swiper-wrapper {
	align-items: stretch;
}

.evc-slide {
	height: auto;
}

/* Thumbnail box, sized responsively via aspect-ratio percentage */
.evc-thumb-wrap {
	position: relative;
	width: 100%;
}

.evc-play-trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background-color: #000;
	cursor: pointer;
	overflow: hidden;
	border-radius: var( --evc-border-radius, 8px );
}

.evc-play-trigger::before {
	content: "";
	display: block;
	padding-top: var( --evc-aspect-ratio, 56.25% );
}

.evc-play-trigger img,
.evc-play-trigger .evc-thumb-video {
	position: absolute;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Decorative "fallback poster" video used when no custom thumbnail is
 * set. It never plays and must not intercept clicks meant for the
 * parent play button. */
.evc-play-trigger .evc-thumb-video {
	pointer-events: none;
	background-color: #000;
}

.evc-thumb-overlay {
	position: absolute;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var( --evc-thumb-overlay, transparent );
	transition: background-color 0.2s ease;
}

.evc-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: var( --evc-icon-bg-size, 60px );
	height: var( --evc-icon-bg-size, 60px );
	border-radius: 50%;
	background-color: var( --evc-icon-bg-color, rgba( 0, 0, 0, 0.6 ) );
	color: var( --evc-icon-color, #fff );
	font-size: var( --evc-icon-size, 20px );
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.evc-play-icon i,
.evc-play-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* RTL: nudge the play triangle so it looks centered inside the circle */
.evc-widget-wrapper[dir="rtl"] .evc-play-icon i.fa-play {
	transform: scaleX( -1 );
}

.evc-play-trigger:hover .evc-play-icon,
.evc-play-trigger:focus-visible .evc-play-icon {
	transform: translate( -50%, -50% ) scale( 1.08 );
	background-color: var( --evc-icon-bg-color-hover, var( --evc-icon-bg-color ) );
	color: var( --evc-icon-color-hover, var( --evc-icon-color ) );
}

.evc-play-trigger:focus-visible {
	outline: 2px solid var( --evc-icon-bg-color, #000 );
	outline-offset: 2px;
}

.evc-slide-title {
	font-size: 15px;
	line-height: 1.4;
	text-align: center;
	color: inherit;
}

/* Navigation arrows */
.evc-nav {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 2;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background-color: var( --evc-arrow-bg, rgba( 0, 0, 0, 0.5 ) );
	color: var( --evc-arrow-color, #fff );
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 16px;
	transition: opacity 0.2s ease;
}

.evc-nav:hover {
	opacity: 0.85;
}

.evc-nav-prev {
	left: -8px;
}

.evc-nav-next {
	right: -8px;
}

.evc-widget-wrapper[dir="rtl"] .evc-nav-prev {
	left: auto;
	right: -8px;
}

.evc-widget-wrapper[dir="rtl"] .evc-nav-next {
	right: auto;
	left: -8px;
}

.evc-nav.swiper-button-disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

/* Pagination dots */
.evc-pagination {
	position: relative;
	margin-top: 14px;
	text-align: center;
	line-height: 1;
}

.evc-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0 4px;
	opacity: 1;
	background-color: var( --evc-dot-color, rgba( 0, 0, 0, 0.25 ) );
}

.evc-pagination .swiper-pagination-bullet-active {
	background-color: var( --evc-dot-active-color, #000 );
}

/* Lightbox — styled after WordPress's native fullscreen image lightbox:
 * near-black backdrop, centered content, minimal chrome, soft fade/scale-in. */
.evc-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 40px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.evc-lightbox.evc-lightbox-open {
	display: flex;
	opacity: 1;
}

.evc-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba( 0, 0, 0, 0.9 );
}

.evc-lightbox-content {
	position: relative;
	width: 100%;
	max-width: 1100px;
	max-height: 90vh;
	z-index: 1;
	transform: scale( 0.96 );
	opacity: 0;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.evc-lightbox.evc-lightbox-open .evc-lightbox-content {
	transform: scale( 1 );
	opacity: 1;
}

.evc-video-holder {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background-color: #000;
}

.evc-lightbox-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #000;
}

.evc-lightbox-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 14px;
	color: rgba( 255, 255, 255, 0.85 );
	font-size: 14px;
	text-align: center;
}

.evc-lightbox-title:empty,
.evc-lightbox-counter:empty {
	display: none;
}

.evc-lightbox-counter {
	opacity: 0.6;
	white-space: nowrap;
}

/* Close button — top-right circular button, WP-lightbox style */
.evc-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba( 0, 0, 0, 0.5 );
	border: 0;
	border-radius: 50%;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	transition: background-color 0.2s ease;
}

.evc-lightbox-close:hover,
.evc-lightbox-close:focus-visible {
	background-color: rgba( 0, 0, 0, 0.8 );
}

.evc-widget-wrapper[dir="rtl"] .evc-lightbox-close {
	right: auto;
	left: 20px;
}

/* Prev / next navigation inside the lightbox, for moving between videos */
.evc-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba( 0, 0, 0, 0.5 );
	border: 0;
	border-radius: 50%;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	z-index: 2;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.evc-lightbox-nav:hover,
.evc-lightbox-nav:focus-visible {
	background-color: rgba( 0, 0, 0, 0.8 );
}

.evc-lightbox-nav[disabled] {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.evc-lightbox-prev {
	left: 24px;
}

.evc-lightbox-next {
	right: 24px;
}

.evc-widget-wrapper[dir="rtl"] .evc-lightbox-prev {
	left: auto;
	right: 24px;
}

.evc-widget-wrapper[dir="rtl"] .evc-lightbox-next {
	right: auto;
	left: 24px;
}

body.evc-lightbox-active {
	overflow: hidden;
}

@media ( max-width: 600px ) {
	.evc-lightbox {
		padding: 16px;
	}

	.evc-lightbox-nav {
		width: 38px;
		height: 38px;
		font-size: 16px;
	}

	.evc-lightbox-prev {
		left: 8px;
	}

	.evc-lightbox-next {
		right: 8px;
	}

	.evc-widget-wrapper[dir="rtl"] .evc-lightbox-prev {
		right: 8px;
	}

	.evc-widget-wrapper[dir="rtl"] .evc-lightbox-next {
		left: 8px;
	}

	.evc-lightbox-close {
		top: 10px;
		right: 10px;
	}

	.evc-widget-wrapper[dir="rtl"] .evc-lightbox-close {
		left: 10px;
	}
}

.evc-editor-placeholder {
	padding: 30px;
	text-align: center;
	border: 2px dashed #ccc;
	color: #888;
}

@media ( max-width: 767px ) {
	.evc-nav {
		width: 34px;
		height: 34px;
		font-size: 14px;
	}
}
