/* animations.css - Hiệu ứng giao diện cho PWA */

/* =========================================================================
   KEYFRAMES
   ========================================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rippleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* =========================================================================
   UTILITY CLASSES
   ========================================================================= */

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* =========================================================================
   STAGGERED ANIMATIONS
   ========================================================================= */

/* Use staggered delays for items appearing in sequence */
.stagger-1 { animation-delay: 50ms; opacity: 0; }
.stagger-2 { animation-delay: 100ms; opacity: 0; }
.stagger-3 { animation-delay: 150ms; opacity: 0; }
.stagger-4 { animation-delay: 200ms; opacity: 0; }
.stagger-5 { animation-delay: 250ms; opacity: 0; }

/* =========================================================================
   HOVER & ACTIVE EFFECTS
   ========================================================================= */

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

.hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hover-scale:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   RIPPLE EFFECT (MDB-style)
   ========================================================================= */

.ripple-container {
    position: relative;
    overflow: hidden;
    /* Required for child absolute positioning */
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
}
