
:root {
    --body-padding: 2rem;
    --skyglass: hsla(208, 100%, 50%, 35%);
    --text-shadow-color: hsl(208, 100%, 25%);
    --text-shadow-color-light: hsl(208, 100%, 50%);
    --roulette-radius: min(min(12rem, 50vw), 50dvh);
    --roulette-transition-time: 0.7s;
}

body, #scsvr-background-color {
    /* Take up full vertical space. */
    margin: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    align-items: center;
    box-sizing: border-box;
}

body {
    /* background-color: hsl(0, 0%, 8%); */
    color: hsl(0, 0%, 90%);
    font-family: Helvetica, Arial, sans-serif;
    text-align: center;
    padding: var(--body-padding);

    background-image: url("/static/desktop.jpg");
    background-size: cover;
    background-position: center center;
}


#apps-container {
    XXXXXXbackground-color: hsla(208, 100%, 50%, 40%);  /* Debug-only styling */
    align-self: end;
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--body-padding) * 2);
    /* width: 100%; */
    /* overflow: auto; */
    flex-wrap: wrap-reverse;
    /* justify-content: start; */
    /* align-items: start; */
    box-sizing: border-box;
}

#console-box {
    margin: 1rem;
    position: absolute;
    background-color: white;
    top: 0;
    left: 0;
    padding: 1rem;
}
.dummy-app-box .app-title {
    /* opacity: 0.6; */
    color: cyan;
}

.app-box {

    cursor: pointer;

    XXXXXXborder: 1px solid red;  /* Debug-only styling */

    display: flex;
    flex-direction: column;
    align-items: center;

    /* display: inline-block;
    vertical-align: top; */
    width: 5rem;
    height: 7rem;
    padding: 0.5rem;
    padding-bottom: 0;
    /* margin: 0; */
    /* margin: 0.8rem;   */
    /* Match #link-container bottom-margin with .app-box margin. */
    /* line-height: 1.2rem;   */
    /* Proportional 1.2:1 with font-size for: .app-title, .app-subtitle */
}

.app-box img {

    XXXXXXbackground-color: yellow;  /* Debug-only styling */

    display: block;
    margin: 0 0 0.4rem;
    box-sizing: border-box;
    /* border: 0.2rem solid hsla(0, 0%, 0%, 0); */
    /* border-radius: 30%; */
    object-fit: contain;
    width: 60%;
    aspect-ratio: 1/1;
    transition-duration: 150ms;
}

.app-title {
    /* text-decoration: none; */
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    /* background-color: hsl(221, 82%, 70%); */

    padding: 0.1rem 0.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    text-shadow:
        -1px -1px 0 var(--text-shadow-color), /* Top-left shadow */
        1px -1px 0 var(--text-shadow-color),  /* Top-right shadow */
        -1px 1px 0 var(--text-shadow-color),  /* Bottom-left shadow */
        1px 1px 0 var(--text-shadow-color);   /* Bottom-right shadow */

    XXXXXXtext-shadow:
        -1px -1px 0 black, /* Top-left shadow */
        1px -1px 0 black,  /* Top-right shadow */
        -1px 1px 0 black,  /* Bottom-left shadow */
        1px 1px 0 black;   /* Bottom-right shadow */
}

a {
    text-decoration: none;
}

.app-box:hover .app-title {
    background-color: hsl(221, 82%, 70%);
    /* background-color: white; */
}

#link-container {
    margin: 3rem 0 0.5rem;  /* Match #link-container bottom-margin with .app-box margin. */
}

/* #link {
    color: hsl(128, 100%, 70%);
    font-size: 1rem;
    transition-duration: 150ms;
} */

/* #link:hover {
    color: hsl(306, 100%, 50%);
} */

/* .anchor-button-wrapper button {
    margin: 0;
    width: 100%;
} */



.stapley-user-reply-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    xxxxxxOffForDebugOnlyxxxxxx_opacity: 0;  /* Init before active. */
}



