/*
 * Lightweight motion layer.
 * Only adds CSS/JS animations; it intentionally avoids visual restyling.
 */

@keyframes mjMotionFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes mjMotionTap {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(0.985);
    }
    100% {
        transform: scale(1);
    }
}

body.mj-motion-ready .mj-motion-item {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    will-change: opacity, transform;
}

body.mj-motion-ready .mj-motion-item.mj-motion-visible {
    animation: mjMotionFadeUp 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: var(--mj-motion-delay, 0ms);
}

body.mj-motion-ready .mj-motion-item.mj-motion-done,
body.mj-motion-ready .mj-motion-skip {
    opacity: 1;
    transform: none;
    animation: none;
    will-change: auto;
}

body.mj-motion-ready .mj-motion-pressable {
    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
    transform: translateZ(0);
}

body.mj-motion-ready .mj-motion-pressable.mj-motion-tap {
    animation: mjMotionTap 0.22s ease both;
}

@media (hover: hover) and (pointer: fine) {
    body.mj-motion-ready .mj-motion-pressable:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 767px) {
    body.mj-motion-ready .mj-motion-item {
        transform: translate3d(0, 8px, 0);
    }

    body.mj-motion-ready .mj-motion-item.mj-motion-visible {
        animation-duration: 0.28s;
        animation-delay: 0ms;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.mj-motion-ready .mj-motion-item,
    body.mj-motion-ready .mj-motion-item.mj-motion-visible {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    body.mj-motion-ready .mj-motion-pressable,
    body.mj-motion-ready .mj-motion-pressable:hover,
    body.mj-motion-ready .mj-motion-pressable.mj-motion-tap {
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}
