@import url(/global.css);

textarea::selection {
    background: Highlight;
    color: HighlightText;
}

div.top {
    top: 0;
    width: 100%;
    position: fixed;
    background-color: #242424dd;
    backdrop-filter: blur(5px);
    user-select: none;
    z-index: 9999;
}

div.top div#editing {
    width: max-content;
}

div.top > button,
div.top > label {
    padding: 8px;
    margin: 10px 4px 10px 10px;
    cursor: pointer;
    background-color: #242424;
    color: white;
    border: 2px solid #242424;
    border-radius: 5px;
    font-size: 14px;
}

div.top > input {
    display: none;
}

div.top > button:not(:nth-child(1)),
div.top > label:not(:nth-child(1)) {
    margin: 10px 4px 10px 4px;
    }

div.top > button:hover,
div.top > label:hover {
    cursor: pointer;
    background-color: rgb(42, 42, 42);
    color: white;
    border: 2px solid #282828;
}

div.left {
    left: 0;
    top: 55px;
    position: absolute;
    background-color: #242424;
    height: 100%;
    max-width: 35%;
    z-index: 2;
}

#notes {
    display: grid;
    scroll-behavior: smooth;
}

#notes > button {
    cursor: pointer;
    user-select: none;
    padding: 4px 4px;
    margin: 4px 7px;
    background-color: #303030;
    color: white;
    border: 2px solid transparent;
    text-align: left;
    border-radius: 5px;
}

button[class="new-note open"] {
    background-color: #353535;
}

#notes > button:hover {
    background-color: #343434;
}

#editor-area {
    width: calc(100% - 190px);
    height: 100%;
    position: absolute;
    top: 55px;  
    left: 190px;
    background-color: #2a2a2a;
    color: white;
    border: none;
    outline: none;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
    resize: none;
    display: none;
}

@media (max-width: 1024px) {
    div.left {
        max-width: 50%;
    }
    
    #editor-area {
        width: calc(100% - 150px);
        left: 150px;
    }
}

@media (max-width: 768px) {
    div.left {
        max-width: 60%;
    }
    
    #editor-area {
        width: calc(100% - 120px);
        left: 120px;
    }
}

@media (max-width: 480px) {
    div.left {
        max-width: 100%;
        height: auto;
        position: relative;
    }
    
    #editor-area {
        width: 100%;
        left: 0;
        top: auto;
        position: relative;
    }

    div.top {
        position: relative;
    }
}
