@charset "UTF-8";

/* The command reference's own layout on top of ../assets/site.css, which gives it the site's
   fonts, colours (light, and dark under prefers-color-scheme: dark or the header's toggle), header,
   page head and footer. The page's code blocks get site.js's copy button, the examples too: it
   watches for the code blocks renderer.js adds when an example is opened. */

:root {
    /* The names this page and json-schema-view-js.min.css use, mapped onto the site's palette. */
    --text-color: var(--text);
    --background: var(--bg);
    --gray-10: var(--card-hover);
    --gray-30: var(--border-strong);
    --gray-70: var(--text-muted);
}

/* The toolbar and the sidebar stick to the top of the window, so the site header scrolls away. */
.site-header {
    position: static;
}

/* A sidebar of sections next to the content on wide screens. */
div.layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 920px);
    gap: 8px;
    justify-content: center;
    padding: 0 20px 0 0;
}

main.frame {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 36px 20px 0;
}

section.intro {
    margin: 0 0 32px;
}

section.intro h2 {
    margin: 32px 0 12px;
    font-size: 30px;
}

main.frame p {
    margin: 0 0 14px;
    max-width: var(--text-width);
}

main.frame p.command_example_description {
    margin: 0.3em 0;
}

div.call_examples {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
}

div.call_example h3 {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 8px 0 8px;
}

div.call_example h3 code {
    font-size: 0.9em;
}

nav.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 36px 0.5em 2em 20px;
    font-size: 0.9em;
}

div.sidebar_title {
    color: var(--eyebrow);
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 1.4em 0 0.5em;
}

div.sidebar_title:first-child {
    margin-top: 0.4em;
}

ul.sidebar_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

