@import url('/web-app/blake3/57f88930a7ca286e5a7313fc9b7d298ea2c34450b992b06325c2976fe160f557?content_type=text/css');
@import url('/web-app/blake3/cdd221e3de775d9ddeef24fc054ecd4cb2852deb501d5316552656d0616849f6?content_type=text/css');

*, *::before, *::after {
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: none;
    box-sizing: border-box;
    font: inherit;
    color: unset;
    background: unset;
    text-align: unset;
}

ul, ol {
    padding-left: 2em;
}

math {
    font-family: math;

    mn {
        font-size: 80%;
    }
}

:root {
    --loading-background:
        hsl(0 0% 60%)
        linear-gradient(
            90deg,
            hsl(0 0% 60%) 25%,
            hsl(0 0% 40%) 50%,
            hsl(0 0% 60%) 75%);
    --loading-background-size: 200% 100%;
    --loading-animation: loading 1.5s infinite;
    --scrollbar-width: 0px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

:root { --main-font-family: 'PT Sans', sans-serif;
--header-font-family: 'Comfortaa', cursive;
--mono-font-family: monospace;

--border-color: oklch(0.8 0 0);
--highlight-background: oklch(0.8 0.17 90);
--selected-background: oklch(0.8 0.1 260);
--error-background: oklch(0.8 0.17 30);
--unset-background: oklch(0.8 0.17 30);
--menu-bubble-background: oklch(0.8 0 0);

--bool-slider: oklch(0.8 0 250);
--bool-true: oklch(0.6 0.16 250);
--bool-false: oklch(0.6 0 250);

--main-color: oklch(0 0 0);
--main-background: oklch(0.97 0.035 90);
--offset-background: oklch(1.0 0 0 / 0.5);
--header-bg: oklch(0 0 0 / 0.2);
--col-main-bg: oklch(0.8 0.05 240);
--col-app-bg: oklch(0.85 0.05 195);
--col-project-bg: oklch(0.9 0.06 150);

--color: var(--main-color);
--background: var(--main-background);

--button-apply-color: hsl(90, 50%, 80%);
--button-apply-border-color: hsl(90, 50%, 50%);

--button-cancel-color: hsl(0, 0%, 100%);
--button-cancel-border-color: hsl(0, 0%, 75%);

--theme-color: oklch(0.7 0.3 330);

--log-context-color: gray;
--log-debug-color: gray;
--log-info-color: var(--color);
--log-user-color: blue;
--log-warning-color: orange;
--log-error-color: red;

--input-height: 40px;
--background-color-transition-duration: 0.25s;

--warning-background: oklch(0.8 0.17 86);
--info-background: oklch(0.8 0.17 138);

--light-mode-img-bg: unset;
 }

@media (prefers-color-scheme: dark) { :root { --border-color: oklch(0.25 0 0);
--highlight-background: oklch(0.425 0.1 90);
--selected-background: oklch(0.425 0.1 260);
--error-background: oklch(0.425 0.17 30);
--unset-background: oklch(0.425 0.17 30);
--menu-bubble-background: oklch(0.35 0 0);

--bool-slider: oklch(0.4 0 250);

--main-color: oklch(0.8 0 0);
--main-background: oklch(0.2 0 0);
--offset-background: oklch(0.0 0 0 / 0.5);
--header-bg: oklch(1.0 0 0 / 0.2);
--col-main-bg: oklch(0.3 0.05 240);
--col-app-bg: oklch(0.3 0.05 195);
--col-project-bg: oklch(0.3 0.06 150);

--sidebar-color: hsl(0, 0%, 80%);
--sidebar-background: hsl(330, 100%, 20%);

--button-apply-color: hsl(90, 50%, 20%);

--button-cancel-color: hsl(0, 0%, 10%);
--button-cancel-border-color: hsl(0, 0%, 25%);

--theme-color: oklch(0.7 0.3 330);
--theme-background: oklch(0.7 0.3 330);

--log-user-color: hsl(210, 100%, 70%);
--log-error-color: hsl(0, 100%, 70%);

--warning-background: oklch(0.425 0.17 86);
--info-background: oklch(0.425 0.17 138);

--light-mode-img-bg: oklch(1.0 0.0 0.0 / 0.7);
 } }

html, body {
    font-size: 16px;
    font-family: var(--main-font-family);
    color: var(--color);
    text-align: left;
}

a, a:hover, a:visited {
    color: unset;
}

pre, code {
    font-family: var(--mono-font-family);
}

.clickable {
    cursor: pointer;
}

.display-none {
    display: none !important;
}

math {
    mtable {
        &.menv-cases {
            padding-left: 1ex;
        }
        mtd.cell-left, &.menv-cases mtd {
            text-align: left;
        }
        mtd.cell-center {
            text-align: center;
        }
        mtd.cell-right {
            text-align: right;
        }
    }
}

.border-spinner {
    position: relative;

    &.spin::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: 2px solid gold;
        border-radius: inherit;
        transition: all .5s;
        animation: border-spinner-clippath 3s infinite linear;

    }
}

