/* Fortschrittsanzeige: Kreisdiagramm im Header und Schrittleiste */

/* Indikator-Container im Chat-Header */
.progress-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px;
  flex-shrink: 0;
}

.progress-score-container {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.progress-score-container:hover {
  transform: scale(1.1);
}

/* Schrittfortschrittsleiste (Glasmorphism-Effekt, dunkelrot) */
.step-progress-bar {
  width: 100%;
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(60, 20, 20, 0.4),
    rgba(80, 25, 25, 0.3),
    rgba(60, 20, 20, 0.4)
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(100, 30, 30, 0.3);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

.step-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(100, 20, 20, 0.7),
    rgba(139, 0, 0, 0.85),
    rgba(120, 25, 25, 0.8)
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 15px rgba(139, 0, 0, 0.5),
    0 0 30px rgba(100, 20, 20, 0.3),
    inset 0 1px 0 rgba(255, 100, 100, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 0 2px 2px 0;
}

.step-progress-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 150, 150, 0.15),
    transparent
  );
  border-radius: 0 2px 0 0;
}

.step-progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(180, 60, 60, 0.6),
    rgba(255, 100, 100, 0.4)
  );
  animation: pulse-glow 2s ease-in-out infinite;
  filter: blur(1px);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Kreis-SVG */
.progress-ring {
  transform: rotate(0deg);
}

.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.progress-ring-fill {
  stroke: var(--color-primary, #58a6ff);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.progress-ring-fill.data-fill {
  stroke: #3fb950;
}

.progress-score-text {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-fg-default, #e6edf3);
  text-align: center;
  line-height: 1;
}

/* Farbzustände nach Füllgrad */
.progress-score-container[data-level="low"] .progress-ring-fill {
  stroke: #f85149;
}

.progress-score-container[data-level="medium"] .progress-ring-fill {
  stroke: #d29922;
}

.progress-score-container[data-level="high"] .progress-ring-fill {
  stroke: #3fb950;
}

.progress-score-container[data-level="complete"] .progress-ring-fill {
  stroke: #58a6ff;
  filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.5));
}

/* Detail-Modal: Inhalt */
.progress-details {
  text-align: center;
  padding: 8px 0;
}

/* Flow-Badge im Modal */
.progress-flow-info {
  margin-bottom: 16px;
}

.flow-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(147, 197, 253, 0.15) 100%);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

/* Doppelte Punktezahl im Modal */
.progress-dual-scores {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-score-item {
  text-align: center;
  min-width: 120px;
}

.progress-score-value {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1;
}

.progress-score-value.step {
  color: #ef4444;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.progress-score-value.data {
  color: #22c55e;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.progress-score-label {
  font-size: 11px;
  color: var(--color-fg-subtle);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.progress-score-large {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-primary, #58a6ff);
  margin-bottom: 8px;
}

.progress-subtitle {
  font-size: 14px;
  color: var(--color-fg-subtle);
  margin-bottom: 20px;
}

/* Detail-Abschnitte im Modal */
.progress-section {
  text-align: left;
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-section h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-fg-default);
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 150px;
  overflow-y: auto;
}

.progress-section ul li {
  font-size: 13px;
  padding: 8px 10px;
  color: var(--color-fg-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
}

.progress-section ul li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.progress-section ul li:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Modal-Breite für das Fortschritts-Detail-Modal */
.modal-small:has(.progress-details) {
  max-width: 480px;
}

/* Tablet (bis 640px) */
@media (max-width: 640px) {
  .progress-indicators {
    margin: 0 4px;
  }

  .progress-score-container {
    width: 30px;
    height: 30px;
  }

  .progress-ring {
    width: 30px;
    height: 30px;
  }
}

/* Mobil (bis 480px) */
@media (max-width: 480px) {
  .progress-indicators {
    margin: 0 2px;
  }

  .progress-score-container {
    width: 26px;
    height: 26px;
  }

  .progress-ring {
    width: 26px;
    height: 26px;
  }

  .progress-dual-scores {
    flex-direction: column;
    gap: 20px;
    padding: 16px;
  }

  .progress-score-item {
    min-width: auto;
  }

  .progress-score-value {
    font-size: 36px;
  }

  .progress-section {
    padding: 12px;
  }

  .progress-section ul {
    max-height: 120px;
  }

  .progress-section ul li {
    font-size: 12px;
    padding: 6px 8px;
  }
}
