@font-face {
    font-family: 'TheGoodMonolith';
    font-style: normal;
    font-weight: 500;
    src: url('./fonts/TheGoodMonolith.woff') format('woff');
}

:root{
    --black: #000000;
    --white: #ffffff;
    --grey1: #8c96a0;
    --grey2: #aaaaaa;
    --purple: #463c46;
    --gold: #f2a60d;
    font-family: 'TheGoodMonolith', sans-serif, monospace;
    color: var(--black);
    font-weight: bold;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    cursor: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -ms-user-drag: none;
    /* user-drag: none; */
}

#custom_cursor{
    display: none;
    position: absolute;
    z-index: 10;
    pointer-events: none;
    width: 32px;
    height: 32px;
    background-image: url(./img/cursor/pen.png);
    background-size: 32px;
    image-rendering: pixelated;
}

#cursor > img{
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.purple-text{
    color: var(--purple);
}

* p{
    margin: 0;
    padding: 0;
}

button, input{
    font-family: 'TheGoodMonolith', sans-serif, monospace;
    font-weight: bold;
    font-size: 16px;
    border: 0;
    cursor: none;
    padding: 0;
}

body{
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--grey1);
    display: grid;
    grid-template-columns: 48px auto 240px;
    grid-template-rows: 48px auto 48px;
}

.inactive{
    color: var(--white);
}

.top-bar{
    min-width: 100%;
    min-height: 48px;
    height: 100%;
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 1;
    grid-row-end: 2;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 4px;
}

.top-button{
    background-image: url(./img/ui/buttonbox.png);
    background-size: 80px 30px;
    image-rendering: pixelated;
    height: 30px;
    width: 80px;
    background-color: var(--white);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.top-button > p{
    padding-bottom: 6px;
}

.dropdown{
    background-color: var(--grey2);
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    gap: 4px;
    image-rendering: pixelated;
    z-index: 1;
    width: 200px;
}

#file_dropdown{
    height: 180px;
    background-image: url(./img/ui/menu_file_box.png);
    background-size: 200px 180px;
    display: none;
}

#view_dropdown{
    /* height: ;
    background-image: url();
    background-size: ; */
    display: none;
}

.dropdown-button{
    /* background-color: red; */
    width: calc(100% - 20px);
    margin: 0 auto;
    padding: 0 10px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-button:hover{
    background-color: var(--purple);
    color: var(--white);
}

.dropdown-button-separator{
    height: 1px;
    width: calc(100% - 20px);
    margin: 0 auto;
    border-top: 2px dashed var(--purple);
}


.pen-size{
    width: 40px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(./img/ui/mediuminputbox.png);
    background-size: 40px 30px;
    image-rendering: pixelated;
    background-position: left top;
}

.pen-size > input{
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: 0;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

#canvas_menu_wrapper{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.canvas-menu{
    background-color: var(--grey1);
    border: 1px solid var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    gap: 10px;
    width: 272px;
    height: auto;
    z-index: 1;
}

.canvas-menu-header{
    width: calc(100% - 20px);
    height: 30px;
    background-color: var(--purple);
    margin: 0;
    color: var(--white);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
}

.canvas-menu-size, .canvas-menu-orientation, .canvas-menu-background{
    width: calc(100% - 20px);
    margin: 0 auto;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
}

.canvas-menu-size > p, .canvas-menu-orientation > p, .canvas-menu-background > p{
    width: calc(100% - 20px);
    height: 20px;
    margin: 0;
    padding: 0 10px;
}

.canvas-menu-size > section{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.canvas-menu-size > section input{
    background-image: url(./img/ui/canvasinputbox.png);
    background-size: 80px 20px;
    image-rendering: pixelated;
    width: 80px;
    height: 20px;
    text-align: center;
    vertical-align: middle;
    padding: 0;
}

.canvas-menu-orientation > div{
    width: 100%;
    height: 128px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.canvas-menu-orientation > div button{
    background-color: var(--white);
    image-rendering: pixelated;
}

.canvas-menu-orientation > div button:nth-child(1){
    width: 100px;
    height: 128px;
    background-image: url(./img/ui/canvas_vertical.png);
    background-size: 100px 128px;
}

.canvas-menu-orientation > div button:nth-child(2){
    width: 128px;
    height: 100px;
    background-image: url(./img/ui/canvas_horizontal.png);
    background-size: 128px 100px;
}

.canvas-menu-background > div{
    width: 100%;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.canvas-menu-background > div button{
    width: 64px;
    height: 64px;
    background-color: var(--white);
    border: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: 64px;
    image-rendering: pixelated;
}

.canvas-menu-background > div button:nth-child(1){
    background-image: url(./img/canvas/canvasmenutransparent.png);
}

.canvas-menu-background > div button:nth-child(2){
    background-image: url(./img/canvas/canvasmenublack.png);
}

.canvas-menu-background > div button:nth-child(3){
    background-image: url(./img/canvas/canvasmenuwhite.png);
}

.canvas-menu-create{
    width: calc(100% - 20px);
    height: 30px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
}

.canvas-menu-create > button{
    background-color: var(--purple);
    color: var(--white);
    width: 80px;
    height: 30px;
    font-weight: bold;
}

.left-bar{
    min-width: 48px;
    width: 100%;
    height: 100%;
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 2;
    grid-row-end: 3;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 4px;
}

.left-button{
    width: 40px;
    height: 40px;
    border: 0;
    outline: 0;
    padding: 0;
    background-color: var(--white);
    background-size: 40px;
    image-rendering: pixelated;
}

/* TOOL BUTTONS --> */
#pen_button{
    background-image: url(./img/buttons/penButton.png);
}

#eraser_button{
    background-image: url(./img/buttons/eraserButton.png);
}

#eyedropper_button{
    background-image: url(./img/buttons/eyedropperButton.png);
}
/* TOOL BUTTONS <-- */

.canvas-area{
    background-color: var(--purple);
    width: 100%;
    height: 100%;
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 2;
    grid-row-end: 3;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;

    /* position: relative; */
}

#canvas{
    background-origin: border-box;
    background-repeat: repeat;
    background-image: url(./img/canvas/canvasBackground.png);
    background-position: left top;
    background-color: var(--white);
    border: 1px solid var(--black);
    image-rendering: pixelated;
    /* canvas controlls require this */
    position: relative;
}

