/**
 * ACTIVE PROCESSING CORE
 * Animierte "Energie"-Karte während Backend-Verarbeitung
 * Features: Gradient Mesh Animation, Terminal-Style Status, Pulsierendes Brain Icon
 */

.feed-item.processing {
  /* Entferne statischen Hintergrund */
  background: transparent;
  
  /* Container für Animation */
  position: relative;
  overflow: hidden;
  
  border-radius: 16px;
  padding: 0;
  
  /* Kein Border - Gradient ist der Fokus */
  border: none;
  
  /* Erhöhter Schatten für "schwebenden" Effekt */
  box-shadow: var(--shadow-lg);
}

/* ================================ */
/* ANIMATED GRADIENT MESH BACKGROUND */
/* ================================ */

.feed-item.processing::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  
  /* Warmer Gold/Amber Gradient */
  background: var(--status-processing-gradient);
  
  /* Infinite Rotation für "Energie"-Effekt */
  animation: processingEnergy var(--timing-energy) linear infinite;
  
  z-index: 0;
}

/* Alternative: Wellenform-Animation (kann umgeschaltet werden) */
.feed-item.processing::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  right: -100%;
  bottom: 0;
  
  background: repeating-linear-gradient(
    90deg,
    transparent 0%,
    rgba(230, 184, 125, 0.1) 25%,
    rgba(212, 140, 68, 0.2) 50%,
    rgba(230, 184, 125, 0.1) 75%,
    transparent 100%
  );
  
  animation: processingWave 3s linear infinite;
  
  z-index: 1;
  opacity: 0.6;
}

@keyframes processingEnergy {
  0% {
    transform: rotate(0deg) scale(1.5);
  }
  100% {
    transform: rotate(360deg) scale(1.5);
  }
}

@keyframes processingWave {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* ================================ */
/* CONTENT CONTAINER */
/* ================================ */

.feed-item.processing .processing-content {
  position: relative;
  z-index: 2;
  
  padding: 20px;
  
  /* Leicht transparentes Overlay für bessere Lesbarkeit */
  background: rgba(10, 10, 10, 0.3);
  backdrop-filter: blur(8px);
  
  border-radius: 16px;
  
  min-height: 140px;
  
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ================================ */
/* FILENAME - Monospace Technical */
/* ================================ */

.processing-filename {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  
  /* Glow-Effekt */
  text-shadow: 0 0 10px rgba(230, 184, 125, 0.3);
  
  /* Truncate lange Namen */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================ */
/* TERMINAL STATUS OUTPUT */
/* ================================ */

.processing-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  
  flex: 1;
}

.processing-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 12px;
  color: var(--accent-warm-grey);
  
  /* Typing Animation für neue Lines */
  animation: terminalFadeIn 0.3s ease-out;
}

.processing-status-line.active {
  color: var(--accent-gold-primary);
  font-weight: 500;
}

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

.processing-status-line::before {
  content: '>';
  color: var(--accent-amber-glow);
  font-weight: 700;
}

/* ================================ */
/* PULSING BRAIN ICON */
/* ================================ */

.processing-brain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  width: 18px;
  height: 18px;
  
  animation: brainPulse 1.5s ease-in-out infinite;
}

.processing-brain-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--accent-gold-primary);
  filter: drop-shadow(0 0 4px rgba(230, 184, 125, 0.6));
}

@keyframes brainPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

/* ================================ */
/* PROGRESS INDICATOR (Optional) */
/* ================================ */

.processing-progress {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.processing-progress-bar {
  height: 100%;
  background: var(--accent-gold-primary);
  border-radius: 2px;
  
  /* Indeterminate Animation */
  animation: progressIndeterminate 1.5s ease-in-out infinite;
  
  transform-origin: left;
}

@keyframes progressIndeterminate {
  0% {
    transform: translateX(-100%) scaleX(0.3);
  }
  50% {
    transform: translateX(50%) scaleX(0.5);
  }
  100% {
    transform: translateX(200%) scaleX(0.3);
  }
}

/* ================================ */
/* MOBILE RESPONSIVENESS */
/* ================================ */

@media (max-width: 480px) {
  .feed-item.processing .processing-content {
    padding: 16px;
    min-height: 120px;
  }
  
  .processing-filename {
    font-size: 13px;
  }
  
  .processing-status-line {
    font-size: 11px;
  }
  
  .processing-brain-icon {
    width: 16px;
    height: 16px;
  }
}
