/**
 * AT Elementor Elements - Carousel Styles
 *
 * Core layout, viewport, track, navigation arrows, and pagination dots.
 *
 * @package AT_Elementor_Elements
 * @subpackage Creative
 * @version 3.0.0
 */

.at-carousel {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.at-carousel__viewport {
	overflow: hidden;
	width: 100%;
	position: relative;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.at-carousel__viewport:active {
	cursor: grabbing;
}

.at-carousel__track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	will-change: transform;
	box-sizing: border-box;
}

.at-carousel__slide {
	flex: 0 0 auto;
	box-sizing: border-box;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Center mode active scaling */
.at-carousel--center-mode .at-carousel__slide {
	opacity: 0.65;
	transform: scale(0.94);
}
.at-carousel--center-mode .at-carousel__slide.is-center,
.at-carousel--center-mode .at-carousel__slide.is-active {
	opacity: 1;
	transform: scale(1);
}

/* Fade Effect Mode */
.at-carousel--effect-fade .at-carousel__viewport {
	position: relative;
	width: 100%;
	height: 100%;
}
.at-carousel--effect-fade .at-carousel__track {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
	transform: none !important;
}
.at-carousel--effect-fade .at-carousel__slide {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	z-index: 1;
	transition: opacity 0.65s ease, visibility 0.65s ease;
	margin-right: 0 !important;
}
.at-carousel--effect-fade .at-carousel__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

/* --------------------------------------------------------------------------
   Navigation Arrows
   -------------------------------------------------------------------------- */
.at-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid var(--at-border-color, #e2e8f0);
	color: var(--at-color-text-title, #0f172a);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	padding: 0;
}

.at-carousel__arrow svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	transition: transform 0.2s ease;
}

.at-carousel__arrow:hover {
	background: var(--at-color-primary, #2563eb);
	color: #ffffff;
	border-color: var(--at-color-primary, #2563eb);
	box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
	transform: translateY(-50%) scale(1.06);
}

.at-carousel-prev:hover svg {
	transform: translateX(-2px);
}
.at-carousel-next:hover svg {
	transform: translateX(2px);
}

.at-carousel__arrow.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

/* Side Arrows (Overhanging) */
.at-carousel--arrows-side .at-carousel-prev {
	left: -22px;
}
.at-carousel--arrows-side .at-carousel-next {
	right: -22px;
}

/* Inside Arrows */
.at-carousel--arrows-inside .at-carousel-prev {
	left: 16px;
}
.at-carousel--arrows-inside .at-carousel-next {
	right: 16px;
}

/* Bottom Arrows */
.at-carousel--arrows-bottom .at-carousel__arrow {
	position: static;
	transform: none;
}
.at-carousel--arrows-bottom .at-carousel__arrow:hover {
	transform: scale(1.06);
}
.at-carousel--arrows-bottom .at-carousel__arrows {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.75rem;
}

/* Top Right Arrows (Header position) */
.at-carousel__header-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 2rem;
}
.at-carousel__header-arrows {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.at-carousel__header-arrows .at-carousel__arrow {
	position: static;
	transform: none;
}

/* --------------------------------------------------------------------------
   Pagination Dots
   -------------------------------------------------------------------------- */
.at-carousel__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 1.75rem;
}

.at-carousel__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--at-border-color, #cbd5e1);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.at-carousel__dot:hover {
	background: var(--at-color-text-secondary, #64748b);
}

.at-carousel__dot.is-active {
	width: 24px;
	border-radius: 9999px;
	background: var(--at-color-primary, #2563eb);
}

/* --------------------------------------------------------------------------
   Responsive Mobile Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.at-carousel--arrows-side .at-carousel-prev {
		left: 8px;
	}
	.at-carousel--arrows-side .at-carousel-next {
		right: 8px;
	}
	.at-carousel__arrow {
		width: 38px;
		height: 38px;
	}
	.at-carousel__arrow svg {
		width: 15px;
		height: 15px;
	}
}

/* --------------------------------------------------------------------------
   Progress Bar & Fraction Pagination
   -------------------------------------------------------------------------- */
.at-carousel__progress {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: rgba(255, 255, 255, 0.2);
	z-index: 15;
	overflow: hidden;
}

.at-carousel__progress-fill {
	height: 100%;
	width: 0%;
	background: var(--at-color-primary, #2563eb);
	will-change: width;
}

.at-carousel__fraction {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--at-font-family-mono, monospace);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.1em;
	color: #ffffff;
	z-index: 12;
}

.at-carousel__fraction-current {
	color: #ffffff;
}

.at-carousel__fraction-sep {
	opacity: 0.5;
}

.at-carousel__fraction-total {
	opacity: 0.6;
}
