.Detail {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.Header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--theme-color-bg-3);
  flex-shrink: 0;
  background-color: var(--theme-color-bg-2);
}

.BackButton,
.PinButton {
  background: none;
  border: 1px solid var(--theme-color-bg-3);
  border-radius: 4px;
  color: var(--theme-color-fg-default);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;

  &:hover {
    background-color: var(--theme-color-bg-3);
  }
}

.Title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--theme-color-fg-default);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.Content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.Summary {
  background-color: var(--theme-color-bg-3);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.SummaryRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.Label {
  font-size: 11px;
  color: var(--theme-color-fg-default-shy);
  width: 64px;
  flex-shrink: 0;
}

.Value {
  font-size: 12px;
  color: var(--theme-color-fg-default);
}

.StatusBadge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 3px;

  &[data-status='success'] {
    color: var(--theme-color-success, #22c55e);
    background-color: color-mix(in srgb, var(--theme-color-success, #22c55e) 15%, transparent);
  }

  &[data-status='error'] {
    color: var(--theme-color-danger, #ef4444);
    background-color: color-mix(in srgb, var(--theme-color-danger, #ef4444) 15%, transparent);
  }

  &[data-status='running'] {
    color: var(--theme-color-notice, #f59e0b);
    background-color: color-mix(in srgb, var(--theme-color-notice, #f59e0b) 15%, transparent);
  }
}

.Section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.SectionTitle {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-color-fg-default);
  display: flex;
  align-items: center;
  gap: 6px;
}

.StepCount {
  font-size: 10px;
  font-weight: 400;
  color: var(--theme-color-fg-default-shy);
  background-color: var(--theme-color-bg-3);
  padding: 1px 5px;
  border-radius: 10px;
}

.ErrorPre,
.DataPre,
.StackPre {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: var(--theme-color-fg-default);
  background-color: var(--theme-color-bg-1);
  border: 1px solid var(--theme-color-bg-3);
  border-radius: 3px;
  padding: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
}

.ErrorPre {
  color: var(--theme-color-danger, #ef4444);
  border-color: var(--theme-color-danger, #ef4444);
}

.StackDetails {
  summary {
    font-size: 11px;
    color: var(--theme-color-fg-default-shy);
    cursor: pointer;
    padding: 4px 0;
  }
}

.Loading,
.Error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--theme-color-fg-default-shy);
  font-size: 13px;
}

.Error {
  color: var(--theme-color-danger, #ef4444);
}
