@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

* {
    margin: 0;
    padding: 0;
    font-size: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    box-sizing: border-box;
}

/* Clases de utilidad */
.btn {
    border: 0;
    background-color: inherit;
    cursor: pointer;
}

.link {
    color: inherit;
    text-decoration: none;
}

.completed {
    text-decoration: line-through;
}

.op-6 {
    opacity: .6;
    filter: grayscale(30%);
}

.icon-checked {
    content: url('../svg/material-symbols_check-box.svg');
}

.icon-unchecked {
    content: url('../svg/material-symbols_check-box-outline-blank.svg');
}

/*  */

body {
    background-color: #eeeeee;
    display: grid;
    grid-template-rows: 140px 1fr;
    place-content: center;
    place-items: center;
}

#notes-search-box {
    margin: 0 auto;
    width: fit-content;
    max-width: 75vw;
}

#notes-search-box .bx-search-alt {
    position: absolute;
    top: 25%;
    left: 5px;
    margin-left: .25rem;

    color: #3a3838f0;
    font-size: 1.125rem;
}

#search-inp {
    min-width: 160px;
    width: 65vw;
    padding: .3125rem .625rem;
    text-indent: 1.375rem;
    border: none;
}

.container {
    position: relative;

    display: flex;
    align-items: center;
    min-width: 35vw;
    margin-top: 10px;
}

#add-btn {
    display: flex;
    align-items: center;

    height: 100%;
    max-width: 80px;

    margin-left: .625rem;
    padding: .3125rem .625rem;
    border-radius: .625rem;
    white-space: nowrap;
    background-color: #09f;
    color: #efefef;
}

#add-btn i {
    margin: auto 0;
    margin-right: 4px;
}

/* Seccion del Formulario */

#modal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    visibility: hidden; /* Oculto por defecto */
    opacity: 0;
    transition: visibility 0s, opacity 0.3s;
}

/* Mostrar el modal */
#modal-background.show {
    visibility: visible;
    opacity: 1;
}

#add-container {
    background-color: #fff;
    border-radius: .625rem;
    padding: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2; 
}


#add-form {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

#add-form h2 {
    font-size: 1.375rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.container-fields {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
}

.field-item {
    display: flex;
    flex-direction: column;
}

.field-item:nth-child(3) {
    grid-column: span 2;
}

.field-item h3 {
    font-weight: 600;
    font-size: 1rem;
}

.top-row-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.title-wrapper {
    display: flex;
    gap: .3125rem;
}

.title-wrapper span,
.container-count {
    color: #333333a5;
}

.container-count {
    justify-self: flex-end;
}

.field-item input,
.field-item select,
.field-item textarea {
    border-radius: .3125rem;
    background-color: #eeeeee;
    border: .0625rem solid rgba(0, 0, 0, 0.12);

    margin-top: 8px;
    padding: .3125rem .625rem;
}

.field-item textarea {
    width: 100%;
    align-self: center;
    resize: none;
}

.button-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 16px;
    font-size: .875rem;
}

.button-wrapper button {
    cursor: pointer;
}

.button-wrapper button:nth-child(1) {
    background-color: transparent;
    color: #333333a5;
}

.button-wrapper button:nth-child(1):hover {
    color: #333333dd;
}

.button-wrapper button:nth-child(2) {
    background-color: #09f;
    color: #efefef;
    padding: .3125rem .625rem;
    border-radius: .625rem;
}


.button-wrapper button:nth-child(2):hover,
#add-btn:hover {
    background-color: rgb(4, 143, 236);
}

.button-wrapper button:nth-child(2):focus {
    background-color: #efefef;
    color: rgb(4, 143, 236);
    transition: none;
}

/* Sección de la navbar */
#notes-container {
    width: 70vw;
}

#notes-container h1 {
    margin-bottom: 2rem;
    font-size: 20px;
}

