:root {
    --debug-outline: 0px;
    --foreground-colour: rgb(255, 255, 255);
    --background-colour: rgb(48, 48, 48);
    --font-size: 16px;
    --font-family: monospace, sans-serif;
    --font-weight: 400;
    --scrollbar-slider: rgb(84, 93, 103);
    --scrollbar-gutter: transparent;
    --scrollbar-colour: var(--scrollbar-slider) var(--scrollbar-gutter);
    --note-width: 220px;
    --note-height: 220px;
    --note-colour: darkslategrey;
}

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    src: url(/html-demos/demos/permanent/StickyNotesLite/material-symbols-outlined.woff2) format('woff2'), 
    url(material-symbols-outlined.woff2) format('woff2'), 
    url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v226/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2) format('woff2');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga' 1;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    color: white;
    user-select: none;
}

.material-symbols-outlined.small {
    font-size: 16px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    overflow: auto;
    user-select: none;
    background-color: var(--background-colour);
    color: var(--foreground-colour);
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: var(--font-weight);
    scrollbar-color: var(--scrollbar-colour);
    box-shadow: inset 0 0 0 var(--debug-outline) var(--foreground-colour);
}

* {
    user-select: none;
}

.hidden {
    display: none !important;
}

textarea {
    all: unset;
}

#page {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    justify-content: space-evenly;
    align-items: center;
    padding: 32px 32px;
    gap: 16px;
    flex-wrap: wrap;
    user-select: none;
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    box-shadow: inset 0 0 0 var(--debug-outline) orange;
}

.note-container {
    position: relative;
    height: var(--note-height);
    width: var(--note-width);
    box-sizing: border-box;
    user-select: none;
    background-color: transparent;
    box-shadow: inset 0 0 0 var(--debug-outline) orange;
}

.note-container.expanded {
    width: 80%;
    height: 80%;
    max-width: 600px;
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: transparent;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.note-container.expanded .note {
    outline: 3px solid rgb(80, 96, 96);
}

.note {
    height: 100%;
    width: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    user-select: none;
    border-radius: 24px;
    white-space: normal;
    word-wrap: break-word;
    overflow: auto;
    background-color: var(--note-colour);
}

#toolbar-container {
    width: 48px;
    height: 48px;
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    margin: 24px;
    user-select: none;
    flex-direction: column-reverse;
    overflow-y: hidden;
    overflow-x: hidden;
    box-shadow: inset 0 0 0 var(--debug-outline) green;
    z-index: 9999;
}

#toolbar-container:hover {
    overflow: visible;
}

/* #toolbar-container > :first-child:hover > * {
    transform: rotate(180deg);
} */

.toolbar-row {
    height: 48px;
    width: 48px;
    flex-shrink: 0;
    flex-grow: 0;
    display: flex;
    overflow: hidden;
    user-select: none;
    flex-direction: row-reverse;
    box-shadow: inset 0 0 0 var(--debug-outline) teal;
}

.toolbar-row:hover {
    overflow: visible;
    user-select: none;
}

.toolbar-button {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 0;
    flex-shrink: 0;
    background-color: rgba(17, 60, 70, 0.7);
    user-select: none;
    cursor: pointer;
    box-shadow: inset 0 0 0 var(--debug-outline) yellow;
}

.note-title {
    padding: 0px;
    padding-right: 18px;
    height: auto;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 var(--debug-outline) orange;
    font-size: 16px;
    display: inline-block;
    /* -webkit-text-autocorrect: none;
    -webkit-user-modify: read-write-plaintext-only; */
    margin: 0px 0px 8px 0px;
    box-shadow: inset 0 -1px grey;
}

.note-title:focus {
    border: none;
    outline: none;
    box-sizing: border-box;
}

.note-content {
    font-size: 10px;
    flex-grow: 1;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-text-autocorrect: none;
    -webkit-user-modify: read-write-plaintext-only;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: normal;
}

.note-content:focus {
    border: none;
    outline: none;
    box-sizing: border-box;
}

.note-button {
    --size: 24px;
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--size);
    height: var(--size);
    margin: 14px 12px;
    flex-grow: 0;
    flex-shrink: 0;
    z-index: 9;
    user-select: none;
    border-radius: 50%;
    cursor: pointer;
}

.note-button:active {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

@media (max-width: 600px) {

    :root {
        --note-width: 300px;
        --note-height: 300px;
    }

    #page {
        padding: 32px 16px;
        gap: 32px;
    }

    .note-content {
        font-size: 14px;
    }

    .note-title {
        padding-right: 24px;
        font-size: 22px;
    }

    .material-symbols-outlined.small {
        font-size: 20px;
        font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    }
    .note-button {
        --size: 24px;
        margin: 18px 12px;
    }

    .note-container.expanded {
        width: 95%;
        height: 80%;
        position: absolute;
        top: 50%;
        left: 50%;
        background-color: transparent;
        transform: translate(-50%, -50%);
        z-index: 100;
    }
    
    .note-container.expanded .note {
        outline: 3px solid rgb(80, 96, 96);
    }

}

/* Desktop - precise pointer and supports hover */
@media (pointer: fine) and (hover: hover) {
    #toolbar-container:hover {
        overflow: visible;
        user-select: none;
    }

    /* #toolbar-container:hover> :first-child> :first-child {
        transform: rotate(180deg);
    } */
}