:root {
    font-size: 16px;
    --radius: .6rem;
    --transition: .3s
}

.dark {
    --border-color: #ffffff33;
    --bg-color: #1e1e1e;
    --pg-color: #303030;
    --text-color: #ffffff;
    --shadow-color:#ffffff26;
}

.light {
    --border-color: #00000033;
    --bg-color: #ffffff;
    --pg-color: #ebebeb;
    --text-color: #000000;
    --shadow-color:#00000026;
}

.red {
    --primary-color: #ff0000;
    --primary-color-50: #fff0f0;
    --primary-color-200: #ffc0c0;
    --primary-color-400: #ff5757;
    --primary-color-500: #ff2323;
    --primary-color-700: #d70000;
    --primary-color-950: #500000;
}

.blue {
    --primary-color: #3584e4;
    --primary-color-50: #f0f8fe;
    --primary-color-200: #c2e3fb;
    --primary-color-400: #66baf4;
    --primary-color-500: #439cee;
    --primary-color-700: #256ad0;
    --primary-color-950: #192e52;
}

.purple {
    --primary-color: #8756ec;
    --primary-color-50: #f5f4fe;
    --primary-color-200: #dfd8fc;
    --primary-color-400: #ac91f4;
    --primary-color-500: #8756ec;
    --primary-color-700: #7232cf;
    --primary-color-950: #311560;
}

.green {
    --primary-color: #04875b;
    --primary-color-50: #ecfdf4;
    --primary-color-200: #a7f3cc;
    --primary-color-400: #a7f3cc;
    --primary-color-500: #0fba78;
    --primary-color-700: #04875b;
    --primary-color-950: #022c20;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    color: var(--text-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    transition: var(--transition);
}

/* GLOBAL STYLES */

body {
    background-color: var(--bg-color);
}

.btn {
    cursor: pointer;
    border-radius: var(--radius);
    background-color: var(--primary-color-700);
}

.btn:hover {
    background-color: var(--primary-color-500);
}

.btn:active {
    background-color: var(--primary-color-950);
}

/* ALERT */

.alert {
    display: none;
    align-items: center;
    position: relative;
    background-color: rgba(245, 176, 48, 0.15);
    width: 20rem;
    padding: .5rem 1.5rem;
    margin: auto;
    margin-top: 1rem;
    border-radius: var(--radius);
}

.alert img {
    width: 2rem;
    margin-right: 1.5rem;
}

.alert .alert-title {
    font-weight: bold;
    font-size: 1.2rem;
}

.alert .alert-close-btn {
    position: absolute;
    right: 1.5rem;
    cursor: pointer;
    padding: .2rem;
    font-size: 1.5rem;
    font-weight: bold;
}

/* CONFIRM */

.confirm {
    display: none;
    flex-direction: column;
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    background-color: var(--pg-color);
    border-radius: var(--radius);
    max-width: 30rem;
}

.confirm-btns-container {
    display: flex;
}

.confirm-msg {
    padding: 2rem;
    font-weight: bolder;
    font-size: 1.2rem;
    text-align: center;
}

.confirm-btns {
    width: 50%;
    background-color: var(--pg-color);
    cursor: pointer;
    padding: .8rem;
    font-size: 1.1rem;
    border: .1rem solid var(--border-color);
    font-weight: bolder;
}

.cancel-confirmation-btn {
    border-radius: 0 0 0 var(--radius);
}

.confirm-confirmation-btn {
    border-radius: 0 0 var(--radius) 0;
    color: #ff5757;
}

/* THERE ARE NO SAVED NOTES MSG */

.there-are-no-saved-notes-msg {
    position: absolute;
    font-size: 2rem;
    transform: translateX(-50%);
    transform: translateY(-50);
    top: 50%;
    left: 50%;
}

/* HEADER */

.header {
    position: relative;
    height: 3.2rem;
    display: flex;
}

.header .brand-header {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header .brand-header:hover {
    text-decoration: underline;
}

.header .qnote-img {
    margin: 0 .4rem;
    height: 2rem;
    width: 2rem;
}

.header .header-title {
    transform: translateY(-10%);
}

.header .search-bar {
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    font-size: 1rem;
    padding: .5rem;
    border-radius: var(--radius);
    color: black;
    width: 50%;
    max-width: 40rem;
    border: .1rem solid var(--border-color);
}

/* HOME */

.home {
    display: block;
}

.home .note-create-btn {
    position: absolute;
    top: .4rem;
    right: .4rem;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 2rem;
    color: #fff;
}

.home .settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: .4rem;
    right: 3.2rem;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 2rem;
}

