/**
 * AT Elementor Elements — Creative Text Marquee CSS
 *
 * Infinitely scrolling ticker with edge gradient fade masks,
 * outlined/solid/mixed typography, and velocity-aware choreography.
 *
 * @package AT_Elementor_Elements
 * @version 3.0.0
 */

.at-text-marquee {
	--at-marquee-gap: 48px;
	--at-marquee-speed: 45px;
	--at-marquee-accent: var(--at-color-primary, #2563eb);
	--at-marquee-color: var(--at-color-heading, #0f172a);

	position: relative;
	width: 100%;
	overflow: hidden;
	color: var(--at-marquee-color);
	box-sizing: border-box;
}

.at-marquee-viewport {
	overflow: hidden;
	width: 100%;
	position: relative;
}

/* Edge Fade Mask to gracefully dissolve edges */
.at-marquee-mask--enabled .at-marquee-viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.at-marquee-track {
	display: flex;
	width: max-content;
	align-items: center;
	gap: var(--at-marquee-gap);
	white-space: nowrap;
	will-change: transform;
	transform: translate3d(0, 0, 0);
	user-select: none;
}

.at-marquee-item {
	display: inline-block;
	font-family: var(--at-font-heading, inherit);
	font-size: clamp(2rem, 6vw, 6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.at-marquee-separator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0.6;
	font-size: 0.7em;
	color: var(--at-marquee-accent);
}

/* 1. Outline Style */
.at-marquee-style-outline .at-marquee-item {
	-webkit-text-stroke: var(--at-marquee-stroke, 1.5px) currentColor;
	color: transparent;
	text-shadow: none;
}

/* 2. Mixed Alternating Style */
.at-marquee-style-mixed .at-marquee-item:nth-child(4n+1) {
	-webkit-text-stroke: var(--at-marquee-stroke, 1.5px) currentColor;
	color: transparent;
	text-shadow: none;
}

.at-marquee-style-mixed .at-marquee-item:nth-child(4n+3) {
	color: currentColor;
	-webkit-text-stroke: 0;
}

/* 3. Badge Pill Preset */
.at-marquee-style-badge .at-marquee-item {
	font-size: clamp(1rem, 2vw, 1.5rem);
	font-weight: 700;
	padding: 10px 24px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.08);
	border: 1px solid rgba(37, 99, 235, 0.16);
	color: var(--at-marquee-accent);
}

/* Pause on Hover */
.at-marquee-pause-hover:hover .at-marquee-track {
	animation-play-state: paused;
}

/* Reduced Motion fallback */
@media (prefers-reduced-motion: reduce) {
	.at-marquee-track {
		transform: none;
		white-space: normal;
		flex-wrap: wrap;
	}
	.at-marquee-viewport {
		overflow: visible;
		-webkit-mask-image: none;
		mask-image: none;
	}
}
