// Code block styles

:root {
  --ifm-code-font-size: 0.875rem;
  --docusaurus-highlighted-code-line-bg: rgba(34, 138, 150, 0.2);
  --ifm-code-background: rgba(0, 0, 0, 0.05);
  --ifm-code-border-radius: 3px;
  --ifm-code-padding-horizontal: 0.35rem;
  --ifm-code-padding-vertical: 0.1rem;
}

// Inline code
code {
  font-family: 'DM Mono', var(--ifm-font-family-monospace);
  background: var(--ifm-code-background);
  border: none;
  font-weight: 400;
  font-size: 0.9em;
  color: var(--ifm-font-color-base);
}

// Code blocks
pre,
.prism-code {
  font-family: 'DM Mono', var(--ifm-font-family-monospace);
}

pre code {
  background: transparent;
}

.prism-code {
  font-size: 0.875rem;
  line-height: 1.6;
}

// Code block container
div[class*='codeBlockContainer'] {
  border-radius: var(--ifm-global-radius);
  box-shadow: none;
  border: 1px solid var(--ifm-global-border-color);
  margin-bottom: var(--space-md);
}

// Code block title
div[class*='codeBlockTitle'] {
  border-bottom: 1px solid var(--ifm-global-border-color);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--custom-background-color-diff);
}

// Error line highlighting
.code-block-error-line {
  background-color: rgba(239, 68, 68, 0.15);
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
  border-left: 3px solid #ef4444;
}
