/* Bloco de codigo (estilo Bookstack): sem cabecalho, botao pequeno no
   cantinho do proprio bloco, NUMERACAO de linhas (Prism line-numbers) e
   QUEBRA DE LINHA — sem rolagem horizontal. Paleta GitHub Dark. */

/* o pre NU ja nasce certo, mesmo antes do JS embrulhar */
body.single-post main pre,
body.single-post article pre,
.single-post .entry-content pre {
  position: relative;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.6;
  tab-size: 2;
  white-space: pre-wrap;         /* quebra: sem scrollbar horizontal */
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: visible;
}
body.single-post main pre code,
.single-post .entry-content pre code {
  display: block;
  color: #c9d1d9;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
}

/* wrapper do JS: mesma caixa, sem barra */
.abn-codeblock { position: relative; margin: 18px 0; }
.abn-codeblock pre { margin: 0; }

/* botao flutuante pequeno no canto do bloco */
.abn-codeblock-copy {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 2;
  padding: 3px 7px;
  font-size: 13px;
  border: 1px solid rgba(240,246,252,.14);
  border-radius: 5px;
  background: rgba(110,118,129,.22);
  color: #8b949e;
  font-size: 10.5px;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  opacity: .75;
  transition: all .12s ease;
}
.abn-codeblock-copy:hover { opacity: 1; color: #e6edf3; background: rgba(110,118,129,.4); }
.abn-codeblock-copy.copiado { color: #4ade80; border-color: rgba(74,222,128,.5); background: rgba(74,222,128,.12); opacity: 1; }

/* numeração de linhas (regras do plugin Prism line-numbers, cores dark) */
pre[class*="language-"].line-numbers { position: relative; padding-left: 3.4em; counter-reset: linenumber; }
pre[class*="language-"].line-numbers > code { position: relative; white-space: inherit; }
.line-numbers .line-numbers-rows {
  position: absolute; pointer-events: none; top: 0; font-size: 100%;
  left: -3.4em; width: 2.6em; letter-spacing: -1px;
  border-right: 1px solid #30363d;
  -webkit-user-select: none; user-select: none;
}
.line-numbers-rows > span { display: block; counter-increment: linenumber; }
.line-numbers-rows > span:before { content: counter(linenumber); color: #484f58; display: block; padding-right: 0.8em; text-align: right; }

/* tokens Prism — paleta GitHub Dark */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #8b949e; }
.token.punctuation { color: #c9d1d9; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #ff7b72; }
.token.boolean, .token.number { color: #79c0ff; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #a5d6ff; }
.token.operator, .token.entity, .token.url { color: #ff7b72; }
.token.atrule, .token.attr-value, .token.keyword { color: #ff7b72; }
.token.function, .token.class-name { color: #d2a8ff; }
.token.regex, .token.important, .token.variable { color: #ffa657; }
