/* /App.razor.rz.scp.css */
.error-404-background-root[b-7aivz695pp] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-color: #0d0d0d;
}

.error-404-foreground-root[b-7aivz695pp] {
    background-image: url('/code-rooms-exe/Files/404/404.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(100vw, 200vh);
    width: min(100vw, 200vh);
    height: min(50vw, 100vh);
    overflow: hidden;
}
/* /Pages/HomePage.razor.rz.scp.css */
*[b-f9o35elfki] {
    box-sizing: border-box;
}

button[b-f9o35elfki] {
    /* override --background-color variable to automatically set button colour and border/hover/active colours */
    --background-color: black;
    --border-color: color-mix(in srgb-linear, var(--background-color), var(--global-background-color));
    --hover-color: color-mix(in srgb-linear, var(--background-color) 70%, var(--global-background-color));
    --active-color: color-mix(in srgb-linear, var(--background-color) 40%, var(--global-background-color));

    background-color: var(--background-color);
    border-style: solid;
    border-width: 1px;
    border-radius: 0px;
    border-color: var(--border-color);
    font-size: 20px;
    font-weight: bold;
    padding: 0px;
    transition-property: transform;
    transition-duration: 100ms;
}

button:hover[b-f9o35elfki] {
    background-color: var(--hover-color);
}

button:active[b-f9o35elfki] {
    background-color: var(--active-color);
    transform: scale(0.95, 0.95);
}

button:disabled[b-f9o35elfki] {
    color: var(--global-color);
    background-color: rgb(60, 60, 60);
    border-color: rgb(51, 51, 51);
    transform: none;
}

#background-grid[b-f9o35elfki] {
    --global-background-color: rgb(42, 42, 42);
    --global-color: white;
    --stack-min-width: 130px;
    --stack-max-width: 250px;
    --heap-width: 555px;
    --heap-height: 350px;
    --ide-controls-width: 100px;
    --heap-idecontrols-width: calc(var(--heap-width) + var(--ide-controls-width));

    background-color: var(--global-background-color);
    width: 100vw;
    height: 100vh;
    font-family: "cascadia mono";
    font-size: 16px;
    color: var(--global-color);
    display: grid;
    grid-template-columns: 100vw;
    grid-template-rows: 100vh;
}

/*
We use a grid here even though a flex should in theory be perfectly sufficient
However, with a flex, the ".stack-container width: max-content" and the
    ".stack-contents-container overflow-x: auto" lines get rendered in the wrong order,
and as a result if the width of the content ends up somewhere between the minimum and maximum stack width values,
then "overflow-x: auto" runs first and it displays a horizontal scrollbar, but then "width: max-content" runs second
and the appropriate width is applied. So even though the content fits within the div, an empty scrollbar is also displayed.
For some reason, using a grid just fixes this. Presumably the rendering happens over multiple passes or something.
*/
#foreground[b-f9o35elfki] {
    display: grid;
    grid-template-columns: max-content 1fr;
    grid-template-rows: 100%;
}

#stack-container[b-f9o35elfki] {
    min-width: var(--stack-min-width);
    max-width: var(--stack-max-width);
    width: max-content;
    display: flex;
    flex-direction: column;
}

#stack-label-container[b-f9o35elfki] {
    height: 20px;
    background-color: rgb(20, 20, 20);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#stack-label[b-f9o35elfki] {
    font-weight: bold;
}

#stack-contents-scroll-container[b-f9o35elfki] {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

#stack-contents-container[b-f9o35elfki] {
    padding-top: 10px;
    text-wrap-mode: wrap;
    word-break: break-all;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: none;
    grid-auto-rows: auto 15px;
    align-items: safe center;
}

.stack-separator[b-f9o35elfki] {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stack-separator-solid[b-f9o35elfki] {
    height: 7px;
}

.stack-entry[b-f9o35elfki] {
    grid-column: 1;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.var-container[b-f9o35elfki] {
    display: grid;
    grid-template-columns: 50px;
    grid-template-rows: 50px;
}

.var-image[b-f9o35elfki] {
    grid-column: 1;
    grid-row: 1;
    width: 50px;
    height: 50px;
}

.var-value-container[b-f9o35elfki] {
    grid-column: 1;
    grid-row: 1;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
}

#main-grid[b-f9o35elfki] {
    display: grid;
    grid-template-columns: var(--heap-idecontrols-width) 1fr 1fr;
    grid-template-rows: 1fr var(--heap-height);
}

#text-editor-container[b-f9o35elfki] {
    grid-column: 1 / 3;
    grid-row: 1;
    background-color: rgb(30, 30, 30);
    min-height: 100px;
}

