/* ── Shared collapsible trace shell ──────────────────────────────────────────
   Used by tool-trace, voice-trace, mind-trace, and any future trace type.
   Per-type outer wrappers (.msg-tool, .msg-voice-trace, etc.) stay in their
   own CSS files — only the internal collapsible structure is shared here.    */

.trace-shell {
  display: flex;
  flex-direction: column;
}

.trace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  line-height: 1.4;
  user-select: none;
}

.trace-label {
  flex: 1;
  min-width: 0;
}

/* CSS chevron — rotates on expand */
.trace-arrow {
  flex-shrink: 0;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid color-mix(in oklch, var(--bc) 40%, transparent);
  border-bottom: 1.5px solid color-mix(in oklch, var(--bc) 40%, transparent);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin-top: 5px;
}

.trace-arrow.expanded {
  transform: rotate(45deg);
}

.trace-body {
  margin-top: 0.35rem;
}

.trace-body.hidden {
  display: none;
}
