/* =============================================================================
   PREMIUM ANIMATION LIBRARY
   High-end micro-interactions and visual effects for enterprise pages
   ============================================================================= */

/* === Entrance Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

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

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

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

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

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    70% {
        transform: scale(1.05);
    }

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

/* === Continuous Animations === */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

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

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(2, 85, 158, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(2, 85, 158, 0.6);
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(1deg);
    }

    75% {
        transform: translateY(5px) rotate(-1deg);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* === Special Effects === */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

/* === Loading Skeletons === */
.skeleton {
    background: linear-gradient(90deg,
            var(--ent-bg-tertiary, #F1F5F9) 0%,
            var(--ent-bg-secondary, #FFFFFF) 50%,
            var(--ent-bg-tertiary, #F1F5F9) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--ent-radius-md, 10px);
}

.skeleton-text {
    height: 1em;
    margin: 0.5em 0;
    width: 100%;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin: 0.5em 0;
}

.skeleton-card {
    height: 150px;
    width: 100%;
}

.skeleton-circle {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

/* === Staggered Animations === */
.stagger-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(7) {
    animation-delay: 0.35s;
}

.stagger-item:nth-child(8) {
    animation-delay: 0.4s;
}

.stagger-left {
    animation: slideInLeft 0.5s ease forwards;
    opacity: 0;
}

.stagger-right {
    animation: slideInRight 0.5s ease forwards;
    opacity: 0;
}

/* === Interactive Effects === */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(2, 85, 158, 0.4);
}

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.press-effect {
    transition: transform 0.1s ease;
}

.press-effect:active {
    transform: scale(0.98);
}

/* === Button Ripple Effect === */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
    transform: scale(0);
    opacity: 1;
    transition: 0s;
}

/* === Gradient Animations === */
.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* === Toast Animations === */
.toast-enter {
    animation: slideInRight 0.3s ease forwards;
}

.toast-exit {
    animation: slideInRight 0.3s ease reverse forwards;
}

/* === Card 3D Effect Base === */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

/* === Success Checkmark Animation === */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-animated path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.5s ease forwards;
}

/* === Number Counter Animation Helper Class === */
.counter-animated {
    transition: all 0.3s ease;
}

/* === Page Transition === */
.page-enter {
    animation: fadeInUp 0.4s ease;
}

/* === Responsive Animation Adjustments === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}