@font-face {
    font-family: 'pxcode';
    src: url(./PixelCode.ttf);
}

html {
    scrollbar-color: black white;
}

body {
    margin: 0;
    font-family: 'pxcode';

    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

button {
    font-family: 'pxcode';
    font-size: 1.5em;
    border: .2em solid black;
    background: white;
}
button:hover {
    cursor: pointer;
    background: black;
    color: white;
}

ul { 
    padding-top: 0;
    list-style-type: square;
}

#matrix:hover, #palette:hover, #stamp:hover {
    cursor: none;
}

#brush, .char, .palette-char, .stamp-char {
    font-size: 3em;
    text-align: center;
}

#brush {
    font-size: 3em;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    pointer-events: none;
    display: none;
}

#controls, #controls2 {
    width: 30em;
    position: fixed;
    padding: 1em;

    h2 { border-bottom: .2em solid black; margin: 0; }
}

#controls {
    h1 { margin: 0; }

    #palette {
        font-size: .9em;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;

        height: 38vh;
        overflow-y: scroll;
        scrollbar-color: black white;

        .palette-char {
            box-sizing: border-box;
            border: 1px dashed silver;
        }
        .palette-char:hover {
            border: 1px dashed blue;
        }
    }
}

#controls2 {
    right: 0;

    #stamp {
        width: calc(26em + 26px);
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin: 1em auto;

        border: .25em solid black;
        padding: 1em;

        .stamp-char {
            box-sizing: border-box;
            border: 1px dashed silver;
        }
        .stamp-char:hover {
            border: 1px dashed blue;
        }
    }

    #presets {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-top: .5em;
    }
}

#matrix {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 31em;
    margin: 0 auto;

    background-image: url(paperbg.jpg);
    background-size: 100% auto;
    filter: contrast(1.1);

    #buttons {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1em;

        #add-chars, #print {
            flex: 1;
        }
    }
}

.char, .palette-char, .stamp-char {
    display: inline-block;
    user-select: none;
}
.char:hover, .palette-char:hover, .stamp-char:hover {
    background: #FFD100;
}

@media print {
    #controls, #controls2, #brush { display: none; }

    #matrix {
        width: 31em;

        background-image: none;
        filter: none;

        #buttons {
            display: none;
        }
    }

    .char {
        font-size: 3em;
    }
}