/* isdp/web/src/components/thread/MessageCard.css */
.message-card {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  max-width: 80%;
}

.message-user {
  background-color: #007bff;
  color: white;
  margin-left: auto;
  text-align: right;
}

.message-agent {
  background-color: #ffffff;
  color: #333;
  margin-right: auto;
}

.message-header {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.85em;
}

.agent-name {
  font-weight: 600;
}

.agent-role {
  color: #666;
}

.message-content {
  white-space: pre-wrap;
  word-break: break-word;
}

.streaming-cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ========== 深色主题适配 ========== */

[data-theme='dark'] .message-agent {
  background-color: var(--bg-container);
  color: var(--text-primary);
}

[data-theme='dark'] .agent-name {
  color: var(--text-primary);
}

[data-theme='dark'] .agent-role {
  color: var(--text-secondary);
}