/* ═══════════════════════════════════════════════════
   Video Carousel for Elementor — Frontend Styles
   ═══════════════════════════════════════════════════ */

/* ── Elementor container overflow fix ─────────────── */
.elementor-widget-vce_video_carousel .elementor-widget-container {
	overflow: visible !important;
}

/* ── Wrapper ───────────────────────────────────────── */
.vce-wrapper {
	position: relative;
	user-select: none;
}

.vce-wrapper * {
	box-sizing: border-box;
}

.vce-wrapper.vce-arrows-outside {
	padding-left: 32px;
	padding-right: 32px;
}

/* ── Viewport (clips the sliding track) ───────────── */
.vce-viewport {
	overflow: hidden;
	width: 100%;
}

/* ── Track (the flex row of cards) ────────────────── */
.vce-track {
	display: flex;
	gap: 12px;
	transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
	align-items: stretch;
}

/* ── Card ──────────────────────────────────────────── */
.vce-card {
	flex: 0 0 auto;
	/* width set by JS */
	position: relative;
	cursor: pointer;
}

.vce-card-inner {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #111;
	/* aspect-ratio set inline */
}

/* ── YouTube facade (thumbnail before iframe loads) ── */
.vce-yt-facade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #000;
}

.vce-yt-facade img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	/* No border-radius here — parent .vce-card-inner clips it */
}

/* ── Video & iframe fill container ────────────────── */
.vce-card video,
.vce-card iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: none;
}

/* ── Dark overlay ──────────────────────────────────── */
.vce-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 1;
}

/* ── Play button (shown when muted) ────────────────── */
.vce-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	border-style: solid;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	/* visibility included so the hidden state is fully inert */
	visibility: visible;
	transition: background 0.18s ease, border-color 0.18s ease,
	            transform 0.18s ease, opacity 0.2s ease, visibility 0s ease;
}

.vce-play-btn:hover {
	background: rgba(255, 255, 255, 0.30);
	border-color: #ffffff;
	transform: translate(-50%, -50%) scale(1.08);
}

.vce-play-btn .vce-icon {
	/* SVG inherits currentColor for fill/stroke — no font-size needed */
	display: flex;
	align-items: center;
	justify-content: center;
	/* Slight nudge so triangle reads as optically centred */
	margin-left: 2px;
}

.vce-play-btn .vce-icon svg {
	/* Size relative to the button; Elementor icon size slider targets this */
	width:  1em;
	height: 1em;
}

/* Hide play button once unmuted — opacity fades it, visibility removes it
   from all interaction and compositing layers */
.vce-card.is-unmuted .vce-muted-only {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* ── Unmute / re-mute button ───────────────────────── */
.vce-unmute-btn {
	position: absolute;
	z-index: 4;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.15s ease;
}

.vce-unmute-btn:hover {
	background: rgba(0, 0, 0, 0.75);
	transform: scale(1.1);
}

/* SVG icons inside unmute button */
.vce-unmute-btn .vce-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
}

.vce-unmute-btn .vce-icon svg {
	width: 100%;
	height: 100%;
}

/* Arrow SVG sizing */
.vce-arrow svg {
	width: 1em;
	height: 1em;
}

/* Positions */
.vce-pos-bottom-right { bottom: 14px; right: 14px; }
.vce-pos-bottom-left  { bottom: 14px; left:  14px; }
.vce-pos-top-right    { top:    14px; right: 14px; }
.vce-pos-top-left     { top:    14px; left:  14px; }

/* Icon visibility states */
.vce-card.is-muted   .vce-icon-muted { display: flex !important; }
.vce-card.is-muted   .vce-icon-sound { display: none  !important; }
.vce-card.is-unmuted .vce-icon-muted { display: none  !important; }
.vce-card.is-unmuted .vce-icon-sound { display: flex  !important; }

/* Default initial state = muted */
.vce-card .vce-icon-muted { display: flex; }
.vce-card .vce-icon-sound { display: none; }

/* ── Caption ────────────────────────────────────────── */
.vce-caption-wrap {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 3;
	pointer-events: none;
}

.vce-caption-bottom { bottom: 0; }
.vce-caption-top    { top:    0; }
.vce-caption-center {
	top: 50%;
	transform: translateY(-50%);
}

.vce-caption {
	margin: 0;
	padding: 16px;
	color: #fff;
	font-size: 0.9375rem;
	line-height: 1.5;
	font-weight: 600;
	text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* ── Arrows ─────────────────────────────────────────── */
.vce-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: 0 solid transparent;
	color: #111827;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
	user-select: none;
}

.vce-arrow:hover {
	background: #fff;
}

.vce-arrow:focus-visible {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}

.vce-arrow:disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.vce-arrows-inside .vce-arrow-prev  { left:  12px; }
.vce-arrows-inside .vce-arrow-next  { right: 12px; }
.vce-arrows-outside .vce-arrow-prev { left: 0;  transform: translateX(-50%) translateY(-50%); }
.vce-arrows-outside .vce-arrow-next { right: 0; transform: translateX(50%)  translateY(-50%); }

/* ── Dots ───────────────────────────────────────────── */
.vce-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.vce-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	border: none;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.2s ease, transform 0.22s ease, width 0.22s ease;
}

.vce-dot:focus-visible {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}

.vce-dot.is-active {
	background: #fff;
	transform: scale(1.3);
}

/* Dot shapes */
.vce-dots-shape-circle  .vce-dot              { border-radius: 50%; }
.vce-dots-shape-rounded .vce-dot              { border-radius: 4px; }
.vce-dots-shape-square  .vce-dot              { border-radius: 0; }
.vce-dots-shape-pill    .vce-dot              { border-radius: 99px; }
.vce-dots-shape-pill    .vce-dot.is-active    { width: 22px; transform: none; }

/* ── Paused state (IntersectionObserver) ───────────── */
.vce-card.is-paused video {
	/* visual hint that video is paused — very subtle */
	filter: brightness(0.92);
	transition: filter 0.3s;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 767px) {
	.vce-arrows-outside {
		padding-left: 24px;
		padding-right: 24px;
	}
	.vce-arrows-outside .vce-arrow-prev { left: 0; }
	.vce-arrows-outside .vce-arrow-next { right: 0; }
}
