/*
 * Animation helpers and GSAP fallbacks for the KDS theme.
 */

.kds-tilt-card {
	perspective: 1200px;
	transform-style: preserve-3d;
}

.kds-tilt-card > * {
	transition: transform 250ms ease;
}

.kds-tilt-card[data-tilt='hover']:hover > * {
	transform: rotateX(6deg) rotateY(-6deg) translateZ(12px);
}

.kds-urgent-pulse {
	animation: kdsUrgentPulse 0.85s ease-in-out infinite;
}

.kds-attention-pulse {
	animation: kdsAttentionPulse 1.4s ease-out infinite;
}

.kds-toast-enter {
	animation: kdsToastCascade 3.35s ease forwards;
}

.kds-soft-glow {
	animation: kdsSlowGlow 4s ease-in-out infinite;
}

@keyframes kdsUrgentPulse {
	0% {
		opacity: 0.7;
		transform: scale(0.96);
		box-shadow: 0 0 0 rgba(248, 113, 113, 0.45);
	}
	70% {
		opacity: 1;
		transform: scale(1.08);
		box-shadow: 0 0 25px rgba(248, 113, 113, 0.65);
	}
	100% {
		opacity: 0.9;
		transform: scale(1);
		box-shadow: 0 0 0 rgba(248, 113, 113, 0);
	}
}

@keyframes kdsAttentionPulse {
	0% {
		transform: scale(1);
		box-shadow: 0 0 0 rgba(76, 110, 245, 0.6);
	}
	65% {
		transform: scale(1.08);
		box-shadow: 0 0 35px rgba(76, 110, 245, 0);
	}
	100% {
		transform: scale(1);
		box-shadow: 0 0 0 rgba(76, 110, 245, 0);
	}
}

@keyframes kdsToastCascade {
	0% {
		opacity: 0;
		transform: translateY(15px);
	}
	8% {
		opacity: 1;
		transform: translateY(0);
	}
	85% {
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		opacity: 0;
		transform: translateY(-18px);
	}
}

@keyframes kdsSlowGlow {
	0% {
		filter: drop-shadow(0 0 0 rgba(76, 110, 245, 0.2));
	}
	50% {
		filter: drop-shadow(0 0 18px rgba(76, 110, 245, 0.65));
	}
	100% {
		filter: drop-shadow(0 0 0 rgba(76, 110, 245, 0.2));
	}
}
