.view-playground .view-checkbox:last-child .view-checkbox__label {
    margin-right: 0;
}

.view-playground {
    height: calc(100vh - 130px);
    display: grid;
    grid-template:
        'query-editor stat'
        'compiled-code parse-result';
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;

    @media (width < 768px) {
        height: auto;
        grid-template:
            'query-editor'
            'compiled-code'
            'stat'
            'parse-result';
    }
}

/* QUERY EDITOR */
.view-playground > .query-editor {
    grid-area: query-editor;
    overflow: hidden;
}
.view-playground > .query-editor > .query-editor__toolbar {
    display: flex;
}
.view-playground > .query-editor > .query-editor__toolbar > :first-child {
    flex: 1;
}
.view-playground > .query-editor .discovery-view-editor {
    margin: 0;
}
.view-playground > .query-editor .discovery-view-editor:focus-within {
    box-shadow: none !important;
}
.view-playground > .query-editor .discovery-view-editor .CodeMirror {
    border-radius: 2px;
}
.view-playground > .query-editor .discovery-view-editor .CodeMirror-scroll {
    max-height: calc((100vh - 170px) / 2);
}
.view-playground > .query-editor .discovery-editor-error {
    border-bottom: 1px solid rgba(255, 0, 0, .6);
    background: rgba(255, 215, 209, 0.3);
}

/* COMPILED CODE */
.view-playground > .compiled-code {
    grid-area: compiled-code;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.view-playground > .compiled-code > .compiled-code__toolbar {
    display: flex;
}
.view-playground > .compiled-code > .compiled-code__toolbar > :first-child {
    flex: 1;
}
.view-playground > .compiled-code > .compiled-code__content {
    flex: 1;
    overflow: hidden;
}
.view-playground > .compiled-code .view-source {
    height: 100%;
    box-sizing: border-box;
}
.view-playground > .compiled-code > .compiled-code__content.error {
    overflow: auto;
    padding: 8px 12px;
    border-left: 3px solid rgba(255, 0, 0, .8);
    background: rgba(225,75,75,.2);
    white-space: pre-wrap;
    font-family: var(--discovery-monospace-font-family);
    font-size: 11px;
}

/* STAT */
.view-playground > .stat {
    grid-area: stat;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.view-playground > .stat > .stat__content {
    flex: 1;
    overflow: hidden;
    border-radius: 3px;
}
.view-playground > .stat > .stat__content.not-available {
    padding: 8px;
    background-color: rgba(205, 205, 205, .1);
    color: #888;
}
.view-playground > .stat > .stat__content .view-source {
    height: 100%;
    max-height: calc((100vh - 170px) / 2 + 10px);
    overflow: auto;
}
.view-playground > .stat > .stat__content .view-source__content {
    box-sizing: border-box;
    padding: 6px;
}
.view-playground > .stat > .stat__content .view-source__content .view-source__action-buttons {
    translate: 1px -1px;
}

/* AST */
.view-playground > .parse-result {
    grid-area: parse-result;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.view-playground > .parse-result > .parse-result__toolbar .view-toggle {
    font-size: 11px;
    padding-top: 1px;
    padding-bottom: 1px;
    position: relative;
    top: -2px;
}
.view-playground > .parse-result > .parse-result__content {
    flex: 1;
    overflow: auto;
    background-color: rgba(205, 205, 205, .1);
    border-radius: 3px;
}
.view-playground > .parse-result > .parse-result__content.not-available {
    padding: 8px;
    color: #888;
}
.view-playground > .parse-result > .parse-result__content > .view-struct.struct-expanded-value {
    background-color: transparent;
}
.view-playground > .parse-result > .parse-result__content > .view-table {
    width: 100%;
}
.view-playground > .parse-result > .parse-result__content > .view-table > thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--discovery-background-color);
}
.view-playground > .parse-result > .parse-result__content > .view-table th {
    border-top: none;
    position: relative;
}
.view-playground > .parse-result > .parse-result__content > .view-table th:last-child {
    width: 100%;
}
