<!-- styling -->

<!-- scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/draggabilly/3.0.0/draggabilly.pkgd.min.js"></script>

<!-- more css -->
<style>

/*----- variables -----*/

:root {

	/*----- body -----*/
    --page-background:rgb(238, 238, 238);
	--text: #444444;
    
    /*----- windows -----*/
    --window-border: solid 1px rgba(150, 138, 255, 0.4); /* replace with "none" (without quotes) if you don't want a border */
    --window-container-background: #cac6cb;
    --window-title-background: rgb(143, 142, 143);
    --window-title-background-clicked: rgba(143, 142, 143, 0.5);
    --window-title-font: nineteen93; 
    --window-text-background: #f7f7f7;
    --window-text-font: "Montserrat", "IBM Plex Sans Thai", sans-serif; 
    --window-shadow: 10px 10px 0px rgba(150, 138, 255, 0.4); /* replace with "none" (without quotes) if you don't want a box shadow */
    --window-padding: 10px;
    --window-border-radius: 5px;

    /*----- dark mode -----*/
    --page-background-dark:rgb(19, 19, 19);
    --text-dark: #ddd;
    --window-container-background-dark: #161616;
    --window-text-background-dark: #1f1f1f;
    --window-shadow-dark: 10px 10px 0px rgba(69, 48, 255, 0.6);
    --window-border-dark: solid 1px rgb(69, 48, 255);
    --window-title-color-dark:#ddd;
    --window-title-background-dark:rgba(69, 48, 255, 0.7);
    --window-title-background-clicked-dark:rgba(69, 48, 255, 0.5);
  }

/*----- windows -----*/

button {
    border: none;
    margin: 0;
    padding: 0;
    width: auto;
    overflow: visible;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: normal;
    -webkit-font-smoothing: inherit;
    -moz-osx-font-smoothing: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.window_container {
    background-color:var(--window-container-background);
    border: var(--window-border);
    box-shadow: var(--window-shadow);
    border-radius: var(--window-border-radius);
    position: absolute;
}

.draggable {
  position: absolute;
  z-index: 99;
} 

.draggable.is-pointer-down {
  z-index: 100;
}

.window_interior {
    margin: var(--window-padding);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.window_top {
    overflow:hidden;
	cursor: grab;
	.is-pointer-down & {
		cursor: grabbing;
	}
}

.window_title {
    font-size: 9px;
    font-family: var(--window-title-font);
    height: 9px;
    float:left;
    width:calc(100% - 84px); /* if you change the size of the control buttons be sure to adjust this width too*/
    letter-spacing:0px;
    overflow:hidden;
    background-color: var(--window-title-background);
    border-radius: calc(var(--window-border-radius) - 2px);
    padding: 11px 7px 10px 10px;
}

.window_title:hover{
    background-color: var(--window-title-background-clicked);
}

.window_control {
    display:flex;
    float: right;
    margin-right: 0px;
}

.smallbox {
    margin-right:1px;
    margin-top: 1px;
    padding:0px;
    width:29px;
    height:29px;
}

.minimize, .maximize {
    cursor:help;
}

.minimize_control {
    margin-top:24px;
    width:24px;
    height:2px;
    background:var(--window-title-background);
    border-radius: 1px;
}

.smallbox:hover .minimize_control, .smallbox:hover .maximize_control{
    opacity: 0.6;
}

.maximize_control {
    margin-top:2px;margin-left:2px;
    border-radius: 2px;
    width:21px;height:21px;
    border:2px solid var(--window-title-background);
}

.window_description {
    display: block;
    background: var(--window-text-background);
    border-radius: calc(var(--window-border-radius) - 2px);
    overflow-y: scroll;
    padding: 10px;
    height: 100%;
    margin-top:calc(var(--window-padding) + 1px);
    margin-bottom: 1px;
    font-family: var(--window-text-font);
}

.window_description img {
    margin: 0;
    padding: 0;
    display: inline;
}

/*----- dark mode support -----*/

@media (prefers-color-scheme: dark) {

    body{
        background-color: var(--page-background-dark);
        color:var(--text-dark);
    }

    .window_container {
        background-color:var(--window-container-background-dark);
        border: var(--window-border-dark);
        box-shadow: var(--window-shadow-dark);
    }

    .window_description {
        background: var(--window-text-background-dark);
    }

    .window_title {
        color: var(--window-title-color-dark);
        background-color: var(--window-title-background-dark);
    }
    
    .window_title:hover{
        background-color: var(--window-title-background-clicked-dark);
    }

    .minimize_control {
        background:var(--window-title-background-dark);
    }
    
    .maximize_control {
        border:2px solid var(--window-title-background-dark);
    }

}

/*----- unique window styling: #blue -----*/

#blue.window_container {
    background-color: #2e2e2e;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#blue .window_interior {
    margin: 0px;
}

#blue .window_top {
  color: #e2e2e2;
    background-color: #444;
    height: 30px;
    display: unset;
    align-items: unset;
}

#blue .window_control {
    display:inline;
    float: left;
  
  ul, li {
    display: inline-block;
  }
  ul {
    margin: 6px 0 6px 0;
    padding-left: 10px;
  }
  ul li {
    width: 12px;
    height: 12px;
    margin-right: 2px;
    border-radius: 50%;
  }
    
ul li:first-child {
    background-color: #ff6059;
}
ul li:nth-child(2) {
    background-color: #ffbd2e;
}
ul li:last-child {
    background-color: #29ca42;
}

}

#blue .window_title {
    font-size: 9px;
    font-family: var(--window-title-font);
    background-color: unset;
    padding: 0px;
    float: left;
    height: 30px;
    line-height: 30px;
    text-align: left;
    margin-left: 10px;
}

#blue .window_description {
    font-family: monospace;
    color: #00ff00;
    overflow-y: scroll;
    background-color: unset;
}


/*----- unique window styling: #mac -----*/

#mac.window_container {
    background-color: #2e2e2e;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#mac .window_interior {
    margin: 0px;
}

#mac .window_top {
  color: #e2e2e2;
    background-color: #444;
    height: 30px;
    display: unset;
    align-items: unset;
}

#mac .window_control {
    display:inline;
    float: left;
  
  ul, li {
    display: inline-block;
  }
  ul {
    margin: 6px 0 6px 0;
    padding-left: 10px;
  }
  ul li {
    width: 12px;
    height: 12px;
    margin-right: 2px;
    border-radius: 50%;
  }
    
ul li:first-child {
    background-color: #ff6059;
}
ul li:nth-child(2) {
    background-color: #ffbd2e;
}
ul li:last-child {
    background-color: #29ca42;
}

}

#mac .window_title {
    font-size: 9px;
    font-family: var(--window-title-font);
    background-color: unset;
    padding: 0px;
    float: left;
    height: 30px;
    line-height: 30px;
    text-align: left;
    margin-left: 10px;
}

#mac .window_description {
    font-family: monospace;
    color: #00ff00;
    overflow-y: scroll;
    background-color: unset;
}


/*----- window section size and initial locations -----*/

#original {
    top:5dvh;
    left:5dvh;
    width: 600px;
}

#original .window_description {
    height: 500px;
}

#blue {
    top:10dvh;
    right:13dvh;
    width: 230px;
}

#mac {
    top: 10dvh;
    right: 70dvw;
    width: 301px;
}

#mac .window_description {
    height: 200px;
}

</style>
