.error-card {
  gap: 8px;
  padding-bottom: 12px;
  --error-card-accent: var(--text-on-critical-base);
}

.error-card-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.error-card-body [data-component="icon"] {
  color: var(--error-card-accent);
  margin-top: 2px;
}

.error-card-message {
  flex: 1;
  min-width: 0;
  color: var(--text-strong);
  font-size: var(--font-size-base);
  line-height: var(--line-height-large);
  overflow-wrap: anywhere;
}

.error-card [data-component="collapsible"] {
  margin-top: 0;
  padding-left: 24px;
}

.error-card .error-details-trigger[data-slot="collapsible-trigger"] {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 2px;
  width: auto;
  height: 22px;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  opacity: 0.85;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--error-card-accent);
  padding: 0 6px;
}

.error-card .error-details-trigger[data-slot="collapsible-trigger"]:hover {
  background-color: color-mix(in srgb, var(--error-card-accent) 12%, transparent);
  opacity: 1;
}

.error-card .error-details-trigger[data-slot="collapsible-trigger"]:focus-visible {
  background-color: color-mix(in srgb, var(--error-card-accent) 12%, transparent);
  outline: 1px solid var(--border-focus);
  outline-offset: 2px;
}

.error-card .error-details-trigger [data-slot="collapsible-arrow"] {
  width: 16px;
  height: 16px;
  opacity: 1;
}

.error-card .error-details-trigger [data-slot="collapsible-arrow-icon"] {
  color: currentColor;
}

.error-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--font-size-small);
  margin-top: 8px;
}

.error-detail-pre {
  margin: 0;
  max-height: 120px;
  overflow-y: auto;
  background-color: color-mix(in srgb, var(--surface-inset-base) 82%, var(--background-base));
  border: 1px solid color-mix(in srgb, var(--border-critical-base) 30%, var(--border-weaker-base));
  border-radius: var(--radius-sm);
  color: var(--text-base);
  font-size: var(--font-size-small);
  line-height: var(--line-height-large);
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}
