@charset "utf-8";

/* Design for mobile first (in future) */
/* vmin vmax */

header {
    height: 40px;
    background-color: #7777FF;
    display: flex;
}

body {
    overflow-x: hidden;
    height: 100vh;
}

#noteIcon {
    background-image: url("../img/note.png");
    background-repeat: no-repeat;
    background-size: 60%;
    background-position: center;
    width: 40px;
    height: 100%;
    cursor: pointer;
}

#flexGrow {
    flex-grow: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wrapper {
    display: flex;
    height: calc(100vh - 40px);
}

/* Menu */
b {
    font-weight: bolder;
}

#menuToggleBtn {
    background-color: #5555FF;
    background-image: url("../img/menu.png");
    background-repeat: no-repeat;
    background-size: 60%;
    background-position: center;
    cursor: pointer;
    width: 40px;
    height: 100%;
}

#menu {
    width: 300px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background-color: #5555FF;
    transition: all 0.4s ease-in-out;
}

#newNoteBtn {
    height: 40px;
    background-color: #49b4f1;
    margin: 5px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    color: lightcyan;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5em;
    font-weight: bolder;
}

#search {
    margin: 5px;
    display: flex;   
}

#search input {
    border: 2px solid #49b4f1;
    border-radius: 5px;
    height: 30px;
    width: 100px;
    flex-grow: 1;
}

#search input::placeholder {
    color: #CCCCCC;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em;
}

#search input[type="text"] {
    color: #EEEEEE;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em;
}

#search select {
    appearance: auto;
    height: 30px;
    text-align: center;
    border: 2px solid #49b4f1;
    border-radius: 5px;
    color: #EEEEEE;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em;
    background-color: #5555FF;
    padding-top: 2px;
    cursor: pointer;
}

#search button {
    background-color: #77c9f8;
    border-radius: 5px;
    justify-self: flex-end;
    color: #FFFFFF;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em;
    font-weight: bold;
    padding: 2px;
    cursor: pointer;
}

#menuNotes {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
}

#menuNotes::-webkit-scrollbar {
    width: 5px;
    background-color: #CCCCFF;
}

#menuNotes::-webkit-scrollbar-thumb {
    background-color: #49b4f1;
    border-radius: 30px;
}



.previewNote {
    width: 290px;
    margin-bottom: 5px;
    border: 2px solid #49b4f1;
    border-radius: 5px;
    cursor: pointer;
}

.previewNote h3 {
    background-color: #9999FF;
    height: 25px;
    padding: 0px 2px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    color: #333333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.previewNote p {
    background-color: #CCCCFF;
    height: 70px;
    padding: 0px 2px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    color: #333333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Opened Note */
#openedNote {
    padding: 10px;
    height: calc(100vh - 40px);
}

#openedNote form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
}

#openedNoteHeader {
    width: calc(100vw - 320px);
    height: 40px;
    transition: all 0.4s ease-in-out;
    display: flex;
    border: 2px solid #49b4f1;
    border-radius: 7px;

}

@media (max-width: 1120px) {
    .openedNoteTime {
        width: 100px !important;
        font-size: .9vw !important;
    }
}

@media (max-width: 900px) {
    #openedNoteTitle {
        width: calc(100vw - 400px);
    }
    .openedNoteTime {
        visibility: hidden;
        width: 0px !important;
        padding: 0px !important;
    }
    #openedNoteDelete {
        justify-self: flex-end;
    }
}

@media (max-width: 768px) {
    #menu {
        z-index: 100;
    }
    #openedNote {
        position: absolute;
        top: 40px;
        left: 40px;
        width: calc(100vw - 40px) !important;
        z-index: 0;
    }
    #openedNoteHeader {
        width: calc(100vw - 60px) !important;
    }
    #openedNoteText {
        width: calc(100vw - 60px) !important;
        font-size: 15px !important;
    }
    .openedNoteTime {
        visibility: hidden;
        width: 0px !important;
        padding: 0px !important;
    }
    #openedNoteDelete {
        justify-self: flex-end;
    }
    #noNoteOpened {
        width: calc(100vw - 60px) !important;
    }
    #openedNoteTitle {
        width: calc(100vw - 400px);
        font-size: 25px !important;
    }
    #menuUsername {
        font-size: 15px !important;
        padding-top: 5px;
    }
}

#openedNoteTitle {
    flex-grow: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: bold;
    color: #333333;
    padding: 0px 0px 0px 5px;
}

.openedNoteTime {
    width: 165px;
    padding: 0px 10px;
    border-left: 2px solid #49b4f1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333333;
    text-align: center;
}

#openedNoteSave {
   width: 40px;
   flex-shrink: 0;
   background-image: url('../img/save.png');
   background-repeat: no-repeat;
   background-size: 80%;
   background-position: center;
   border-left: 2px solid #49b4f1;
   cursor: pointer;
}

#openedNoteDelete {
   width: 40px;
   flex-shrink: 0;
   background-image: url('../img/delete.png');
   background-repeat: no-repeat;
   background-size: 80%;
   background-position: center;
   cursor: pointer;
}

#openedNoteText {
    width: calc(100vw - 320px);
    transition: all 0.4s ease-in-out;
    border: 2px solid #49b4f1;
    border-radius: 7px;
    margin-top: 10px;
    padding: 3px 5px;
    flex-grow: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    color: #333333;
    word-wrap: break-word;
}

