/**
 * Animated Text Widget Styles
 * 
 * Styles for scroll-triggered animated text widget with text-focus-in animation
 *
 * @package Serenity_CTA_Elements
 */

/* Base widget container styles */
.elementor-widget-serenity_animated_text,
.elementor-widget-serenity_animated_text .elementor-widget-container {
	overflow: visible !important;
}

.serenity-animated-text-wrapper {
	position: relative;
	width: 100%;
	min-height: 1em; /* Ensure wrapper has height even when content is invisible */
	display: block;
}

.serenity-animated-text-content {
	display: block;
	width: 100%;
	line-height: 1.5;
	word-wrap: break-word;
	min-height: 1em; /* Ensure content has height */
	visibility: visible; /* Ensure element is in layout */
	/* Initial blurred state - will be animated by GSAP */
	/* Start with slight blur and reduced opacity, not completely invisible */
	filter: blur(12px);
	-webkit-filter: blur(12px);
	opacity: 0.3; /* Slightly visible so content is rendered */
	will-change: filter, -webkit-filter, opacity;
	transition: none; /* Prevent CSS transitions from interfering */
}

/* When JavaScript loads and initializes, set to fully invisible for animation */
.serenity-animated-text-wrapper.js-initialized .serenity-animated-text-content {
	opacity: 0;
}

/* Show content in editor */
.elementor-editor-active .serenity-animated-text-content {
	opacity: 1 !important;
	filter: blur(0px) !important;
	-webkit-filter: blur(0px) !important;
}

/* Fallback: If JavaScript fails, show content after a delay (accessibility) */
.serenity-animated-text-wrapper:not(.js-loaded) .serenity-animated-text-content {
	animation: text-focus-in-fallback 1s ease-in 0.5s forwards;
}

@keyframes text-focus-in-fallback {
	0% {
		filter: blur(12px);
		-webkit-filter: blur(12px);
		opacity: 0;
	}
	100% {
		filter: blur(0px);
		-webkit-filter: blur(0px);
		opacity: 1;
	}
}

/* Text focus-in animation (for fallback/editor preview) */
.text-focus-in {
	-webkit-animation: text-focus-in 1s ease-in both;
	animation: text-focus-in 1s ease-in both;
}

/* ----------------------------------------------
 * Generated by Animista on 2025-12-24 20:27:48
 * Licensed under FreeBSD License.
 * See http://animista.net/license for more info. 
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */

/**
 * ----------------------------------------
 * animation text-focus-in
 * ----------------------------------------
 */
@-webkit-keyframes text-focus-in {
	0% {
		-webkit-filter: blur(12px);
		filter: blur(12px);
		opacity: 0;
	}
	100% {
		-webkit-filter: blur(0px);
		filter: blur(0px);
		opacity: 1;
	}
}

@keyframes text-focus-in {
	0% {
		-webkit-filter: blur(12px);
		filter: blur(12px);
		opacity: 0;
	}
	100% {
		-webkit-filter: blur(0px);
		filter: blur(0px);
		opacity: 1;
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.serenity-animated-text-content {
		font-size: inherit;
	}
}