@keyframes border-spinner-clippath {
    0%,
    100% {
        clip-path: inset(0 0 95% 0);
    }
    25% {
        clip-path: inset(0 95% 0 0);
    }
    50% {
        clip-path: inset(95% 0 0 0);
    }
    75% {
        clip-path: inset(0 0 0 95%);
    }
}

:root {
    --column-margin: 25px;
    --ncolumns: 6;
    @media (width <= 2500px) {
        --ncolumns: 5;
    }
    @media (width <= 2000px) {
        --ncolumns: 4;
    }
    @media (width <= 1500px) {
        --ncolumns: 3;
    }
    @media (width <= 1000px) {
        --ncolumns: 2;
    }
    @media (width <= 500px) {
        --ncolumns: 1;
    }
    --column-width: calc(100vw / var(--ncolumns));
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--color);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    overscroll-behavior: contain;
}

#columns-scroll-box {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: clip;
    scroll-snap-type: x mandatory;
    background: linear-gradient(var(--header-bg) 86px, transparent 86px);
    overscroll-behavior: contain;
}

#columns {
    padding: 0;
    height: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--column-width);
    grid-template-rows: 100%;

    & > * {

        display: grid;
        grid-template-columns: 100%;
        grid-template-rows: 86px 1fr;
        overflow: clip;
        anchor-scope: --column;
        anchor-name: --column;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        background: var(--main-background);

        & > :first-child {

            overflow: clip;
            background: var(--header-bg);
            display: grid;

            & > :first-child {
                margin: 0 var(--column-margin);
                display: grid;
                grid-template-columns: minmax(0px, 1fr) max-content;
                align-items: center;
                user-select: none;

                .title {
                    font-family: var(--header-font-family);
                    font-size: 125%;
                    text-wrap: nowrap;
                    text-overflow: ellipsis;
                    overflow: clip;
                }
                .buttons {
                    display: flex;
                    flex-direction: row;
                    gap: 1px;
                    align-items: center;
                    margin-left: auto;
                }
                .icon.button {
                    width: 40px;
                    height: 40px;
                    padding: 10px;
                    cursor: pointer;
                    border-radius: 5px;

                    &.selected {
                        background: var(--highlight-background);
                    }
                }
            }
        }

        & > :last-child {
            overflow-x: clip;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            scrollbar-gutter: stable;

            & > * {
                anchor-scope: --scroll-column;
                anchor-name: --scroll-column;

                &:has(> .column-body-inner) {
                    flex-basis: 100%;
                    flex-grow: 1;
                    flex-shrink: 0;
                }
                &:has(> .column-menu) {
                    background: var(--header-bg);
                }
                & > * {
                    margin: var(--column-margin);
                    margin-right: calc(max(0px, var(--column-margin) - var(--scrollbar-width)));
                }
            }
        }
    }

    @media (width > 500px) {
        > .double {
            grid-column: span 2;
        }
    }
    > .full {
        grid-column: span var(--ncolumns);
    }

    h1, h2 {
        font-family: var(--header-font-family);
        font-weight: unset;
        text-decoration: unset;
        color: unset;
        background: unset;
    }

    h1 {
        font-size: 125%;
        margin-top: 25px;
        margin-bottom: 25px;
    }

    h2 {
        font-size: 100%;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    > .app .description {
        margin-bottom: 25px;
    }

    > .log {
        .status-indicator {
            display: none;
            border: 1px solid;
            border-radius: 5px;
            padding: 5px 10px;
            user-select: none;
            cursor: pointer;
            font-size: 75%;
            content: attr(data-status);

            &[data-status="error"] {
                color: var(--log-error-color);
            }
            &[data-status="running"] {
                color: var(--log-user-color);
            }
        }
    }

    > .dialog .column-body-inner {
        & > .editor {
            margin: 25px 0;
        }
        & > .buttons {
            display: flex;
            flex-direction: row;

            & > .spacer {
                flex-grow: 1;
            }
        }
    }

    > .parameters .parameter, .editor {
        &.struct {
            display: flex;
            flex-direction: column;
            gap: 10px;

            .field {
                & > :nth-child(1) {
                    font-weight: bold;
                    margin-bottom: 5px;
                    user-select: none;
                }
            }
        }
        &.sequence {
            .items {
                display: flex;
                flex-direction: column;
                gap: 12px;

                & > * {
                    display: grid;
                    grid-template-columns: max-content 1fr;
                    grid-template-rows: max-content;
                    gap: 12px;
                }
            }
            .add-button {
                margin-top: 12px;
            }
            .add-button, .remove-button {
                background: var(--offset-background);
                border-radius: 5px;
                cursor: pointer;
                height: var(--input-height);
                width: var(--input-height);
                align-content: center;
                text-align: center;
            }
        }
        &.map {
            .items {
                display: flex;
                flex-direction: column;
                gap: 12px;

                & > * {
                    display: grid;
                    grid-template-columns: max-content 1fr 2fr;
                    grid-template-rows: max-content;
                    gap: 12px;
                }
            }
            .add-button {
                margin-top: 12px;
            }
            .add-button, .remove-button {
                background: var(--offset-background);
                border-radius: 5px;
                cursor: pointer;
                height: var(--input-height);
                width: var(--input-height);
                align-content: center;
                text-align: center;
            }
        }
        &.enum {
            display: grid;
            grid-template-columns: max-content 1fr;
            gap: 12px;

            & > select {
                padding: 5px 10px;
                border-radius: 5px;
                font: inherit;
                color: var(--color);
                background: var(--offset-background);
                width: 100%;
                height: var(--input-height);

                &:not(:has(> option:checked)) {
                    background: var(--unset-background);
                }
            }

            &.standalone {
                display: flex;
                flex-direction: column;
                gap: 10px;
            }
        }
        &.inline-string, &.text {
            anchor-scope: --editor-inline-string;

            & > input, & > .input {
                padding: 3px 8px;
                border-radius: 5px;
                border: 2px solid oklch(0 0 0 / 0);
                font: inherit;
                color: var(--color);
                background: var(--offset-background);
                transition: background var(--background-color-transition-duration);
                width: 100%;
                min-height: var(--input-height);
                anchor-name: --editor-inline-string;
            }

            & > .error_bubble {
                position: fixed;
                position-anchor: --editor-inline-string;
                position-visibility: anchors-visible;
                left: calc(anchor(--scroll-column left) + var(--column-margin));
                right: calc(anchor(--scroll-column right) + var(--column-margin) - var(--scrollbar-width));
                bottom: calc(anchor(top) + 10px);
                padding: 5px;
                border-radius: 5px;
                color: var(--color);
                background: var(--error-background);
                box-shadow: 0 0 7px 7px var(--background);

                & > .arrow {
                    position: fixed;
                    position-anchor: --editor-inline-string;
                    position-visibility: anchors-visible;
                    bottom: calc(anchor(top) - 9px / 2 + 10px);
                    width: 9px;
                    height: 9px;
                    left: calc(anchor(left) + 13px);
                    background: var(--error-background);
                    rotate: 45deg;
                }
            }
            &:not([data-validity="Invalid"].focussed):not([data-validity="Invalid"]:hover) > .error_bubble {
                display: none;
            }
            &[data-validity="Invalid"]:hover:not(.focussed) > .error_bubble {
                z-index: 1;
            }
            &[data-validity="Invalid"] > input {
                border-color: var(--error-background);
            }
            &[data-validity="Unset"] > input {
                border-color: var(--unset-background);
            }
            &.loading > input {
                background: var(--loading-background);
                background-size: var(--loading-background-size);
                animation: var(--loading-animation);
            }
            &.focussed > input {
                background: var(--highlight-background);
            }
        }
        &.text > .input {
            field-sizing: content;
            resize: none;
        }
        &.inline-pair {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-gap: 12px;
        }
        &.bool, &.option > .toggle {
            cursor: pointer;
            display: inline-block;
            position: relative;
            width: 40px;
            height: 40px;

            & > .slider {
                position: absolute;
                left: 4px;
                top: 16px;
                width: 28px;
                height: 8px;
                border-radius: 5px;
                background: var(--bool-slider);
            }
            & > .knob {
                width: 16px;
                height: 16px;
                border-radius: 8px;
                background: var(--bool-false);
                position: absolute;
                top: 12px;
                left: 0px;
                transition: all 0.25s;
            }
        }
        &.bool[data-state="Invalid"], &.option[data-state="Invalid"] > .toggle {
            & > .slider {
                background: var(--error-background);
            }
            & > .knob {
                display: none;
            }
        }
        &.bool[data-state="Unset"], &.option[data-state="Unset"] > .toggle {
            & > .slider {
                background: var(--unset-background);
            }
            & > .knob {
                display: none;
            }
        }
        &.bool[data-state="True"], &.option[data-state="Some"] > .toggle {
            & > .knob {
                left: 20px;
                background: var(--bool-true);
            }
        }
        &.bool.loading, &.option.loading > .toggle {
            & > .slider {
                background: var(--loading-background);
                background-size: var(--loading-background-size);
                animation: var(--loading-animation);
            }
        }
        &.option {
            display: grid;
            gap: 12px;
            grid-template-columns: max-content 1fr;
            grid-template-rows: max-content;
        }
        &.multiline-string {
            display: grid;
            grid-template-columns: max-content 1fr;
            grid-template-rows: max-content;
            font-family: var(--mono-font-family);
            color: var(--color);

            textarea {
                padding: 5px 10px;
                color: inherit;
                font: inherit;
                transition: background var(--background-color-transition-duration);
                resize: none;
                white-space: pre;
                overflow-wrap: normal;
                overflow-y: hidden;
            }
            textarea.input {
                background: var(--offset-background);
                border-radius: 5px;
            }
            textarea.linenumbers {
                padding-left: 0;
                color: hsl(0, 0%, 50%);
                user-select: none;
                cursor: default;
            }
            &.focussed textarea.input {
                background: var(--highlight-background);
            }
        }
        &.collapsed {
            display: grid;
            background: var(--offset-background);
            transition: background var(--background-color-transition-duration);
            border-radius: 5px;
            border: 2px solid oklch(0 0 0 / 0);
            grid-template-columns: minmax(1px, 1fr) 20px;
            gap: 10px;
            align-items: center;
            cursor: pointer;
            min-height: var(--input-height);
            padding-left: 15px;
            padding-right: 10px;

            &[data-validity="Invalid"] {
                border-color: var(--error-background);
            }
            &[data-validity="Unset"] {
                border-color: var(--unset-background);
            }
            &.loading {
                background: var(--loading-background);
                background-size: var(--loading-background-size);
                animation: var(--loading-animation);
            }
            &.focussed {
                background: var(--highlight-background);
            }
            .value {
                white-space: nowrap;
                overflow: clip;
                text-overflow: ellipsis;
                user-select: none;
            }
            & > .menu-bubble {
                cursor: default;
            }
        }
        &.blob {
            display: grid;
            grid-template-columns: 1fr max-content;
            gap: 12px;

            & > :first-child {
                align-content: center;
                text-wrap: nowrap;
                overflow: clip;
                text-overflow: ellipsis;
                user-select: none;
            }
        }
        &.with-description > .description {
            margin-top: var(--column-margin);
            margin-bottom: var(--column-margin);
        }
        &.with-preview > img.preview {
            width: 100%;
            aspect-ratio: 3 / 2;
            background: var(--light-mode-img-bg);
        }
        &.with-presets .preset-ctrl {
            display: flex;
            width: 100%;
            gap: 10px;

            & > select {
                flex: auto;
                padding: 5px 10px;
                border-radius: 5px;
                font: inherit;
                color: var(--color);
                background: var(--offset-background);
                width: 100%;
            }
            & > :not(select) {
                flex: 0 0 auto;
            }
        }
    }
}

