/**
 * Schweißnahttool - Animation Components
 * Professional feedback animations and micro-interactions
 * 
 * Contains:
 * - Calculation feedback animations
 * - Light pulse effects for user interaction feedback
 * - Micro-interaction animations ≤80ms for professional feel
 */

/* ==============================================
   CALCULATION FEEDBACK ANIMATIONS
   ============================================== */

/* Calculating state animation */
.calculating {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ==============================================
   LIGHT PULSE EFFECTS
   ============================================== */

/* Light pulse effect container */
.light-pulse {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
}

/* Light pulse animation keyframes */
@keyframes lightPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Blue pulse effect - Engineering calculation feedback */
.blue {
    background: radial-gradient(circle, #3b82f688, transparent 70%);
    animation: lightPulse 0.8s ease-out forwards;
}

/* Purple pulse effect - Advanced calculation feedback */
.purple {
    background: radial-gradient(circle, #8b5cf688, transparent 70%);
    animation: lightPulse 0.8s ease-out forwards;
}

/* ==============================================
   ADVANCED PROFESSIONAL ANIMATIONS
   ============================================== */

/* Enhanced animations from original inline CSS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes expandCard {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes fadeInOverlay {
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Results visibility animation */
.results-visible {
  animation: fadeInUp 0.5s ease-out;
}

/* Card expansion overlay */
.card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  z-index: 999;
  opacity: 0;
  animation: fadeInOverlay 0.3s ease-out forwards;
}

/* Enhanced card expansion animation */
.compact-result-card.expanded {
  animation: expandCard 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional input validation shake */
.form-input.invalid {
  animation: shake 0.5s ease-in-out;
}

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

@media (prefers-reduced-motion: reduce) {
    .calculating {
        animation: none;
        opacity: 0.8;
    }
    
    .light-pulse {
        display: none;
    }
    
    .blue,
    .purple {
        animation: none;
        opacity: 0.5;
    }
    
    .results-visible,
    .compact-result-card.expanded,
    .form-input.invalid {
        animation: none;
    }
    
    .card-overlay {
        animation: none;
        opacity: 0.5;
    }
    
    .utilization-calculating,
    .utilization-blurring,
    .utilization-revealing {
        filter: none !important;
        transform: none !important;
        animation: none !important;
    }
    
    .results-panel.calculating {
        box-shadow: var(--shadow-lg);
        animation: none;
    }
    
    .calculation-particles::before,
    .calculation-particles::after {
        display: none;
    }
}