@keyframes iiFadeIn {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes iiSpin {
	from {
		transform: rotate(360deg);
	}

	to {
		transform: rotate(0);
	}
}

@keyframes iiSkeletonShimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

/* Slide Animations */
.ii-asset-screen.is-leaving-left {
	display: block;
	animation: iiAssetSlideOutLeft 0.3s ease forwards;
}

.ii-asset-screen.is-entering-right {
	animation: iiAssetSlideInRight 0.3s ease forwards;
}

.ii-asset-screen.is-leaving-right {
	display: block;
	animation: iiAssetSlideOutRight 0.3s ease forwards;
}

.ii-asset-screen.is-entering-left {
	animation: iiAssetSlideInLeft 0.3s ease forwards;
}

@keyframes iiAssetSlideOutLeft {
	from {
		transform: translateX(0);
		opacity: 1;
	}

	to {
		transform: translateX(-30px);
		opacity: 0;
	}
}

@keyframes iiAssetSlideInRight {
	from {
		transform: translateX(30px);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes iiAssetSlideOutRight {
	from {
		transform: translateX(0);
		opacity: 1;
	}

	to {
		transform: translateX(30px);
		opacity: 0;
	}
}

@keyframes iiAssetSlideInLeft {
	from {
		transform: translateX(-30px);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.ii-asset-spinner-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ii-accent, #3b82f6);
	animation: iiAssetBounce 1.4s infinite ease-in-out both;
}

.ii-asset-spinner-dot:nth-child(1) {
	animation-delay: -0.32s;
}

.ii-asset-spinner-dot:nth-child(2) {
	animation-delay: -0.16s;
}

@keyframes iiAssetBounce {
	0%,
	80%,
	100% {
		transform: scale(0);
		opacity: 0.5;
	}

	40% {
		transform: scale(1);
		opacity: 1;
	}
}

/* Tooltip - shadcn/Radix content motion: fade + zoom 95% + 8px slide in,
   fade + zoom out on close (no slide out) */
@keyframes iiTooltipInTop {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(8px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@keyframes iiTooltipInBottom {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(-8px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@keyframes iiTooltipInLeft {
	from {
		opacity: 0;
		transform: scale(0.95) translateX(8px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateX(0);
	}
}

@keyframes iiTooltipInRight {
	from {
		opacity: 0;
		transform: scale(0.95) translateX(-8px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateX(0);
	}
}

@keyframes iiTooltipOut {
	from {
		opacity: 1;
		transform: scale(1);
	}

	to {
		opacity: 0;
		transform: scale(0.95);
	}
}

/* Spinner */
@keyframes ai-toast-spin {
	to {
		transform: rotate(360deg);
	}
}

.ai-toast-spinner {
	width: 14px;
	height: 14px;
	border: 1.5px solid var(--ai-toast-text-primary);
	border-top-color: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	animation: ai-toast-spin 0.7s linear infinite;
}