.home .settings-icon {
    height: 1.5rem;
}

.home .notes-container {
    display: flex;
    flex-direction: column;
    width: 50%;
    max-width: 40rem;
    margin: auto;
    margin-top: 1rem;
}

.home .notes-container .note {
    border: .1rem solid var(--border-color);
    border-radius: 8px;
    margin-bottom: .5rem;
    padding: .6rem;
    cursor: pointer;
    word-break: break-all;
}

.home .notes-container .note:hover {
    background-color: var(--shadow-color);
}

.home .note .note-title {
    font-size: 1.2rem;
}

.home .note .last-note {
    font-size: .9rem;
}

/* NOTE CREATION MENU */

.notes-creation-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: auto;
    transform: translateY(-50%);
    margin-top: 50vh;
}

.notes-creation-menu .notes-creation-menu-title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.notes-creation-menu .note-title-input {
    background-color: transparent;
    border-bottom: .1rem solid var(--border-color);
    font-size: 1rem;
    color: var(--text-color);
    padding: .8rem;
    margin-bottom: 2rem;
}

.notes-creation-menu .btn {
    padding: 1rem;
    font-size: 1.2rem;
    margin: 0 .4rem 0 .4rem;
    color: white;
}

/* NOTE DISPLAY */

.note-display {
    display: none;
    width: 100%;
    height: 100%;
    height: 100vh;
    flex-direction: column;
    justify-content: space-between;
}

.note-display .chat-header {
    position: fixed;
    top: 0rem;
    display: flex;
    align-items: center;
    height: 3.6rem;
    background-color: var(--bg-color);
    width: 100%;
    padding: .5rem;
    border-bottom: .1rem solid var(--border-color);
}

.note-display .back-home-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 4.2rem;
    width: 1.8rem;
    cursor: pointer;
    background-color: transparent;
}

.note-display .back-home-btn img {
    height: 2.5rem;
    padding: .6rem;
    border-radius: var(--radius);
}

.note-display .back-home-btn img:hover {
    background-color: var(--shadow-color);
}

.note-display .title-chat-header {
    font-size: 1.4rem;
    position: absolute;
    top: 50%;
    left: 3rem;
    transform: translateY(-60%);
}

.note-display .chat-msg {
    flex-grow: 1;
    padding: 5rem 1rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.note-display .chat-form {
    position: fixed;
    bottom: 0rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 3.6rem;
    padding: .5rem 0;
    background-color: var(--bg-color);
    border-top: .1rem solid var(--border-color);
}

.note-display .chat-input {
    display: flex;
    width: 80%;
    max-width: 60rem;
    height: 2.6rem;
    padding: 1rem;
    font-size: 1.1em;
    color: black;
    border-radius: var(--radius);
    border: .1rem solid var(--border-color);
}

.note-display .chat-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    margin-left: .5rem;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 2rem;
    color: #fff;
}

.note-display .msg {
    background-color: var(--primary-color-950);
    max-width: 50%;
    border-radius: var(--radius);
    align-self: flex-end;
    padding: .5rem;
    font-size: 1.1rem;
    margin: .2rem 0;
    color: #fff;
}

/* SETTINGS */

.settings-screen {
    display: none;
}

.settings-screen .settings-options {
    display: flex;
    position: relative;
    transform: translateY(-50%);
    top: 50%;
    flex-direction: column;
    align-items: center;
    width: 3rem;
    position: fixed;
    height: 98%;
    overflow: auto;
    border: .1rem solid var(--border-color);
    margin-left: .5rem;
    border-radius: var(--radius);
}

.settings-screen .options {
    text-align: center;
    cursor: pointer;
    padding: .5rem 0;
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: .2rem;
}

.settings-screen .options:hover {
    background-color: var(--shadow-color);
}

.settings-screen .option-active {
    background-color: var(--shadow-color);
}

.settings-screen .display-settings {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 3.5rem;
}

