/**
 * LoadX Lottie story — isolated styles.
 *
 * Scoped under .loadx-lottie so it cannot collide with theme/plugin CSS.
 * Aspect-ratio reserves space before the JSON loads (CLS protection).
 *
 * @package LoadX
 */

.loadx-lottie {
	--loadx-lottie-ratio: 16 / 9;
	--loadx-lottie-radius: var(--lx-radius-lg, 18px);
	--loadx-lottie-bg: var(--wp--preset--color--navy, #0a1a32);
	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
}

.loadx-lottie *,
.loadx-lottie *::before,
.loadx-lottie *::after {
	box-sizing: border-box;
}

.loadx-lottie__frame {
	position: relative;
	width: 100%;
	aspect-ratio: var(--loadx-lottie-ratio);
	overflow: hidden;
	border-radius: var(--loadx-lottie-radius);
	background: var(--loadx-lottie-bg);
	isolation: isolate;
}

.loadx-lottie__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	z-index: 1;
	transition: opacity 280ms ease;
}

.loadx-lottie.is-ready .loadx-lottie__poster {
	opacity: 0;
	pointer-events: none;
}

.loadx-lottie__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
}

.loadx-lottie__canvas svg {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.loadx-lottie__sr {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.loadx-lottie__cta {
	display: flex;
	justify-content: center;
	margin-top: 1.25rem;
}

.loadx-lottie__cta .wp-block-button__link,
.loadx-lottie__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.8rem 1.4rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent, #f77e2d);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}

.loadx-lottie__cta .wp-block-button__link:hover,
.loadx-lottie__button:hover {
	background: var(--wp--preset--color--accent-dark, #e56a18);
	color: #fff;
}

.loadx-lottie.is-static .loadx-lottie__poster {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.loadx-lottie__poster {
		transition: none;
	}
}
