/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */

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

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Shake (für Validierungsfehler) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

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

.animate-slide-right {
    animation: slideInRight 0.3s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.3s ease forwards;
}

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

.animate-scale {
    animation: scaleIn 0.2s ease forwards;
}

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

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

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

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

.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hover-grow {
    transition: transform var(--transition-fast);
}

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

/* ========================================
   LOADING STATES
   ======================================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   STEP TRANSITIONS
   ======================================== */

.wizard__step {
    will-change: opacity, transform;
}

.wizard__step.entering {
    animation: slideInRight 0.3s ease forwards;
}

.wizard__step.leaving {
    animation: fadeIn 0.2s ease reverse forwards;
}

/* ========================================
   PRICE UPDATE ANIMATION
   ======================================== */

@keyframes priceUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--color-success);
    }
    100% {
        transform: scale(1);
    }
}

.price-updated {
    animation: priceUpdate 0.4s ease;
}

/* ========================================
   CHECKBOX ANIMATIONS
   ======================================== */

.checkbox-item {
    will-change: transform, background-color;
}

.checkbox-item__checkbox {
    will-change: transform, background-color;
}

.checkbox-item.checked .checkbox-item__checkbox {
    animation: scaleIn 0.2s ease;
}
