/* Visual baseline: deepsuite `@deepseek/md` code-block.css. Highlight colors
   stay on the existing shiki `--shiki-*` sheet (not Prism highlight.css). */

.block {
  --dsl-code-block-banner-background-color: var(--dsw-alias-markdown-code-block-banner);
  --dsl-code-block-border-radius: 12px;
  --dsl-code-block-banner-font: var(--dsw-font-xs-13);
  --dsl-code-block-content-font: var(--dsw-font-markdown-code-block);

  position: relative;
  margin: 16px 0;
  color: var(--dsw-alias-label-primary);
  background: var(--dsw-alias-markdown-code-block);
  border-radius: var(--dsl-code-block-border-radius);
}

.block:not(:last-child) {
  margin-bottom: 11px;
}

.bannerWrap {
  position: sticky;
  top: 0;
  z-index: 6;
  background-color: var(--dsw-alias-bg-base);
  border-top-left-radius: var(--dsl-code-block-border-radius);
  border-top-right-radius: var(--dsl-code-block-border-radius);
}

.banner {
  background: var(--dsl-code-block-banner-background-color);
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font: var(--dsl-code-block-banner-font);
  border-top-left-radius: var(--dsl-code-block-border-radius);
  border-top-right-radius: var(--dsl-code-block-border-radius);
}

.infostring {
  color: var(--dsw-alias-label-primary);
  font-family: var(--ds-font-family-code);
  font-size: 12px;
  line-height: 18px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.copyButton {
  background-color: rgb(255 255 255 / 0);
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.block :where(pre) {
  font: var(--dsl-code-block-content-font);
  padding: 16px;
  margin: 0 !important;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--dsw-alias-markdown-code-block);
  /* Bottom radii live on <pre>: overflow:hidden on .block would kill the
     sticky banner, and this opaque fill otherwise squares off the wrapper. */
  border-bottom-left-radius: var(--dsl-code-block-border-radius);
  border-bottom-right-radius: var(--dsl-code-block-border-radius);
}

/* Shiki inlines its theme background var; route it to the repo token. */
.block :where(pre.shiki) {
  background: var(--dsw-alias-markdown-code-block) !important;
}

.block :where(pre) code {
  font: inherit;
  background: none;
  padding: 0;
}

.plain {
  color: var(--dsw-alias-label-primary);
}