#columns > .col-main {
    background: var(--col-main-bg);
}

#columns > .col-app {
    background: var(--col-app-bg);
}

#columns > .col-project {
    background: var(--col-project-bg);
}

button.hamburger, .menu-bubble-parent {
    anchor-name: --menu-parent;
    anchor-scope: --menu-parent;
}

button.hamburger {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    color: var(--color);
    cursor: pointer;
    display: grid;
    justify-content: center;
    align-content: center;
    grid-template-columns: 20px;
    grid-template-rows: 20px;

    &:has(:popover-open) {
        background: var(--offset-background);
    }
}

.hamburger-menu, .menu-bubble {
    inset: auto;
    border-radius: 5px;
    position: fixed;
    position-anchor: --menu-parent;
    position-area: bottom span-left;
    position-try: top span-left;
    position-visibility: always;
    color: var(--color);
    background: var(--background);

    opacity: 0;
    transition: opacity 0.2s, display 0.5s allow-discrete;
    &:popover-open {
        opacity: 1;
        @starting-style {
            opacity: 0;
        }
    }

    & > * {
        margin: 15px;
    }
}

.input-field {
    background: var(--offset-background);
    transition: background var(--background-color-transition-duration);
    border-radius: 5px;
    height: var(--input-height);
    border: 2px solid oklch(0 0 0 / 0);

    &.invalid {
        border-color: var(--error-background);
    }
    &.focussed {
        background: var(--highlight-background);
    }
}

