/* Code widget — the minimum needed for a readable snippet block.
   Everything visual here is overridable by the widget's Style tab, whose
   colour controls all default to '' (plan 33 §2b) so this file, not an
   explicit default, is what a theme sees. */

.ractro-code-widget {
    position: relative;
    display: block;
}

.ractro-code-widget .ractro-code__bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 6px;
}

.ractro-code-widget .ractro-code__lang {
    margin-right: auto;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
}

.ractro-code-widget .ractro-code__copy {
    font: inherit;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.ractro-code-widget .ractro-code__copy:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* `pre` keeps the author's own line breaks and indentation — the entire point
   of the widget — so the default is NOT to wrap; long lines scroll instead.
   The Wrap Long Lines switch overrides this from the Style pipeline. */
.ractro-code-widget .ractro-code__pre {
    margin: 0;
    padding: 16px;
    overflow: auto;
    white-space: pre;
    tab-size: 4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.ractro-code-widget .ractro-code__code {
    font: inherit;
    color: inherit;
    background: none;
    padding: 0;
}