a.sidebar_link {
    display: flex;
    justify-content: space-between;
    gap: 0.5em;
    padding: 0.25em 0.6em;
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

a.sidebar_link:hover {
    background: var(--card-hover);
    color: var(--text);
}

a.sidebar_link[aria-current] {
    background: var(--card);
    color: var(--text);
    font-weight: 700;
    box-shadow: inset 2px 0 0 var(--accent);
}

a.sidebar_link.sidebar_empty {
    opacity: 0.45;
}

span.sidebar_count {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

div.sidebar_versions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
}

button.sidebar_version {
    font: inherit;
    font-size: 0.9em;
    color: var(--text-secondary);
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    padding: 0.2em 0.55em;
    cursor: pointer;
}

button.sidebar_version:hover {
    border-color: var(--accent);
}

button.sidebar_version[aria-pressed="true"] {
    background: var(--button-bg);
    border-color: var(--button-bg);
    color: var(--button-text);
}

button.toolbar_sections {
    display: none;
}

details.command_container {
    margin: 0.7em 0;
    transition: box-shadow 0.15s ease;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

details.command_container[open] {
    border-color: var(--fg);
    box-shadow: 4px 4px 0 var(--ochre);
}

details ::marker {
    color: var(--text-muted);
}

div.group_name {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-top: 2.0em;
    margin-bottom: 0.4em;
}

section.group {
    margin: 0;
}

section.group,
details.command_container {
    /* Keep the target clear of the sticky toolbar when jumping to it;
       renderer.js sets --toolbar-height from the toolbar's real height. */
    scroll-margin-top: calc(var(--toolbar-height, 4em) + 0.5em);
}

span.group_count {
    color: var(--text-muted);
    font-size: 0.6em;
    font-weight: 600;
    margin-left: 0.6em;
}

div.toolbar {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    padding: 0.7em 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

div.toolbar input,
div.toolbar button {
    font: inherit;
    font-size: 0.9em;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    padding: 0.4em 0.7em;
}

div.toolbar input::placeholder {
    color: var(--text-muted);
}

div.toolbar input:focus {
    border-color: var(--accent);
}

input.toolbar_search {
    flex: 1 1 14em;
    min-width: 0;
}

button.toolbar_button {
    cursor: pointer;
    font-weight: 600;
}

button.toolbar_button:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

span.toolbar_status {
    color: var(--text-muted);
    font-size: 0.9em;
}

div.overview {
    margin: 1.5em 0 0;
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

div.overview_title {
    font-weight: 700;
    margin-bottom: 0.5em;
}

table.overview_table {
    border-collapse: collapse;
    width: 100%;
}

table.overview_table th,
table.overview_table td {
    text-align: left;
    padding: 0.3em 0.6em;
    border-bottom: 1px solid var(--border);
}

table.overview_table tr:last-child td {
    border-bottom: 0;
}

table.overview_table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85em;
}

table.overview_table td {
    color: var(--text-secondary);
}

table.overview_table .number {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

table.overview_table a {
    color: var(--link);
    text-decoration: none;
}

table.overview_table a:hover {
    text-decoration: underline;
}

summary.command_header {
    padding: 0.55em 0.75em;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: background 0.1s;
}

details summary.command_header:hover {
    background: var(--card-hover);
}

details[open] summary.command_header {
    background: var(--card-hover);
    border-bottom: 1px solid var(--border);
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
}

span.command_name {
    display: inline-block;
    word-break: break-word;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text);
}

span.command_summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.87em;
    line-height: 1.45em;
    margin-top: 0.2em;
    /* Line up with the name, after the disclosure marker. */
    padding-left: 1.1em;
}

details[open] span.command_summary {
    /* The full description is in the opened content. */
    display: none;
}

span.command_version {
    color: var(--eyebrow);
    font-size: 0.7em;
    font-weight: 700;
    margin-left: 0.7em;
    display: inline-block;
}

div.command_content {
    padding: 0 1.0em;
    margin: 1.0em 0.5em;
    color: var(--text-secondary);
}

div.command_example_file {
    margin-top: 0.8em;
    font-size: 0.9em;
    color: var(--text-muted);
}

div.command_example_file a {
    font-family: var(--font-mono);
    font-size: 0.92em;
    word-break: break-all;
}

div.scheme_title {
    font-weight: 700;
    color: var(--text);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

div.scheme_container {
    overflow: auto;
}

div.scheme_container .description {
    white-space: pre-line;
}

.json-schema-view,
json-schema-view {
    font-family: var(--font-mono);
}

.json-schema-view>*,
json-schema-view>* {
    font-size: 13px;
}

.json-schema-view .description,
json-schema-view .description {
    color: var(--text-muted);
}

details.command_example {
    margin-top: 1.0em;
}

details.command_example > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
    width: fit-content;
}

div.command_example_body {
    margin-top: 0.5em;
}

div.command_example_body pre {
    margin: 0.5em 0;
}

p.command_example_description {
    margin: 0.3em 0;
}

div.command_example_status {
    color: var(--text-muted);
    font-style: italic;
}

div.command_example_link {
    font-size: 0.85em;
    text-align: right;
}

/* Code highlighted by highlight.js sits in the site's code blocks, which are charcoal with cream text
   in both themes. github.min.css is a light theme, so the tokens get GitHub's dark colours instead. */
pre code.hljs {
    display: block;
    padding: 0;
    background: transparent;
    color: var(--pre-text);
    overflow-x: visible;
}

pre .hljs-doctag, pre .hljs-keyword, pre .hljs-meta .hljs-keyword, pre .hljs-template-tag,
pre .hljs-template-variable, pre .hljs-type, pre .hljs-variable.language_ { color: #ff7b72; }
pre .hljs-title, pre .hljs-title.class_, pre .hljs-title.class_.inherited__, pre .hljs-title.function_ { color: #d2a8ff; }
pre .hljs-attr, pre .hljs-attribute, pre .hljs-literal, pre .hljs-meta, pre .hljs-number, pre .hljs-operator,
pre .hljs-selector-attr, pre .hljs-selector-class, pre .hljs-selector-id, pre .hljs-variable { color: #79c0ff; }
pre .hljs-meta .hljs-string, pre .hljs-regexp, pre .hljs-string { color: #a5d6ff; }
pre .hljs-built_in, pre .hljs-symbol { color: #ffa657; }
pre .hljs-code, pre .hljs-comment, pre .hljs-formula { color: #8b949e; }
pre .hljs-name, pre .hljs-quote, pre .hljs-selector-pseudo, pre .hljs-selector-tag { color: #7ee787; }
pre .hljs-subst { color: var(--pre-text); }

/* Below this width the sidebar is a drawer opened by "Sections". */
@media only screen and (max-width: 1150px) {

    div.layout {
        display: block;
        padding: 0;
    }

    main.frame {
        margin: 0 auto;
        max-width: 920px;
    }

    nav.sidebar {
        position: fixed;
        z-index: 60;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(300px, 85vw);
        max-height: none;
        padding-top: 1em;
        /* align-self: start from the wide layout would shrink the drawer to its content. */
        align-self: stretch;
        background: var(--bg-raised);
        border-right: 1px solid var(--border);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.2s, visibility 0.2s;
    }

    body.sidebar_open nav.sidebar {
        transform: none;
        visibility: visible;
    }

    button.toolbar_sections {
        display: inline-block;
    }

}

@media only screen and (max-width: 640px) {

    main.frame {
        padding: 24px 16px 0;
    }

    div.toolbar button {
        flex: 1 1 auto;
    }

    div.command_content {
        padding: 0;
    }

}

.site-footer {
    margin-top: 48px;
}