#stapley-user-custom-reply-box {
    /* width:  */
    align-self: stretch;
}

#stapley-box, #scsvr-stapley-box {
    /* width: 8rem; */
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Init settings before animation begins */
    opacity: 0;

    top: 0;
    left: 0;
    transform: translate(-200%, -200%);  /* Ensure that stapley remains off-screen */
}
#stapley-box .stapley-body, #stapley-box .stapley-eyes {
    /* width: 100%; */
    width: 8rem;
}

#stapley-minimize, #stapley-close {
    height: 1.3rem;
    /* border: 1px solid black; */
}
#stapley-minimize-box:hover, #stapley-close-box:hover {
    background-color: black;
}
#stapley-minimize-box, #stapley-close-box {
    display: flex;
    margin-left: 0.5rem;
    border: 2px solid black;
}
#stapley-minimize-box {
    background-color: #febc2c;
}
#stapley-close-box {
    background-color: #ff5f57;
}
#stapley-minimize-box:hover #stapley-minimize {
    filter: invert(91%) sepia(11%) saturate(6102%) hue-rotate(333deg) brightness(101%) contrast(99%);  /* Black to #febc2c. */
}
#stapley-close-box:hover #stapley-close {
    filter: invert(37%) sepia(40%) saturate(902%) hue-rotate(314deg) brightness(131%) contrast(115%);  /* Black to #ff5f57. */
}

.stapley-menu-box {
    display: flex;
    right: 0;
}
.stapley-eyes, .stapley-menu-box {
    position: fixed;
    /* z-index: 1; */
    /* transition: transform 0.08s; */
}
#stapley-background {
    position: fixed;
    opacity: 0.6;
    height: 100vh;
    width: 100dvw;
    /* background-color: white; */
    background-color: var(--skyglass);
}

.stapley-menu-box, #stapley-message {
    /* margin: 0.5rem; */
}
#stapley-message {
    xxxxxxOffForDebugOnlyxxxxxx_opacity: 0;  /* Init before active. */
    /* margin: 0.5rem; */
    user-select: none;
    padding: 0.5rem;
    background-color: white;
    color: black;
    overflow-wrap: break-word;
    width: min(24rem, 80vw);
    border-color: hsl(0, 0%, 40%) black hsl(0, 0%, 40%);
    border-style: solid;
    border-width: 2px;
    /* transition: height 1s ease-in-out; */
}

/* #user-reply-input, #user-reply-submit {
    width: 100%;
} */

.hidden-text {
    /* opacity: 0; */
    color: hsla(0, 0%, 0%, 0%);
}

button, textarea {
    /* margin: 2px; */
}

textarea {
    box-sizing: border-box;
    resize: none;
}

/* a:has(.app-box) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
} */

.top-user-reply-button {
    margin: 0.3rem 0;
}
.top-user-reply-button {
    /* box-shadow: 1px 1px grey; */
    /* margin: 2px; */
    padding: 3px;
    outline: 2px outset hsl(0, 0%, 30%);
    border: none;
    background-color: hsl(0, 0%, 80%);
    cursor: default;
}

.button-box {
    color: black;
    font-size: 0.8rem;
    border: 1px dotted hsl(0, 0%, 20%);
    padding: 2px 0.5rem;
}
.top-user-reply-button:hover {
    background-color: hsl(0, 0%, 72%);
}





/* SCREENSAVER CSS */

#scsvr-background, #scsvr-background-color {
    position: fixed;
}

#scsvr-background-color {
    width: 100vw;
    background-color: white;
}

#scsvr-background {
    /* background-color: hsla(0, 0%, 100%, 20%); */
    /* background-color: white; */
    background-image: url("/static/stapley/paper_lines.png");
    background-position: center center;
    image-rendering: pixelated;
}

#scsvr-stapley-box {
    user-select: none;
}

#scsvr-stapley-box .stapley-body, #scsvr-stapley-box .stapley-eyes {
    width: 6rem;
    /* width: 50px; height: 100px; debug size */
}