select.input-field {
    padding: 3px 13px;
    font: inherit;
    color: var(--color);
    cursor: pointer;
    width: 100%;
}

.field-with-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: var(--column-margin);
    margin-bottom: var(--column-margin);

    & > :first-child {
        font-weight: bold;
        margin-bottom: 5px;
        user-select: none;
    }
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsla(0, 0%, 0%, 0.75);
    display: grid;
    align-content: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.25s;

    &.hidden {
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.25s, visibility 0s 0.25s;
    }

    & > * {
        width: 100%;
        height: 100%;
        padding: var(--column-margin);
        object-fit: contain;
        background: white;
    }
}

#title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-family: var(--header-font-family);
    font-size: 125%;
    user-select: none;

    > svg {
        stroke: var(--color);
        width: 30px;
        vertical-align: middle;
    }
    > span {
        margin-right: 20px;
    }
}

.selectable-list {
    display: grid;
    grid-auto-rows: var(--input-height);
    grid-template-columns: 100%;
    user-select: none;
    gap: 1px;

    > * {
        cursor: pointer;
        border-radius: 5px;
        align-content: center;
        padding: 0 10px;
        text-wrap: nowrap;
        overflow: clip;
        text-overflow: ellipsis;
    }
    > :hover:not(.highlight) {
        background: var(--offset-background);
    }
    &.margin {
        margin: 25px 0;
    }
}

