/* =============================================================================
 * AI Panel: chat messages area
 * Ported from scitex-cloud global-ai-chat/04-chat-messages.css
 * ============================================================================= */

.stx-shell-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.4rem;
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  min-height: 0;
  user-select: text;
  -webkit-user-select: text;
}

/* Message bubbles */
.stx-shell-ai-msg {
  max-width: 95%;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  line-height: 1.2;
  word-wrap: break-word;
  white-space: pre-line;
}

.stx-shell-ai-msg.user {
  align-self: flex-end;
  background: var(--color-accent-subtle, rgba(9, 105, 218, 0.15));
  border: 1px solid var(--color-accent-muted, rgba(9, 105, 218, 0.3));
  color: var(--text-primary);
}

.stx-shell-ai-msg.assistant {
  align-self: flex-start;
  background: var(--bg-tertiary, var(--workspace-bg-tertiary, #0d1117));
  border: 1px solid var(--border-default, #30363d);
  color: var(--text-primary);
}

.stx-shell-ai-msg.error {
  align-self: center;
  background: rgba(207, 34, 46, 0.1);
  border: 1px solid rgba(207, 34, 46, 0.3);
  color: var(--color-danger-fg, #cf222e);
  font-size: 0.75rem;
}

/* Typing indicator */
.stx-shell-ai-typing {
  align-self: flex-start;
  font-size: 0.8125rem;
  color: var(--text-secondary, #8b949e);
  font-style: italic;
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary, #0d1117);
  border: 1px solid var(--border-default, #30363d);
  border-radius: 6px;
}

.stx-shell-ai-typing::after {
  content: "";
  animation: ai-typing-dots 1.5s steps(1) infinite;
}

@keyframes ai-typing-dots {
  0% {
    content: ".";
  }
  33% {
    content: "..";
  }
  66% {
    content: "...";
  }
}

/* Empty state */
.stx-shell-ai-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.5rem;
  color: var(--text-muted, #8b949e);
  font-size: 0.8125rem;
  text-align: center;
  padding: 2rem;
  opacity: 0.7;
}

.stx-shell-ai-empty i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
