﻿/**
 * Animations — File Tiếng Trung
 * Minimal, purposeful animations only.
 */

/* Scroll Reveal */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(20px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-20px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(20px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-20px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(.95);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Skeleton loader */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

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

.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 180px;
    border-radius: 8px;
}

/* Modal */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-animate {
    animation: modalSlideIn .25s ease forwards;
}

.overlay-animate {
    animation: modalFadeIn .2s ease forwards;
}



/* Notification badge */
@keyframes badgePop {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.1);
    }

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

.badge-animate {
    animation: badgePop .25s ease forwards;
}

/* Hover utilities — subtle */
.hover-lift {
    transition: box-shadow .2s ease;
}

.hover-lift:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* Stagger children */
.stagger-children>* {
    opacity: 0;
    animation: staggerIn .3s ease forwards;
}

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.stagger-children>*:nth-child(1) {
    animation-delay: .05s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: .1s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: .15s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: .2s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: .25s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: .3s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

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