.func-call-id {
    font-family: var(--mono-font-family);
    font-size: 10px;
}

.text-button {
    display: grid;
    grid-template-columns: minmax(1px, 1fr);
    cursor: pointer;
    background: var(--offset-background);
    border-radius: 5px;
    user-select: none;
    height: var(--input-height);
    align-content: center;
    padding: 0 15px;
    transition: background .5s;
    gap: 10px;

    & .body {
        overflow: clip;
        text-wrap: nowrap;
        text-overflow: ellipsis;
    }

    &.with-icon {
        grid-template-columns: 20px minmax(1px, 1fr);
        padding-left: 10px;
    }

    &.selectable {
        &.selected {
            background: var(--highlight-background);
            border-color: var(--highlight-background);
        }
    }

    &[data-state="waiting"] {
        cursor: wait;
        animation: 1s infinite alternate AsyncTextButton-waiting;
    }
    &[data-state="success"] {
        background: green;
    }
    &[data-state="error"] {
        background: red;
    }
}

@keyframes AsyncTextButton-waiting {
    0% { background: oklch(50% 0.1 280); }
    100% { background: oklch(40% 0.1 280); }
}

.list-with-actions {
    border-top: 5px solid var(--offset-background);
    border-bottom: 5px solid var(--offset-background);
    border-radius: 5px;

    & > .items {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: 100%;

        & > * {
            overflow: clip;
            cursor: pointer;
            transition: background 0.25s;
            border-top: 1px solid var(--offset-background);

            &[data-state="PendingAdded"] {
                visibility: collapsed;
            }
            &[data-state="PendingDeleted"] {
                invisible: invisible;
                cursor: default;
            }
            &[data-state="Selected"] {
                background: var(--selected-background);
            }
        }
    }
    &.text > .items > * {
        height: 36px;
        align-content: center;
        padding: 0 10px;
    }
    & > .bar {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        position: sticky;
        bottom: 0;
        background: var(--offset-background);
        height: var(--input-height);
        user-select: none;

        & > .button {
            height: var(--input-height);
            align-content: center;
            cursor: pointer;
            padding: 0 10px;
        }
    }
}

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.icon {
    &.small {
        width: 20px;
        height: 20px;
    }
    &.error {
        color: var(--error-background);
    }
}

