/* Eon Carousel - Scroll Mode Only */
/* Panel Liquid Glass Frame base (dynamic filter & blur via inline CSS variables) */
.eon-carousel-slide.panel-glass-frame-enabled {
	position: relative;
}

.eon-carousel-slide.panel-glass-frame-enabled::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 1;
}

.eon-carousel-slide.panel-glass-frame-enabled>* {
	position: relative;
	z-index: 2;
}

.eon-carousel {
	position: relative;
	/* overflow is set inline per carousel via PHP */
	width: 100%;
	opacity: 1 !important;
	/* Force visible for debugging/video load issues */
	transition: opacity 0.3s ease;
}

/* Donut mode: allow 3D space, visible overflow */
.eon-carousel[data-carousel-mode="donut"] {
	overflow: visible !important;
	perspective-origin: center center;
	min-height: 400px;
	/* fallback */
	display: flex;
	align-items: center;
	justify-content: center;
}

.eon-carousel[data-carousel-mode="donut"] .eon-carousel-track {
	transform-style: preserve-3d;
	overflow: visible;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100% !important;
	height: 100% !important;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Ensure slides rotate/scale around their center in donut mode */
.eon-carousel[data-carousel-mode="donut"] .eon-carousel-slide {
	transform-origin: center center;
	/* Smooth opacity transition with cubic easing for gradual fade as panels rotate */
	transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
	overflow: hidden;
	border-radius: 20px;
	flex-shrink: 0;
}

.eon-carousel[data-carousel-ready="true"] {
	opacity: 1;
}

/* Navigation Arrows */
.eon-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(34, 113, 177, 0.9);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 200;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	position: absolute;
}

/* Hover Reveal Mode */
.eon-carousel.eon-arrows-hover-reveal .eon-carousel-arrow {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) scale(0.9);
}

.eon-carousel.eon-arrows-hover-reveal:hover .eon-carousel-arrow {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(-50%) scale(1);
}

.eon-carousel.eon-arrows-hover-reveal:hover .eon-carousel-arrow:hover {
	transform: translateY(-50%) scale(1.1);
}

.eon-carousel-arrow .dashicons {
	position: relative;
	z-index: 2;
}

.eon-carousel-arrow:hover {
	background: rgba(34, 113, 177, 1);
	transform: translateY(-50%) scale(1.1);
}

.eon-carousel-arrow:active {
	transform: translateY(-50%) scale(0.95);
}

.eon-carousel-arrow-prev {
	left: 20px;
}

.eon-carousel-arrow-next {
	right: 20px;
}

.eon-carousel-arrow .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
}

.eon-carousel-track {
	display: flex;
	height: 100%;
	position: relative;
	width: max-content;
	overflow-x: visible;
	overflow-y: visible;
}

.eon-carousel-slide {
	position: relative;
	flex: 0 0 auto;
	width: auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	z-index: 100;
	/* Overflow is controlled per-panel via inline styles */
}

/* Panel Scale Support - uses modern 'scale' property to avoid transform conflicts */
/* RESTRICTED TO SCROLL MODE ONLY to prevent Donut layout breakage */
.eon-carousel[data-carousel-mode="scroll"] .eon-carousel-slide {
	scale: var(--eon-panel-scale, 1);
	transition: scale 0.3s ease-out;
}

/* Lift actively tilting slide above neighbors for click-through */
.eon-carousel-slide.eon-tilt-active {
	z-index: 190;
}

.eon-carousel-slide img {
	width: auto;
	height: 100%;
	max-height: 100%;
	max-width: none;
	object-fit: contain;
	padding: 0 15px;
	display: block;
	flex-shrink: 0;
	user-select: none;
}

.eon-carousel-image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	width: auto;
	position: relative;
	text-decoration: none;
	backface-visibility: hidden;
	transform-style: flat;
	transform: translateZ(0);
}

/* Video Container */
.eon-video-container {
	position: relative;
	width: 100%;
	height: 100%;
	pointer-events: auto;
	transform-style: flat;
	transform: translateZ(0);
}

/* Scroll Mode: Prevent video collapse by allowing auto width */
.eon-carousel[data-carousel-mode="scroll"] .eon-video-container {
	width: auto;
	min-width: unset;
}

/* Scroll Mode: Force video to auto width to respect aspect ratio and height */
.eon-carousel[data-carousel-mode="scroll"] .eon-video-container video {
	width: auto !important;
}