.notes-navbar {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.notes-list {
    margin-left: .6875rem;
    display: flex;
    gap: 1.5rem;
    list-style: none;
    text-transform: uppercase;
    font-weight: 600;
    user-select: none;
}

.notes-item {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: fit-content;
    color: #212121a4;
}

.notes-item a {
    transition: color .3s cubic-bezier(.10, .7, .75, .84);
}

.notes-item a.active,
.notes-item a.active:hover {
    color: #42A5F5;
}

.notes-item a:hover {
    color: #212121d4;
}

.notes-item .line {
    width: calc(100% + 1.5rem);
    height: 1px;
    margin-top: 8px;
    background-color: #00000028;
    transition: background-color .3s cubic-bezier(.10, .7, .75, .84);
}

.notes-item a.active+.line {
    background-color: #42A5F5;
}

/* Navbar - checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-left: auto;
}

#checkbox {
    height: 20px;
    width: 20px;
    margin-right: .5rem;
    cursor: pointer;
}

.checkbox-container label {
    font-family: "Nunito", sans-serif;
    line-height: 24px;
    letter-spacing: 0.3px;
    cursor: pointer;
    user-select: none;
}

/* Seccion de Notas */
#display-notes {
    display: flex;
    /* grid-template-columns: repeat(3, 1fr); */
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    /* justify-content: center; */
}

.note {
    display: grid;
    grid-template-rows: 40px 34px auto 1.25rem;
    max-width: 21.25rem;
    width: 25rem;
    height: 250px;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    background-color: #fff;
    font-size: .875em;
    text-wrap: wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    overflow: hidden;
}

.note--top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
}

/* Categorias */
.note span {
    font-weight: 400;
    width: fit-content;
    height: min-content;
    padding: 5px 10px;
    border-radius: 28px;
    font-size: 14px;
}

.note .icon-wrapper {
    display: flex;
    align-items: center;
    gap: .9375rem;
}

.note .icon-wrapper button {
    height: 20px;
    width: 20px;
}

.note .home {
    background-color: #A5D6A7;
    color: #1B5E20;
}

.note .personal {
    background-color: #FFCC80;
    color: #E65100;
}

.note .business {
    background-color: #B39DDB;
    color: #4527A0;
}

.note .done {
    color: #21212160;
    background-color: #21212160;
    text-decoration: line-through;
}

.note h4 {
    font-weight: 600;
    font-size: 18px;
    justify-self: flex-start;
    margin-bottom: .875rem;
}

.note .description {
    justify-self: flex-start;
    color: #212121de;
    font-size: 1rem;
}

.note .date {
    color: #333333dd;
    align-self: flex-end;
    justify-self: flex-end;
    font-family: "Nunito", sans-serif;
}

/* Seccion Errores */
.error-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

.error-wrapper p {
    margin-top: 1rem;
    color: #212121;
    font-weight: 600;
}

.error-message {
    color: #EF5350;
    font-size: .875rem;
    margin-top: .3125rem;
}

/* Clases para transiciones */

.t-color-e {
    transition: color .3s ease-in;
}

.t-background-e {
    transition: background-color .2s ease-in;
}

/* Clases para animaciones */

.hidden {
    visibility: hidden;
    display: none;
}

.a-displayForm {
    animation: displayForm .3s ease-in;
}

.a-hideForm {
    animation: hideForm .3s ease-out;
    opacity: 0;
}

@keyframes displayForm {
    100% {
        opacity: 1;
    }


    80% {
        opacity: .8;
    }


    0% {
        opacity: 0;
    }
}

@keyframes hideForm {
    100% {
        opacity: 0;
    }

    80% {
        opacity: .3;
    }

    0% {
        opacity: 1;
    }
}

/* Media Queries */

/* Estilos para teléfonos pequeños (320px y menos) */
@media (max-width: 320px) {}

/* Estilos para teléfonos medianos (480px y menos) */
@media (max-width: 480px) {
    
}

/* Estilos para tablets en modo vertical (768px y menos) */
@media (max-width: 768px) {

}

/* Estilos para tablets en modo horizontal y pequeños laptops (992px y menos) */
@media (max-width: 992px) {
    #display-notes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Estilos para laptops y desktops pequeños (1200px y menos) */
@media (max-width: 1200px) {}

/* Estilos para desktops medianos a grandes (1440px y menos) */
@media (max-width: 1440px) {}