.collapsed-group {
  margin: 4px 0;
}

.collapsed-group__summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--island-text-muted);
  font-size: 11px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}

.collapsed-group__summary:hover {
  background: var(--island-subtle);
  color: var(--island-text-secondary);
}

.collapsed-group__chevron {
  font-size: 8px;
  flex-shrink: 0;
}

.collapsed-group__badge {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
}

.collapsed-group__badge--thinking {
  background: rgba(0, 122, 255, 0.1);
  color: #2563eb;
}

.collapsed-group__badge--tool {
  background: rgba(255, 149, 0, 0.1);
  color: #f59e0b;
}

.collapsed-group__detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 4px 20px;
}

.collapsed-group__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 2px 0;
}

.collapsed-group__item--thinking {
  color: var(--island-text-muted);
}

.collapsed-group__item--tool {
  color: var(--island-text-secondary);
  flex-wrap: wrap;
}

.collapsed-group__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2563eb;
  opacity: 0.5;
  flex-shrink: 0;
}

.collapsed-group__tool-name {
  font-family: var(--font-mono, 'SF Mono', monospace);
  font-weight: 500;
}

.collapsed-group__check {
  color: #22c55e;
  font-size: 12px;
}

.collapsed-group__x {
  color: #dc2626;
  font-size: 12px;
}

.collapsed-group__spinner {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--island-text-muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.collapsed-group__diff {
  width: 100%;
  margin-top: 4px;
  max-height: 120px;
  overflow-y: auto;
  border-radius: 6px;
}

.collapsed-group__text {
  font-style: italic;
  opacity: 0.7;
}
