.card {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 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(245, 158, 11, 0.4);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.statusSuccess {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}

.statusSuccess:hover {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.statusError {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.statusError:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Pending approval state */
.statusPendingApproval {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.2);
}

.statusPendingApproval: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(245, 158, 11, 0.05);
}

.statusSuccess .cardHeaderWrapper:hover {
  background: rgba(34, 197, 94, 0.05);
}

.statusError .cardHeaderWrapper:hover {
  background: rgba(239, 68, 68, 0.05);
}

.statusPendingApproval .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: var(--status-warning);
  border-radius: 4px;
}

.statusSuccess .cardIcon {
  background: var(--status-success);
}

.statusError .cardIcon {
  background: var(--status-error);
}

.statusPendingApproval .cardIcon {
  background: rgba(139, 92, 246, 0.8);
}

.toolIcon {
  color: white;
}

.titleText {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.apiKeyMissing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: 600;
  color: #ef4444;
  font-family: -apple-system, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.apiKeyMissing:hover {
  color: #dc2626;
}

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

.argItem {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.625rem;
  line-height: 1.2;
  font-family: 'JetBrains Mono', monospace;
  width: 100%;
}

.argKey {
  font-weight: 600;
  color: var(--text-tertiary);
  flex-shrink: 0;
  font-size: 0.625rem;
}

.argValue {
  color: var(--text-secondary);
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.625rem;
}

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

.statusBadge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.188rem 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  font-size: 0.688rem;
  font-weight: 500;
  color: var(--status-warning);
  white-space: nowrap;
}

.statusSuccess .statusBadge {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--status-success);
}

.statusError .statusBadge {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--status-error);
}

.statusPendingApproval .statusBadge {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: rgba(139, 92, 246, 0.9);
}

/* Confirm buttons */
.confirmActions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.allowBtn,
.denyBtn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.188rem 0.625rem;
  border-radius: 10px;
  font-size: 0.688rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.4;
}

.allowBtn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--status-success);
}

.allowBtn:hover:not(:disabled) {
  background: var(--status-success);
  color: white;
}

.denyBtn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--status-error);
}

.denyBtn:hover:not(:disabled) {
  background: var(--status-error);
  color: white;
}

.allowBtn:disabled,
.denyBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.statusIcon {
  flex-shrink: 0;
}

.spinner {
  animation: spin 1s linear infinite;
}

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

.successIcon {
  color: var(--status-success);
}

.errorIcon {
  color: var(--status-error);
}

.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;
}

.stopButton {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  color: var(--status-error);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stopButton:hover {
  background: var(--status-error);
  border-color: var(--status-error);
  color: white;
}

.stopButton:active {
  transform: scale(0.95);
}

.copyButton:hover,
.expandButton:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--status-warning);
}

.statusSuccess .copyButton:hover,
.statusSuccess .expandButton:hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--status-success);
}

.statusError .copyButton:hover,
.statusError .expandButton:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-error);
}

.statusPendingApproval .copyButton:hover,
.statusPendingApproval .expandButton:hover {
  background: rgba(139, 92, 246, 0.1);
  color: rgba(139, 92, 246, 0.8);
}

.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;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.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;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.streamingLabel {
  font-size: 0.625rem;
  color: var(--status-error);
  font-weight: 500;
  text-transform: none;
}

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

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

.codeBlock {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.625rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.688rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.codeBlock code {
  display: block;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent-primary);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

.progressBar {
  width: 100%;
  height: 3px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progressBarFill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--status-warning), transparent);
  animation: progress 1.5s ease-in-out infinite;
}

@keyframes progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300%);
  }
}

/* Expanded arguments display */
.argsExpanded {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.argItemExpanded {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.argKeyExpanded {
  font-size: 0.688rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.argValueExpanded {
  font-size: 0.688rem;
  line-height: 1.4;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.375rem 0.5rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 150px;
  overflow-y: auto;
}

/* Findings and steps lists */
.findingsList,
.stepsList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.findingItem,
.stepItem {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 0.375rem 0.5rem;
  background: rgba(245, 158, 11, 0.05);
  border-left: 2px solid var(--status-warning);
  border-radius: 0 4px 4px 0;
}

.statusSuccess .findingItem,
.statusSuccess .stepItem {
  background: rgba(34, 197, 94, 0.05);
  border-left-color: var(--status-success);
}

.statusError .findingItem,
.statusError .stepItem {
  background: rgba(239, 68, 68, 0.05);
  border-left-color: var(--status-error);
}

.stepItem {
  background: rgba(59, 130, 246, 0.05);
  border-left-color: var(--accent-primary);
}

.statusSuccess .stepItem {
  background: rgba(59, 130, 246, 0.05);
  border-left-color: var(--accent-primary);
}

.statusError .stepItem {
  background: rgba(59, 130, 246, 0.05);
  border-left-color: var(--accent-primary);
}
