/* ========================================
 * Multi-Turn Conversation Styles
 * ======================================== */

/* Turn Badge in History List */
.cli-turn-badge {
  font-size: 0.5625rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Turns Container in Detail Modal */
.cli-turns-container {
  max-height: 60vh;
  overflow-y: auto;
}

/* Turn Section */
.cli-turn-section {
  margin-bottom: 1rem;
}

.cli-turn-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.cli-turn-number {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 9999px;
}

.cli-turn-status {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.cli-turn-status.status-success {
  background: hsl(var(--success) / 0.12);
  color: hsl(var(--success));
}

.cli-turn-status.status-error {
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
}

.cli-turn-status.status-timeout {
  background: hsl(var(--warning) / 0.12);
  color: hsl(var(--warning));
}

.cli-turn-duration {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

/* Turn Divider (legacy) */
.cli-turn-divider {
  border: none;
  border-top: 1px dashed hsl(var(--border));
  margin: 1.25rem 0;
}

/* Error Section (smaller in multi-turn) */
.cli-detail-error-section .cli-detail-error {
  max-height: 100px;
}

/* ========================================
 * Enhanced Multi-Turn Display
 * ======================================== */

/* Turn Section */
.cli-turn-section {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
}

.cli-turn-section.cli-turn-latest {
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.03);
}

/* Turn Header */
.cli-turn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cli-turn-marker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cli-turn-number {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--primary));
}

.cli-turn-latest-badge {
  font-size: 0.5625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  background: hsl(var(--success) / 0.12);
  color: hsl(var(--success));
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cli-turn-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.cli-turn-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cli-turn-time i,
.cli-turn-duration i {
  color: hsl(var(--muted-foreground) / 0.7);
}

/* Turn Body */
.cli-turn-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Section Labels */
.cli-prompt-section h4 {
  color: hsl(var(--primary));
}

.cli-prompt-section h4 i {
  color: hsl(var(--primary));
}

.cli-output-section h4 {
  color: hsl(var(--success));
}

.cli-output-section h4 i {
  color: hsl(var(--success));
}

/* Turn Connector (visual line between turns) */
.cli-turn-connector {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0;
}

.cli-turn-line {
  width: 2px;
  height: 1.5rem;
  background: linear-gradient(
    to bottom,
    hsl(var(--border)),
    hsl(var(--primary) / 0.3),
    hsl(var(--border))
  );
  border-radius: 1px;
}

/* Truncated Notice */
.cli-truncated-notice {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: hsl(var(--warning));
  margin-top: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: hsl(var(--warning) / 0.08);
  border-radius: 0.25rem;
}

.cli-truncated-notice i {
  flex-shrink: 0;
}

/* Turn Badge with Icon */
.cli-turn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cli-turn-badge i {
  width: 12px;
  height: 12px;
}

/* ========================================
 * Conversation View Toggle
 * ======================================== */

/* View Toggle Bar */
.cli-view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: hsl(var(--muted) / 0.3);
  border-radius: 0.5rem;
}

.cli-view-toggle .btn {
  flex: 1;
  justify-content: center;
}

.cli-view-toggle .btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

/* Concatenated Prompt Section */
.cli-concat-section {
  margin-top: 1rem;
}

.cli-concat-format-selector {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.cli-concat-format-selector .btn-xs {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
}

.cli-concat-output {
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Button Sizes */
.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  border-radius: 0.25rem;
}

