/* /home/user-data/www/default/assets/css/animations.css */
/* Consolidated animations - removes duplicates from all other CSS files */

/* ============================================ */
/* KEYFRAME ANIMATIONS */
/* ============================================ */

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

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

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

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

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -6px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -3px, 0);
    }
    90% {
        transform: translate3d(0, -1px, 0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(254, 202, 87, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(254, 202, 87, 0.8), 0 0 30px rgba(254, 202, 87, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================ */
/* ANIMATION CLASSES */
/* ============================================ */

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

.fade-out {
    animation: fadeOut 0.3s ease-in-out;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

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

.slide-in-up {
    animation: slideInUp 0.4s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.4s ease-out;
}

.bounce {
    animation: bounce 0.6s ease-out;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================ */
/* TRANSITION CLASSES */
/* ============================================ */

.transition-fast {
    transition: all 0.15s ease;
}

.transition-normal {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transition-colors {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ============================================ */
/* HOVER EFFECTS */
/* ============================================ */

.hover-lift:hover {
    transform: translateY(-2px);
}

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

.hover-shrink:hover {
    transform: scale(0.95);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-fade:hover {
    opacity: 0.8;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(254, 202, 87, 0.6);
}

/* ============================================ */
/* LOADING ANIMATIONS */
/* ============================================ */

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.loading-bar {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 4px;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(254, 202, 87, 0.8), transparent);
    animation: loadingBar 1.5s infinite;
}

@keyframes loadingBar {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

/* ============================================ */
/* CONTAINER TRANSITIONS */
/* ============================================ */

.container-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.container-hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.container-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================ */
/* RESPONSIVE ANIMATION CONTROLS */
/* ============================================ */

@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .hover-lift:hover {
        transform: translateY(-1px);
    }
    
    .hover-grow:hover {
        transform: scale(1.02);
    }
    
    .pulse {
        animation-duration: 3s; /* Slower on mobile */
    }
}

/* ============================================ */
/* ACCESSIBILITY - REDUCED MOTION */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in,
    .fade-out,
    .slide-in-left,
    .slide-in-right,
    .slide-in-up,
    .slide-in-down,
    .pulse,
    .spin,
    .bounce,
    .shake,
    .glow,
    .float {
        animation: none !important;
    }
    
    .hover-lift:hover,
    .hover-grow:hover,
    .hover-shrink:hover,
    .hover-rotate:hover {
        transform: none !important;
    }
}