#text-editor[b-f9o35elfki] {
    all: inherit;
    width: 100%;
    height: 100%;
    padding: 8px;
    scrollbar-width: thin;
    text-wrap-mode: nowrap;
    white-space-collapse: preserve;
}

#description-container[b-f9o35elfki] {
    grid-column: 3;
    grid-row: 1;
}

#description[b-f9o35elfki] {
    all: inherit;
    width: 100%;
    height: 100%;
    padding: 8px;
    scrollbar-width: thin;
    font-family: verdana;
    text-wrap-mode: wrap;
    overflow-wrap: anywhere;
}

#heap-idecontrols-container[b-f9o35elfki] {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: var(--heap-width) var(--ide-controls-width);
    grid-template-rows: 100%;
}

#heap-container[b-f9o35elfki] {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 20px 1fr;
}

#heap-label-container[b-f9o35elfki] {
    background-color: rgb(20, 20, 20);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#heap-label[b-f9o35elfki] {
    font-weight: bold;
}

#heap-contents-scroll-container[b-f9o35elfki] {
    background-color: black;
    overflow-y: auto;
    scrollbar-width: none;
}

#heap-grid[b-f9o35elfki] {
    display: grid;
    grid-template-columns: 5px repeat(10, 50px 5px);
    grid-template-rows: 5px repeat(5, 50px 15px);
    grid-auto-rows: 50px 15px;
}

.heap-entry[b-f9o35elfki] {
    background-color: var(--global-background-color);
}

.heap-index-container[b-f9o35elfki] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.heap-index-label[b-f9o35elfki] {
    color: rgb(150, 150, 150);
    font-size: 13px;
}

#ide-controls-container[b-f9o35elfki] {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: repeat(5, 1fr);
}

#compile-button[b-f9o35elfki] {
    --background-color: rgb(5, 97, 67);
    font-family: inherit;
    font-size: 20px;
}

#edit-button[b-f9o35elfki] {
    --background-color: rgb(138, 108, 5);
    font-family: inherit;
    font-size: 20px;
}

#run-button[b-f9o35elfki] {
    --background-color: rgb(10, 117, 1);
    font-family: inherit;
    font-size: 20px;
}

#arrow-buttons-container[b-f9o35elfki] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 100%;
}

.arrow-button[b-f9o35elfki] {
    --backround-color: black;
    font-family: inherit;
    font-size: 30px;
}

#next-button[b-f9o35elfki] {
    --background-color: rgb(0, 72, 130);
    font-family: inherit;
    font-size: 20px;
}

#output-container[b-f9o35elfki] {
    grid-column: 2;
    grid-row: 2;
    background-color: black;
    min-width: 100px;
}

#output[b-f9o35elfki] {
    all: inherit;
    width: 100%;
    height: 100%;
    padding: 8px;
    scrollbar-width: thin;
    text-wrap-mode: wrap;
    word-break: break-all;
}

#menu-container[b-f9o35elfki] {
    --level-button-height: round(down, calc(var(--heap-height) / 5), 1px);
    --bottom-bar-height: calc(var(--heap-height) - 4 * var(--level-button-height));

    grid-column: 3;
    grid-row: 2;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 1fr var(--bottom-bar-height);
}

#level-select-container[b-f9o35elfki] {
    overflow-y: auto;
    scrollbar-width: thin;
}

#level-select-grid[b-f9o35elfki] {
    font-size: 20px;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: repeat(4, var(--level-button-height));
    grid-auto-rows: var(--level-button-height);
}

.level-button[b-f9o35elfki] {
    --background-color: black;
    text-align: inherit;
    font-family: inherit;
    font-size: inherit;
    padding: 8px;
}

#menu-bottom-bar-grid[b-f9o35elfki] {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 100%;
}

#total-stars-display-container[b-f9o35elfki] {
    background-color: rgb(20, 20, 20);
    display: flex;
    font-size: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.total-stars-label[b-f9o35elfki] {
    font-weight: bold;
}

#syntax-button[b-f9o35elfki] {
    --background-color: rgb(4, 58, 77);
    font-family: inherit;
    font-size: inherit;
}

#solution-button[b-f9o35elfki] {
    --background-color: rgb(102, 57, 5);
    font-family: inherit;
    font-size: inherit;
}

/* 1512px and 864px are likely the lowest resolution values a modern PC would have
   but the height value may be lower due to bookmark tab, taskbar, etc.
   so we take off roughly 200px for that
*/
@media screen and (max-width: 1511px), screen and (max-height: 663px) {
    .variable-font-size[b-f9o35elfki] {
        font-size: 12px !important;
    }
}
