.block {
  composes: segment from "./agentSegment.module.css";
}

.summary {
  composes: summary from "./agentSegment.module.css";
  justify-content: space-between;
}

.toolName {
  composes: summaryTitleGrow from "./agentSegment.module.css";
}

.status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  padding: 1px 5px;
  border-radius: 999px;
  background: #f6f8fa;
  color: #656d76;
}

.pending .status {
  color: #0969da;
  background: #ddf4ff;
}

.pending .status::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 3px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
  vertical-align: middle;
}

.success .status {
  color: #1a7f37;
  background: #dafbe1;
}

.error .status {
  color: #cf222e;
  background: #ffebe9;
}

.detail {
  composes: detail from "./agentSegment.module.css";
}

.args {
  margin: 4px 0 0;
  padding: 4px 6px;
  font-size: 11px;
  color: #656d76;
  background: #f6f8fa;
  border: 1px solid #e8ecf0;
  border-radius: 5px;
  font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);
  word-break: break-all;
  line-height: 1.35;
}

.markdownBody:global(.markdown-body) {
  font-size: 13px;
  line-height: 1.4;
  background: transparent;
  padding: 4px 0 0;
}

.markdownBody:global(.markdown-body) :global(p),
.markdownBody:global(.markdown-body) :global(ul),
.markdownBody:global(.markdown-body) :global(ol),
.markdownBody:global(.markdown-body) :global(blockquote),
.markdownBody:global(.markdown-body) :global(table),
.markdownBody:global(.markdown-body) :global(pre) {
  margin-top: 0;
  margin-bottom: 0.4em;
}

.markdownBody:global(.markdown-body) :global(p:last-child),
.markdownBody:global(.markdown-body) :global(pre:last-child) {
  margin-bottom: 0;
}

.markdownBody:global(.markdown-body) :global(pre) {
  padding: 6px 8px;
  font-size: 11px;
}

.diffPre,
.plainPre {
  margin: 4px 0 0;
  padding: 6px 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.35;
  font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);
  background: #f6f8fa;
  border: 1px solid #e8ecf0;
  border-radius: 5px;
  overflow-x: auto;
}

.diffPre :global(.diffAdd) {
  color: #1a7f37;
}

.diffPre :global(.diffDel) {
  color: #cf222e;
}

.diffPre :global(.diffMeta) {
  color: #656d76;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

@media (max-width: 768px) {
  .detail {
    max-height: min(180px, 28vh);
  }
}