.settings-screen .context {
    font-size: 1.2rem;
    margin-bottom: .5rem;
    margin-top: 1.5rem;
}

.settings-screen .style-menu {
    font-size: 1rem;
    border-radius: var(--radius);
    padding: .5rem;
    background-color: transparent;
    width: 15rem;
    cursor: pointer;
    border: .1rem solid var(--border-color);
}

.settings-screen .exit-settings-screen {
    position: fixed;
    transform: translateY(-100%);
    top: 100%;
}

.colors {
    padding: .4rem 1rem;
    border-radius: 100px;
    cursor: pointer;
    margin-right: .5rem;
}

.active-color {
    border: .2rem solid var(--border-color);
}

.settings-screen .color-red {
    background-color: #ff0000;
}

.settings-screen .color-purple {
    background-color: #8756ec;
}

.settings-screen .color-blue {
    background-color: #3584e4;
}

.settings-screen .color-green {
    background-color: #04875b;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
  
.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.inp-url-background {
    font-size: 1rem;
    border-radius: var(--radius);
    padding: .5rem;
    background-color: transparent;
    width: 15rem;
    cursor: pointer;
    border: .1rem solid var(--border-color);
}

.img-custom-container {
    display: none;
}

.display-data {
    display: none;
    height: 100vh;
}

.data-btn {
    text-align: center;
    position: absolute;
    cursor: pointer;
    font-size: 1.2rem;
    cursor: pointer;
    padding: .5rem 0rem .5rem .5rem;
    border-radius: var(--radius);
    transform: translateX(-50%);
    border: .1rem solid var(--border-color);
    width: 15rem;
}

.data-btn:hover {
    background-color: var(--shadow-color);
}

.data-export {
    top: 1rem;
}

.data-inp {
    display: none;
}

.data-import {
    top: 4.5rem;
}

.clear-all-settings {
    top: 8rem;
}

.delete-all-notes {
    top: 11.5rem;
    color: #ff5757;
}

.delete-all-notes:hover {
    background-color: #ffc0c0;
    color: #500000;
}

.display-about {
    display: none;
    position: relative;
}

.app-img {
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 25%;
}

.app-name {
    margin-top: 20rem;
    text-align: center;
    padding: .5 10rem;
    font-size: 2rem;
    font-weight: bolder;
}

.legal-text {
    max-width: 14rem;
    text-align: justify;
    font-size: .8rem;
}

.settings-screen .exit-settings-icon {
    margin-right: .5rem;
    transform: translateY(10%);
}

/* RMENU */

.rmenu{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    background-color: var(--pg-color);
    border-radius: var(--radius);
    width: 10rem;
    border: .1rem solid var(--border-color);
}

.rmenu-btn {
    padding: .4rem 1rem .4rem 2rem;
    width: 10rem;
    border-radius: var(--radius);
    cursor: pointer; 
}

.rmenu-btn:hover {
    background-color: var(--primary-color-500);
}

/* RENAME */

.rename-menu {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    position: absolute;
    background-color: var(--pg-color);
    padding: 1rem;
    border-radius: var(--radius);
    width: 50%;
    height: 50%;
}

.rename-btn-confirm {
    padding: .4rem .8rem;
    font-size: 1rem;
}

.rename-btn-cancel {
    padding: .4rem .8rem;
    font-size: 1rem;
}

.rename-textarea {
    border-radius: var(--radius);
    resize: none;
    width: 90%;
    height: 90%;
    margin-bottom: .5rem;
    color: #000000;
    padding: .8rem;
    border: .1rem solid var(--border-color);
}

::-webkit-scrollbar {
    width: .4rem;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #555555cc;
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media screen and (max-width: 550px) {
    .header .brand-header {
        display: none;
    }

    .header .search-bar {
        width: 90%;
    }

    .home .note-create-btn {
        position: fixed;
        transform: translateY(-115%);
        top: 100%;
        width: 3rem;
        height: 3rem;
    }

    .home .settings-btn {
        position: fixed;
        transform: translateY(-115%);
        top: 100%;
        right: 3.8rem;
        width: 3rem;
        height: 3rem;
    }
    
    .home .notes-container {
        width: 90%;
    }

    .note-display .msg {
        max-width: 80%;
    }

    .settings-screen .app-img {
        width: 200px;
    }
}
