/*
 * Code in lessons: Roboto Mono, the font the lesson Docs use for it. Bootstrap sets <code>, <pre>,
 * <kbd>, <samp> and .font-monospace from --bs-font-monospace, so changing that one variable covers
 * every one of them (the lesson text, the command lists, the editor's code fields).
 * Both layouts (_Layout, _LearnLayout) load Roboto Mono from Google Fonts next to their other fonts.
 */
:root {
    --bs-font-monospace: "Roboto Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/*
 * Inline code in lesson text and transcripts stands out from the words around it: a quiet tinted
 * background in place of Bootstrap's pink text. A code block (a fenced sample) is the same tint,
 * scrolls sideways instead of wrapping so indentation stays readable, and keeps its spacing.
 */
[data-md] code,
[data-code-text] code {
    padding: .1em .35em;
    border-radius: .25rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-size: .9em;
    word-break: normal;
    overflow-wrap: anywhere;
}

/* A sample keeps the tabs its Doc had, shown four columns wide (the browser's default is eight). */
[data-md] pre,
[data-md] pre code {
    tab-size: 4;
}

[data-md] pre {
    padding: .75rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    background: var(--bs-tertiary-bg);
    overflow-x: auto;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
}

[data-md] pre code {
    padding: 0;
    background: none;
    font-size: .875em;
    overflow-wrap: normal;
}
