/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 10px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 10px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 6px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 6px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 10px 10px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 9px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 9px 0;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 10px 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }
