@import url("../css/blitz-help.css");

/* Language-reference layout. Colours come from the shared help token file. */
body.nav {
    max-width: none;
    margin: 0;
    padding: 10px;
    background: var(--b3d-help-panel);
}

body.nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.nav li a {
    display: block;
    padding: 4px 6px;
}

body.nav h2 {
    margin: 14px 6px 5px;
    padding: 0;
    border: 0;
    font-size: 12px;
}

/* Present legacy reference pages with the same content rhythm as the guides. */
body:not(.nav) > blockquote {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

body:not(.nav) > blockquote > blockquote {
    margin-right: 0;
    margin-left: 0;
}

/* Some classic pages used blockquotes only to create an indentation level. */
body:not(.nav) blockquote.legacy-indent {
    margin-right: 0;
    margin-left: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
}

/* Legacy examples use italic blockquotes instead of semantic pre elements. */
body:not(.nav) blockquote.code-example,
body:not(.nav) > blockquote blockquote:has(> i:first-child),
body:not(.nav) > blockquote blockquote:has(> p:first-child > i:first-child) {
    overflow: auto;
    padding: 12px 14px;
    color: var(--b3d-code);
    background: var(--b3d-help-deep);
    border: 1px solid var(--b3d-help-border);
    border-left: 4px solid var(--b3d-editor-number);
    border-radius: 3px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.45;
}

body:not(.nav) > blockquote blockquote:has(> i:first-child) > i,
body:not(.nav) > blockquote blockquote:has(> p:first-child > i:first-child) > p {
    margin: 0;
    color: inherit;
    font: inherit;
}

body:not(.nav) > blockquote blockquote:has(> i:first-child) i,
body:not(.nav) > blockquote blockquote:has(> p:first-child > i:first-child) i {
    color: inherit;
    font-style: normal;
}

body:not(.nav) > blockquote blockquote:has(> p:first-child > i:first-child) > blockquote {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

/* Old single-cell example tables used an extra blockquote for indentation. */
body:not(.nav) td:has(> blockquote) {
    padding: 12px 14px;
    color: var(--b3d-code);
    background: var(--b3d-help-deep);
    border-left: 4px solid var(--b3d-editor-number);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
}

body:not(.nav) pre,
body:not(.nav) blockquote.code-example,
body:not(.nav) > blockquote blockquote:has(> i:first-child),
body:not(.nav) > blockquote blockquote:has(> p:first-child > i:first-child) {
    font-size: 13px;
}

body:not(.nav) td > blockquote {
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
}

body:not(.nav) td > blockquote > br:first-child {
    display: none;
}

body:not(.nav) .header {
    display: block;
    margin: 30px 0 12px;
    padding-bottom: 6px;
    color: var(--b3d-heading-secondary);
    border-bottom: 1px solid var(--b3d-help-border);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

table {
    width: 100%;
}

/* Keep the precedence table at the reference text size in all document modes. */
table.operator-table {
    font-size: 13px;
}

table.operator-table code {
    font-size: inherit;
}
