/* ==========================================================================
   ANIMATIONS & MICRO-INTERACTIONS - LANGKISAU PANGKAS ONLINE
   ========================================================================== */

/* Smooth Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(180, 83, 9, 0);
    }
}

.animate-pulse-glow {
    animation: pulseGlow 2.5s infinite;
}

/* Audio Waveform Bars Animation */
@keyframes soundWave {
    0%, 100% {
        height: 6px;
    }
    50% {
        height: 24px;
    }
}

.audio-bar {
    width: 3px;
    background: currentColor;
    border-radius: 9999px;
    display: inline-block;
    transition: height 0.2s ease;
}

.audio-playing .audio-bar:nth-child(1) { animation: soundWave 0.8s ease-in-out infinite 0.1s; }
.audio-playing .audio-bar:nth-child(2) { animation: soundWave 0.8s ease-in-out infinite 0.3s; }
.audio-playing .audio-bar:nth-child(3) { animation: soundWave 0.8s ease-in-out infinite 0.2s; }
.audio-playing .audio-bar:nth-child(4) { animation: soundWave 0.8s ease-in-out infinite 0.4s; }
.audio-playing .audio-bar:nth-child(5) { animation: soundWave 0.8s ease-in-out infinite 0.15s; }
.audio-playing .audio-bar:nth-child(6) { animation: soundWave 0.8s ease-in-out infinite 0.35s; }
.audio-playing .audio-bar:nth-child(7) { animation: soundWave 0.8s ease-in-out infinite 0.25s; }

/* Subtle Floating Effect */
@keyframes floatGentle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

.animate-float {
    animation: floatGentle 4s ease-in-out infinite;
}

/* Shimmer Loading or Highlight */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer-badge {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Toast Slide In */
@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.toast-show {
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
