:root {
    --theme-border-light: #ffffff;
    --theme-border-dark: #ababab;
}

.hidden {
    display: none !important;
}

.window {
    background-color: var(--theme-bg-outset);
    border-width: 0.125rem;
    border-style: solid;
    border-color: gray;
    border-top-color: var(--theme-border-light);
    ;
    border-left-color: var(--theme-border-light);
    ;
    border-right-color: var(--theme-border-dark);
    ;
    border-bottom-color: var(--theme-border-dark);
    ;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    margin: auto;
    margin-bottom: .625rem;
    max-width: 44.5rem
}

.window-nav {
    background-color: #221db3;
    margin: .125rem .125rem 0 .125rem;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .3125rem;
    min-height: 1.375rem;
}

.window-nav:has(> *:only-child) {
    justify-content: center;
}

.window-nav p {
    padding: .125rem 0 .125rem 0;
    margin: 0 0 0 .125rem;
    color: white;
    font-weight: bold;
}

.window-content {
    display: flex;
    /*width: fit-content;*/
    align-items: center;
}

.window-body {
    padding: 0 1rem 0 1rem;
}

.window-navbutton-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.window-navbutton {
    margin: .125rem .125rem .125rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.window-navbutton-div {
    border-width: 0.125rem;
    border-style: solid;
    border-color: gray;
    border-top-color: var(--theme-border-light);
    ;
    border-left-color: var(--theme-border-light);
    ;
    border-right-color: var(--theme-border-dark);
    ;
    border-bottom-color: var(--theme-border-dark);
    ;
    padding: .1rem .17rem 0 .17rem;
    height: 100%;
}

.window-navbutton-text p {
    color: var(--theme-text-color);
    margin: 0;
    padding: 0;
    font-size: 80%;
}

.window-navbutton-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%
}

.window-navbutton-text img {
    display: block;
    width: .5rem;
}


.window-buttons {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin: .3125rem 0 .3125rem 0;
    gap: .25rem;
}

.window-buttons>div,
.button {
    /*border: .0625rem solid black;*/
    border-radius: .1875rem;
    border-width: .125rem;
}

.window-buttons>div>div,
.button-div {
    border-width: 0.125rem;
    border-style: solid;
    border-color: gray;
    border-top-color: var(--theme-border-light);
    ;
    border-left-color: var(--theme-border-light);
    ;
    border-right-color: var(--theme-border-dark);
    ;
    border-bottom-color: var(--theme-border-dark);
    ;
    padding: .125rem .1875rem .125rem .1875rem;
    border-radius: .0625rem;
}

.button-text {
    border: 0.125rem solid transparent;
}

button:hover {
    cursor: pointer;
}

.button:hover,
.button:focus {
    margin: 0;
    border: .0625rem solid var(--theme-text-color);
    border-radius: .1875rem;
    border-width: .125rem;

    .button-text {
        border: .125rem dotted var(--theme-text-color);
    }
}

button:active {

    .button-div,
    .window-navbutton-div {
        border-width: 0.125rem;
        border-style: solid;
        border-color: gray;
        border-top-color: var(--theme-border-dark);
        border-left-color: var(--theme-border-dark);
        border-right-color: var(--theme-border-light);
        border-bottom-color: var(--theme-border-light);
    }
}

.window hr {
    margin: 0;
    color: #919599;
    border-top: solid #919599;
    border-bottom: solid white;
    border-width: .125rem 0 .125rem 0;
}

.notepad-content {
    background-color: var(--theme-bg-inset);
    border-width: 0.125rem;
    border-style: solid;
    border-color: gray;
    border-top-color: var(--theme-border-dark);
    border-left-color: var(--theme-border-dark);
    border-right-color: var(--theme-border-light);
    border-bottom-color: var(--theme-border-light);
    margin: .125rem;
    padding-bottom: .625rem;
}

.toolbar {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: .8125rem;
    margin: .25rem .25rem .25rem .5rem;
    padding: 0;
    height: fit-content;
}

.toolbar p {
    margin: 0;
}

.window-nav-title {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.window-nav-title img {
    height: 1.3125rem;
    width: auto;
    padding-left: .1875rem;
}

.theme-outset {
    border-width: 0.125rem;
    border-style: solid;
    border-color: gray;
    border-top-color: var(--theme-border-light);
    border-left-color: var(--theme-border-light);
    border-right-color: var(--theme-border-dark);
    border-bottom-color: var(--theme-border-dark);
    background-color: var(--theme-bg-outset);
}

.theme-inset {
    border-width: 0.125rem;
    border-style: solid;
    border-color: gray;
    border-top-color: var(--theme-border-dark);
    border-left-color: var(--theme-border-dark);
    border-right-color: var(--theme-border-light);
    border-bottom-color: var(--theme-border-light);
    background-color: var(--theme-bg-outset);
}

.listing {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    padding: 1rem 1rem 0.5rem 1rem;
}

.listing-image>img {
    width: 100%;
    border: solid .125rem;
}

.listing-description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/*.listing-buttons {}*/

@media (min-width: 500px) {
    .listing {
        flex-direction: row;
    }

    .listing-image {
        width: 80%;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --theme-border-light: #545454;
        --theme-border-dark: #000000;
    }

    .window hr {
        color: #545454;
        border-top: solid #545454;
        border-bottom: solid black;
        margin-top: 0.125rem;
        border-width: .125rem 0 .125rem 0;
    }

    #maximize_img {
        content: url(/assets/dark_maximize.svg);
    }
}