/* streaming.css - Styling for streaming content in the Data-Driven Decision Support Tool */

/* Streaming animation container */
.streaming-container {
  position: relative;
  padding: 15px;
  background-color: rgba(248, 249, 250, 0.7);
  border-radius: 8px;
  margin: 15px 0;
}

/* Loading indicator */
.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Streaming text that appears to be typed */
.streaming-text {
  min-height: 50px;
  position: relative;
}

.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background-color: var(--primary-color);
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Stream status indicators */
.stream-status {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-top: 10px;
  display: flex;
  align-items: center;
}

.status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-connecting {
  background-color: var(--warning-color);
}

.status-active {
  background-color: var(--success-color);
}

.status-complete {
  background-color: var(--info-color);
}

.status-error {
  background-color: var(--danger-color);
}

/* Code stream */
.code-stream {
  font-family: "Courier New", Courier, monospace;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  margin: 15px 0;
  overflow-x: auto;
  position: relative;
}

/* Stream progressbar */
.stream-progress {
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  margin: 10px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Stream thinking indicator */
.thinking-indicator {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin: 10px 0;
}

.thinking-dots {
  display: inline-block;
  margin-left: 8px;
}

.thinking-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  margin: 0 2px;
  opacity: 0.7;
  animation: thinking 1.4s infinite;
}

.thinking-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinking {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .streaming-container {
    padding: 10px;
  }

  .code-stream {
    font-size: 0.85rem;
    padding: 10px;
  }
}