.right-bar{
    min-width: 240px;
    width: 100%;
    height: 100%;
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row-start: 2;
    grid-row-end: 3;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 4px;
}

.right-bar > section{
    width: 232px;
    height: 100%;
    display: grid;
    grid-template-columns: 232px;
    grid-template-rows: 116px 32px auto 202px;
    align-items: center;
    gap: 4px;
}

.spectrum{
    width: 100%;
    height: 100%;
    background-color: var(--purple);
}

.pen-colour{
    width: 100%;
    height: 32px;
    display: grid;
    grid-template-columns: auto auto 32px;
    gap: 4px;
    align-items: center;
}

.colour-button{
    background-image: url(./img/ui/maincolourbox.png);
    background-size: 96px 32px;
    image-rendering: pixelated;
    width: 100%;
    height: 32px;
}

#palette_button{
    background-image: url(./img/ui/pelette_button.png);
    background-size: 32px;
    background-color: var(--grey2);
    image-rendering: pixelated;
    width: 32px;
    height: 32px;
    position: relative;
}

.palette-dropdown{
    background-image: url(./img/ui/colour_palette_box.png);
    background-size: 200px 234px;
    background-color: var(--grey2);
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    height: 234px;
    flex-direction: column;
    gap: 4px;
    justify-content: flex-start;
    align-items: baseline;
    display: none;
}

.palette-dropdown-button{
    width: calc(100% - 20px);
    height: 30px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
}

.palette-dropdown-button:hover{
    background-color: var(--purple);
    color: var(--white);
}

.colour-list{
    background-color: var(--purple);
    width: 100%;
    height: calc(100% - 16px);
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: repeat(auto-fill, 32px);
    grid-template-rows: repeat(auto-fill, 32px);
    grid-row: auto;
    gap: 4px;
    padding: 8px 0;
}

.colour-list button{
    width: 32px;
    height: 32px;
    border: 1px solid var(--black);
}

.layer-list{
    background-color: var(--purple);
    width: 100%;
    min-height: 202px;
    display: grid;
    justify-content: center;
    align-items: baseline;
    grid-template-columns: 100%;
    grid-template-rows: repeat(auto-fill, 32px);
    grid-row: auto;
    gap: 2px;
}

.bottom-bar{
    min-width: 100%;
    min-height: 48px;
    height: 100%;
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 3;
    grid-row-end: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-left{
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 10px;
}

.bottom-button{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.bottom-button > img{
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
}

.textbox{
    image-rendering: pixelated;
    background-color: var(--grey2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.large-textbox{
    background-image: url(./img/ui/textbox.png);
    background-size: 80px 30px;
    width: 80px;
    height: 30px;
}

.medium-textbox{
    background-image: url(./img/ui/mediumtextbox.png);
    background-size: 40px 30px;
    width: 40px;
    height: 30px;
}

.small-textbox{
    background-image: url(./img/ui/smalltextbox.png);
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
}

#zoom_plus, #zoom_minus{
    width: 20px;
    height: 20px;
    background-color: #aaaaaa;
    border: 0;
    background-repeat: no-repeat;
    background-size: 100%;
    image-rendering: pixelated;
}

#zoom_plus{
    background-image: url(./img/symbols/zoom_plus.png);
}

#zoom_minus{
    background-image: url(./img/symbols/zoom_minus.png);
}

#save{
    background-color: #aaaaaa;
    background-image: url(./img/ui/buttonbox.png);
    background-size: 80px 30px;
    image-rendering: pixelated;
    height: 30px;
    width: 80px;
    border: 0;
    padding-bottom: 6px;
}