.eon-video-container video,
.eon-carousel-image-link video {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

/* When click action is play, video needs pointer-events auto for click detection */
.eon-video-container[data-click-action="play"],
.eon-carousel-image-link[data-click-action="play"] {
	pointer-events: auto;
	cursor: pointer;
}

/* When click action is none, disable panel clicks but keep buttons clickable */
.eon-video-container[data-click-action="none"],
.eon-carousel-image-link[data-click-action="none"] {
	pointer-events: none;
}

.eon-video-container[data-click-action="none"] .eon-carousel-link-button,
.eon-video-container[data-click-action="none"] .eon-video-play-button,
.eon-carousel-image-link[data-click-action="none"] .eon-carousel-link-button {
	pointer-events: auto !important;
}

.eon-video-container[data-click-action="play"] video,
.eon-carousel-image-link[data-click-action="play"] video {
	pointer-events: auto;
}

.eon-carousel-image-link img {
	width: auto;
	height: 100%;
	max-height: 100%;
	object-fit: contain;
	padding: 0 15px;
	display: block;
	user-select: none;
}

/* Link Button Overlay */
.eon-carousel-link-button {
	position: absolute;
	background: rgba(34, 113, 177, 0.95);
	color: #fff;
	padding: 10px 20px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: opacity 0.3s ease;
	pointer-events: auto !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 150;
	cursor: pointer;
	border: none;
	text-decoration: none;
	backface-visibility: hidden;
	transform-style: flat;
	border-radius: 100px;
}

/* Link Button Positioning */
.eon-carousel-link-button[data-position="top-left"] {
	top: 15px;
	left: 15px;
	transform: translateZ(50px);
}

.eon-carousel-link-button[data-position="top-center"] {
	top: 15px;
	left: 50%;
	transform: translateX(-50%) translateZ(50px);
}

.eon-carousel-link-button[data-position="top-right"] {
	top: 15px;
	right: 15px;
	transform: translateZ(50px);
}

.eon-carousel-link-button[data-position="center-left"] {
	top: 50%;
	left: 15px;
	transform: translateY(-50%) translateZ(50px);
}

.eon-carousel-link-button[data-position="center-center"] {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) translateZ(50px);
}

.eon-carousel-link-button[data-position="center-right"] {
	top: 50%;
	right: 15px;
	transform: translateY(-50%) translateZ(50px);
}

.eon-carousel-link-button[data-position="bottom-left"] {
	bottom: 15px;
	left: 15px;
	transform: translateZ(50px);
}

.eon-carousel-link-button[data-position="bottom-center"] {
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%) translateZ(50px);
}

.eon-carousel-link-button[data-position="bottom-right"] {
	bottom: 15px;
	right: 15px;
	transform: translateZ(50px);
}

.eon-carousel-link-button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #fff !important;
	display: inline-block;
	line-height: 1;
}

/* Ensure Dashicons glyph itself is white */
.eon-carousel-link-button .dashicons:before {
	color: #fff !important;
}

/* Video Play Button */
.eon-video-play-button {
	position: absolute;
	background: rgba(34, 113, 177, 0.95);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	z-index: 140;
	pointer-events: all;
	backface-visibility: hidden;
	transform-style: flat;
}

/* Play Button Positioning */
.eon-video-play-button[data-position="top-left"] {
	top: 15px;
	left: 15px;
	transform: translateZ(50px);
}

.eon-video-play-button[data-position="top-center"] {
	top: 15px;
	left: 50%;
	transform: translateX(-50%) translateZ(50px);
}

.eon-video-play-button[data-position="top-right"] {
	top: 15px;
	right: 15px;
	transform: translateZ(50px);
}

.eon-video-play-button[data-position="center-left"] {
	top: 50%;
	left: 15px;
	transform: translateY(-50%) translateZ(50px);
}

.eon-video-play-button[data-position="center-center"] {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) translateZ(50px);
}

.eon-video-play-button[data-position="center-right"] {
	top: 50%;
	right: 15px;
	transform: translateY(-50%) translateZ(50px);
}

.eon-video-play-button[data-position="bottom-left"] {
	bottom: 15px;
	left: 15px;
	transform: translateZ(50px);
}

.eon-video-play-button[data-position="bottom-center"] {
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%) translateZ(50px);
}

.eon-video-play-button[data-position="bottom-right"] {
	bottom: 15px;
	right: 15px;
	transform: translateZ(50px);
}

/* Button Visibility Modes */
.eon-btn-hover {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.eon-carousel-slide:hover .eon-btn-hover,
.eon-carousel-slide.eon-slide-hover .eon-btn-hover {
	opacity: 1 !important;
}

.eon-btn-always {
	opacity: 1 !important;
}

.eon-video-play-button:hover {
	background: rgba(34, 113, 177, 1);
	transform: scale(1.1);
}

.eon-video-play-button[data-position="top-center"]:hover {
	transform: translateX(-50%) scale(1.1);
}

.eon-video-play-button[data-position="center-left"]:hover,
.eon-video-play-button[data-position="center-right"]:hover {
	transform: translateY(-50%) scale(1.1);
}

.eon-video-play-button[data-position="center-center"]:hover {
	transform: translate(-50%, -50%) scale(1.1);
}

.eon-video-play-button[data-position="bottom-center"]:hover {
	transform: translateX(-50%) scale(1.1);
}

.eon-video-play-button .dashicons {
	font-size: 30px;
	width: 30px;
	height: 30px;
	color: #fff !important;
}

.eon-video-play-button .dashicons:before {
	color: #fff !important;
}

/* Panel Liquid Glass Overlay */
.eon-glass-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	/* Border radius is handled dynamically via JS settings */
}