#noNoteOpened {
    height: calc(100vh - 50px);
    width: calc(100vw - 400px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease-in-out;
}

#noNoteOpened h1 {
    color: #333333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 5vw;
    font-weight: bold;
}

#noNoteOpened p {
    color: #666666;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 3vw;
}

/* Confirm Message */
#confirmMessage {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    opacity: 0.7;
    z-index: 100;
    top: 0;
    left: 0;
    cursor: pointer;
    visibility: hidden;
}

#confirmMessageWindow {
    width: 40vw;
    min-width: 300px;
    max-width: 500px;
    height: 40vh;
    min-height: 360px;
    max-height: 450px;
    background-color: white;
    border: 2px solid #49b4f1;
    border-radius: 10px;
    z-index: 200;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2em;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    color: #333333;
}

#confirmMessageWindow h2{
    padding-bottom: 5vh;
}

#confirmMessageWindow button {
    margin: 0px 2vw;
    padding: 10px 10px;
    border: 2px solid #49b4f1;
    border-radius: 5px;
    cursor: pointer;
}

#confirmDelete {
    background-color: #00FF00;
}

#cancelDelete {
    background-color: #FF0000;
}

.windowFlex {
    position: fixed;
    top: 20vh;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    visibility: hidden;
    z-index: 150;
}

/* Login / Signup */
#loginSignup {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    opacity: 0.9;
    z-index: 100;
    top: 0;
    left: 0;
    visibility: visible;
}

.loginSignupWindow {
    width: 40vw;
    min-width: 300px;
    max-width: 500px;
    height: 55vh;
    min-height: 360px;
    max-height: 450px;
    background-color: white;
    border: 2px solid #49b4f1;
    border-radius: 10px;
    z-index: 200;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.2em;
    display: flex;
    flex-direction: column;
    color: #333333;
    overflow: hidden;
}

.loginSignupWindow h2 {
    font-size: 1.5em;
    font-weight: bold;
}

.loginSignupWindow input {
    border: 2px solid #49b4f1;
    border-radius: 3px;
}

.loginSignupWindow button {
    margin: 0px 2vw;
    padding: 10px 10px;
    border: 2px solid #49b4f1;
    border-radius: 5px;
    cursor: pointer;
    background-color: #2222FF;
    color: #EEEEEE;
    font-size: 1.5em
}

#loginWindow {
    visibility: visible;
}

#goToSignupBtn, #goToLoginBtn {
    background-color: #7777CC;
    font-size: 0.5em;
}

/* Confirm Delete User */
#confirmDeleteUserBackground {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    opacity: 0.7;
    z-index: 100;
    top: 0;
    left: 0;
    cursor: pointer;
    visibility: hidden;
}

#confirmDeleteUserWindow {
    width: 40vw;
    min-width: 300px;
    max-width: 500px;
    height: 40vh;
    min-height: 360px;
    max-height: 450px;
    background-color: white;
    border: 2px solid #49b4f1;
    border-radius: 10px;
    z-index: 200;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2em;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    color: #333333;
    text-align: center;
    padding: 5px;
}

#confirmDeleteUserWindow h2 {
    padding-bottom: 5vh;
}

#confirmDeleteUserWindow button {
    margin: 0px 2vw;
    padding: 10px 10px;
    border: 2px solid #49b4f1;
    border-radius: 5px;
    cursor: pointer;
}

#confirmDeleteUser {
    background-color: #00FF00;
}

#cancelDeleteUser {
    background-color: #FF0000;
}

/* Update Password */
#updatePassword {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    opacity: 0.7;
    z-index: 100;
    top: 0;
    left: 0;
    cursor: pointer;
    visibility: hidden;
}

#updatePasswordWindow {
    visibility: hidden;
}

#cancelPwdUpdate {
    font-size: 0.8em;
    background-color: #FF0000;
}

/* User Drop Menu */
#userMenuToggleContainer {
    font-family: Arial, Helvetica, sans-serif;
    font-size: min(2vw, 20px);
    color: #EEEEEE;
    font-weight: bolder;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 40px;
    padding-top: 5px;
    text-align: center;
    position: relative;
    display: inline-block;
    z-index: 150;
}

#menuUsername {
    font-size: min(3vw, 30px);
}

#userMenuDisplay {
    display: none;
    background-color: #7777FF;
    padding: 5px;
    padding-top: 20px;
}

#userMenuToggleContainer:hover {
    background-color: #7777FF;
}

#userMenuToggleContainer:hover #userMenuDisplay {
    display: block;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px
}

#changePwd {
    background-color: #ffbb00;
    width: 100%;
    padding: 10px;
    border: 2px solid #49b4f1;
    border-radius: 7px;
    cursor: pointer;
}

#logoutUser {
    background-color: #2222FF;
    width: 100%;
    padding: 10px;
    border: 2px solid #49b4f1;
    border-radius: 7px;
    cursor: pointer;
}

#deleteUser {
    background-color: #FF0000;
    width: 100%;
    padding: 10px;
    border: 2px solid #49b4f1;
    border-radius: 7px;
    cursor: pointer;
}