:root{
    --main-bg-color: rgb(255, 255, 255);
    --secondary-bg-color: rgb(216, 216, 216);
    --main-font-color: rgb(0, 0, 0);
    --main-accent-color: rgb(145, 192, 149);
    --secondary-accent-color: rgb(218, 136, 136);
    --terciary-accent-color:  rgb(211, 209, 171);
}
*{
    transition: .2s;
}

button{
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--main-font-color);
    &:hover{
        cursor: pointer;
        scale: 1.2 1.2;
    }
}
a{
    background-color: var(--main-bg-color);
    border: 1px solid var(--main-font-color);
    border-radius: 1rem;

    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    color: var(--main-font-color);

    position: absolute;
    left: 91.5%;
    top: 2.5%;
}
#dark-mode-button{
    background-color: var(--main-bg-color);
    border: 1px solid var(--main-font-color);
    border-radius: 1rem;

    width: 25px;
    height: 25px;

    position: absolute;
    left: 95%;
    top: 2.5%;
}
.dark-mode{
    --main-bg-color: rgb(39, 39, 39);
    --secondary-bg-color: rgb(82, 82, 82);
    --main-font-color: rgb(245, 245, 245);
    --main-accent-color: rgb(84, 158, 90);
    --secondary-accent-color: rgb(228, 78, 90);
    --terciary-accent-color:  rgb(150, 135, 94);
}
body{
    background: var(--main-bg-color);
    color: var(--main-font-color);

    box-sizing: border-box;
    margin: 0 auto;
    padding: 0;

    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
header{
    text-align: center;
    border-bottom: 1px solid var(--main-font-color);
}
.action-menu{
    margin-top: 1rem;
    display: grid;
    grid-auto-flow: column;
    gap: 1rem;

    place-content: center;

    border-bottom: 1px solid var(--main-font-color);
    padding: 0 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.notes-container{
    padding: 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    place-items: center;
}
.note{
    width: 400px;
    height: 300px;

    border: 1px solid var(--main-font-color);
    border-radius: 1rem;

    text-align: center;
    display: flex;
    flex-direction: column;
    background: var(--main-bg-color);

    & .note-title-container{
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding-inline: 1rem;
        
        background-color: var(--terciary-accent-color);
        border-radius: 1rem 1rem 0rem 0rem;
        position: relative;
        & h1{
            text-align: left;
        }
    }
    & .note-title-container button{
        display: none;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;

        width: 30px;
        height: 30px;

        background: var(--secondary-accent-color);
        border: none;
        border-radius: 1rem;
    }
}
.note > p{
    padding-inline: .5rem;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    
    line-break: auto;
    white-space: collapse;

    & .note > p::-webkit-scrollbar {
    display: none;
  }
}
.create-button{
    max-width: 200px;
    padding: 1rem;
    
    border: 1px solid var(--main-font-color);
    border-radius: 1rem;

    background: var(--secondary-bg-color);

    text-align: center;
    font-weight: bold;
}
.create-button:hover{
    background: var(--main-accent-color);
    color: #fff;

    cursor: pointer;
}

/*Note Creation Screen*/

.note-creation-screen{
    display: none;
    &::before{
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: black;
        opacity: .5;
    }
}
.note-creation-wrapper{
    width: 80vw;

    position: absolute;
    top: 3dvh;
    left: 8%;

    background: var(--main-bg-color);
    border: 1px solid var(--main-font-color);

    padding: 1rem;
    & .note-creation-header{
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    & .create-screen-buttons{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
    }
    & button{
        display: flex;
        align-items: center;
        justify-content: center;

        width: 30px;
        height: 30px;

        background: var(--secondary-accent-color);
        border: none;
        border-radius: .5rem;
        &:hover{
            cursor: pointer;
            scale: 1.2 1.2;
        }
    }
    & #add-note-button{
        background: var(--main-accent-color);
    }
}
.input-box{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    & input{
        border: none;
        border-bottom: 1px solid var(--main-font-color);
    }
    & input:focus, select:focus{
        outline: none;
        border-bottom: 1px solid var(--main-accent-color);
    }
    & textarea{
        resize: none;
        margin-bottom: 1rem;
        &:focus{
            outline: none;
            border: 1px solid var(--main-accent-color);
        }
    }
}
.note-creation-preview{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background: var(--secondary-bg-color);
    padding-inline: 1rem;
}
.note-creation-preview .note{
    scale: .8 .8;
}
.note-creation-preview-title{
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;
}
#reload-preview{
    background: var(--main-bg-color);
    width: 80px;
    height: 45px;
}
/*Responsivenesss*/
@media all and (max-width: 1500px) {
    .notes-container{
        grid-template-columns: repeat(3, 1fr);
    }
}
@media all and (max-width: 1100px) {
    .notes-container{
        grid-template-columns: repeat(2, 1fr);
    }
}
@media all and (max-width: 800px) {
    input{
        height: 40px;
    }
    .notes-container{
        margin-top: 1rem;
        grid-template-columns: repeat(1, 1fr);
    }
    #preview-note{
        scale: 0.55;
    }
    #dark-mode-button{
        width: 35px;
        height: 35px;
        left: 85%;
    }
    a{
        width: 32.5px;
        height: 32.5px;
        left: 75.5%;
    }
}
@media all and (max-width: 400px) {
    header{
        text-align: left;
        padding-left: 1rem;
    }
    .note-creation-wrapper{
        left: 5%;
    }
    .note{
        width: 275px;
    }
    #dark-mode-button{
        left: 86.5%;
    }
    a{
        left: 75.5%;
    }
}