.card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  animation: fadeInSlide 0.3s ease;
  margin: 0;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.cardHeaderWrapper {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.cardHeaderWrapper:hover {
  background: rgba(139, 92, 246, 0.05);
}

.cardHeaderTop {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
}

.cardIcon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  border-radius: 4px;
}

.thinkingIcon {
  color: white;
}

.headerInfo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.titleText {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.actionBadge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--accent-primary);
}

.tokenMeta {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.compactPreview {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  width: 100%;
}

.previewText {
  font-size: 0.625rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.previewReasoning {
  font-size: 0.625rem;
  line-height: 1.3;
  color: var(--text-tertiary);
  margin: 0;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.cardActions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.copyButton,
.expandButton {
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copyButton:hover,
.expandButton:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-primary);
}

.cardContent {
  padding: 0 0.875rem 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: expandDown 0.2s ease;
}

@keyframes expandDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

.section {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.sectionLabel {
  font-size: 0.688rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sectionContent {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  font-size: 0.688rem;
  font-weight: 500;
  color: var(--accent-primary);
}

.separator {
  color: var(--text-tertiary);
  margin: 0 0.5rem;
}

.toolName {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-weight: 500;
}