.nav-button {
    display: grid;
    grid-template-columns: minmax(1px, 1fr) 20px;
    cursor: pointer;
    background: var(--offset-background);
    border-radius: 5px;
    user-select: none;
    height: var(--input-height);
    align-items: center;
    justify-items: left;
    padding-left: 15px;
    padding-right: 10px;
    transition: background .5s;
    gap: 10px;

    &.with-icon {
        grid-template-columns: 20px minmax(1px, 1fr) 20px;
        padding-left: 10px;
        padding-right: 10px;
    }

    &.highlight {
        background: var(--highlight-background);
    }

    & > :first-child {
        text-wrap: nowrap;
        overflow: clip;
        text-overflow: ellipsis;
        width: 100%;
    }

    &.disabled {
        cursor: not-allowed;
        background: oklch(0.5 0 0 / 0.5);
    }
}

.column-app-project-entry {
    display: grid;
    grid-template-columns: var(--input-height) minmax(1px, 1fr) max-content;
    height: var(--input-height);
    align-items: center;
}

.run-state-indicator {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    align-self: center;
    justify-self: center;

    &[data-state="Queued"] {
        background: #c90;
    }
    &[data-state="Running"] {
        background: #080;
    }
    &[data-state="Aborted"] {
        background: #800;
    }
    &[data-state="Err"] {
        background: #800;
    }
}

