/* ============================================
   TRANSFERFINN - Animations
   ============================================ */

/* ===== Fade In ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===== Slide Up ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* ===== Scale In ===== */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* ===== Slide Down (for dropdowns) ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Pulse (for waiting/loading) ===== */
@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ===== Progress Fill Animation ===== */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

/* ===== Shake (for errors) ===== */
@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-8px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(8px);
    }
}

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

/* ===== Bounce (for completion) ===== */
@keyframes bounce {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(0.95);
    }
}

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

/* ===== Rotate (for loading spinner) ===== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* ===== Scroll Trigger ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Typewriter (optional) ===== */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    50% {
        border-color: transparent;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--brand-primary);
    animation: typewriter 2s steps(30) forwards, blinkCursor 0.8s steps(2) infinite;
}

/* ===== Gradient Move (for loading) ===== */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-loading {
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent), var(--brand-primary));
    background-size: 200% 100%;
    animation: gradientMove 2s ease-in-out infinite;
}

/* ===== Float (for icons) ===== */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

/* ===== Ripple Effect (for buttons) ===== */
@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 0.5;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

/* ===== Toast Animation ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out;
    z-index: 9999;
    max-width: 400px;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* ===== File Upload Progress ===== */
@keyframes uploadPulse {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.upload-progress {
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent), var(--brand-primary));
    background-size: 200% 200%;
    animation: uploadPulse 1.5s ease-in-out infinite;
}
