/* blog-code.css
   Code-block typography for single blog posts only.
   Enqueued conditionally via gerrydev_enqueue_scripts() in functions.php
   (is_singular('post')) so non-post pages don't pay the cost.
*/

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-v24-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-v24-latin-700.woff2") format("woff2");
}

/* Block code: <pre><code>...</code></pre> or bare <pre>...</pre>.
   Force LTR direction so code reads correctly inside the RTL article. */
pre.wp-block-code {
  border-left: 6px solid #e67e22;
  direction: ltr;
  text-align: left;
  font-family:
    "JetBrains Mono", "Open Sans", ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
  tab-size: 2;
  background: #2c3e50;
  color: #f1f5f9;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  -webkit-text-size-adjust: 100%;
}

pre.wp-block-code code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  border: 0;
  white-space: pre;
}

/* Inline code: <p>... <code>foo</code> ...</p>.
   unicode-bidi: isolate keeps Latin tokens from reordering in the RTL paragraph. */
pre.wp-block-code code {
  direction: ltr;
  unicode-bidi: isolate;
  font-family:
    "JetBrains Mono", "Open Sans", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
  /* background: #eef2f6; */
  color: #eef2f6;
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 600px) {
  pre.wp-block-code {
    font-size: 14px;
    padding: 14px 16px;
    margin: 18px 0;
    border-radius: 6px;
  }
  pre.wp-block-code code {
    font-size: 0.9em;
  }
}