body.authenticated .if-unauthenticated,
body:not(.authenticated) .if-authenticated,
body:not(.site-admin) .if-site-admin,
body:not([data-sync="connected"]) .if-sync-connected,
body:not([data-sync="connecting"]) .if-sync-connecting,
body:not([data-sync="disconnected"]) .if-sync-disconnected,
body:not([data-sync="unauthenticated"]) .if-sync-unauthenticated,
body:not(.no-auth-methods) .if-no-auth-methods
{
    display: none !important;
}

.run-column.watched .if-run-unwatched, .run-column:not(.watched) .if-run-watched {
    display: none !important;
}

.button-list {
    display: grid;
    grid-template-columns: 100%;
    gap: 5px;
    margin: var(--column-margin) 0;
}

.button-bar {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin: 15px 0;

    &.wrappable {
        flex-wrap: wrap;
    }
}

#main .footer {
    margin-top: var(--column-margin);
    margin-bottom: var(--column-margin);
    font-size: 75%;
}

.account-creation-token-entry {
    display: grid;
    grid-template-columns: 1fr max-content;

    & > :first-child {
        align-self: center;
    }
}

.markdown {
    p {
        margin: 1em 0;
    }
    em {
        font-style: italic;
    }
    strong {
        font-weight: bold;
    }
    code {
        background: var(--offset-background);
        border: 1px solid var(--border-color);
        border-radius: 5px;
        padding: 5px;
        white-space: pre;
        font-size: 85%;
    }
    code.block {
        display: block;
        overflow-x: scroll
    }
}

.users-list {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 5px;

    > * {
        border: 1px solid var(--border-color);
        border-radius: 5px;
        user-select: none;
        height: var(--input-height);
        align-content: center;
        padding: 0 15px;
        overflow: clip;
        text-wrap: nowrap;
        text-overflow: ellipsis;
    }
}

.display-log-in-token-column {
    .token {
        font-size: 200%;
        text-align: center;
        margin-top: 25px;
    }
}

.column-app-versions .versions > * {
    display: grid;
    grid-template-columns: minmax(1px, 1fr) max-content max-content;
}


.editor-error-icon {
    width: 20px;
    height: 20px;
    anchor-scope: --editor-error-icon;
    anchor-name: --editor-error-icon;

    &:not(.has-errors) {
        visibility: hidden;
    }

    &:not(.has-errors), &:not(:hover):not(:focus) {
        & > .editor-error-icon-bubble {
            display: none;
        }
    }

    & > svg {
        color: var(--error-background);
    }

    & > .editor-error-icon-bubble {
        position: fixed;
        position-anchor: --editor-error-icon;
        position-visibility: anchors-visible;
        left: calc(anchor(--scroll-column left) + var(--column-margin));
        right: calc(anchor(--scroll-column right) + var(--column-margin) - var(--scrollbar-width));
        bottom: calc(anchor(top) + 10px);
        padding: 5px;
        border-radius: 5px;
        color: var(--color);
        background: var(--error-background);
        box-shadow: 0 0 7px 7px var(--background);

        & > .editor-error-icon-arrow {
            position: fixed;
            position-anchor: --editor-error-icon;
            position-visibility: anchors-visible;
            bottom: calc(anchor(top) - 9px / 2 + 10px);
            width: 9px;
            height: 9px;
            left: calc(anchor(left) + 13px);
            background: var(--error-background);
            rotate: 45deg;
        }
    }
}

.editor-resolver {
    & > .editor-resolver-loading {
        display: grid;
        height: var(--input-height);
        align-items: center;
    }

    &:not([data-state="valid"]) > .editor-resolver-valid,
    &:not([data-state="invalid"]) > .editor-resolver-invalid,
    &:not([data-state="loading"]) > .editor-resolver-loading {
        display: none;
    }
}

.col-project {
    &.col-project-featured .col-project-if-not-featured,
    &:not(.col-project-featured) .col-project-if-featured,
    &.col-project-bookmarked .col-project-if-not-bookmarked,
    &:not(.col-project-bookmarked) .col-project-if-bookmarked,
    &.col-project-owner .col-project-if-not-owner,
    &:not(.col-project-owner) .col-project-if-owner {
        display: none !important;
    }
}

body {
    &.glob-update-available .glob-if-not-update-available,
    &:not(.glob-update-available) .glob-if-update-available,
    &.glob-can-create-account-with-proof-of-work .glob-if-not-can-create-account-with-proof-of-work,
    &:not(.glob-can-create-account-with-proof-of-work) .glob-if-can-create-account-with-proof-of-work {
        display: none !important;
    }
}

@scope (.cpn-message-box) to (.cpn-message-box-edge > *) {
    :scope {
        border-radius: 5px;

        &[data-kind="Info"] {
            background: var(--info-background);
        }
        &[data-kind="Warning"] {
            background: var(--warning-background);
        }
        &[data-kind="Error"] {
            background: var(--error-background);
        }

        anchor-scope: --message-box;
        anchor-name: --message-box;
    }

    :scope[data-layout="Box"] {
        margin: 15px 0;
    }

    :scope[data-layout="Inline"], :scope[data-layout="Icon"] {
        display: grid;
        grid-template-columns: var(--input-height) minmax(1px, 1fr);
        grid-template-rows: var(--input-height);
    }

    .cpn-message-box-inline-text {
        overflow: clip;
        text-wrap: nowrap;
        text-overflow: ellipsis;
        align-self: center;
    }

    .cpn-message-box-button-icon {
        align-self: center;
        justify-self: center;
        width: 20px;
        height: 20px;
    }

    :scope[data-layout="Box"], .cpn-message-box-popover:popover-open {
        display: grid;
        grid-template-columns: var(--input-height) minmax(1px, 1fr);
        border-radius: 5px;
        padding-left: 15px;
    }

    .cpn-message-box-popover {
        inset: unset;
        width: unset;
        height: unset;
        color: inherit;
        background: inherit;
        position: fixed;
        position-anchor: --scroll-column;
        left: calc(anchor(left) + var(--column-margin));
        right: calc(anchor(right) + var(--column-margin) - var(--scrollbar-width));
        top: anchor(--message-box top);
    }

    .cpn-message-box-icon {
        display: grid;
        padding: 15px 0;
        align-self: start;
    }

    .cpn-message-box-body {
        align-self: center;
    }

    .cpn-message-box-body > * {
        margin: 15px;
    }
}
@scope (.cpn-log) to (.cpn-log-edge > *) {
    :scope {
        display: block;
        margin: 25px 0;
    }

    .cpn-log-entry.cpn-log-text, .cpn-log-entry.cpn-log-file, .cpn-log-context {
        font-family: var(--mono-font-family);
        font-size: 14px;
        white-space-collapse: preserve;
    }

    .cpn-log-entry, .cpn-log-context {
        display: block;
        margin: 5px 0;
    }

    a.cpn-log-file {
        & > img {
            width: 100%;
            height: auto;
            background: var(--light-mode-img-bg);
        }
    }

    .cpn-log-entry[data-level="0"], .cpn-log-context[data-level="0"] {
        display: none;
    }

    .cpn-log-entry[data-level="0"] { color: var(--log-debug-color); }
    .cpn-log-entry[data-level="1"] { color: var(--log-info-color); }
    .cpn-log-entry[data-level="2"] { color: var(--log-user-color); }
    .cpn-log-entry[data-level="3"] { color: var(--log-warning-color); }
    .cpn-log-entry[data-level="4"] { color: var(--log-error-color); }
}
