@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@100;300;400;500;700&family=Syncopate&display=swap');

:root{
    --blue-65: #0038a1;
    --blue-35: #4184f8;
    --blue-65-opcty-28: #0038a128;
    --white: #fff;
    --grey-100: #737373;
    --grey-70: #a1a1a1;
    --grey-40: #dadada;
    --grey-40-opcty-50: #dadada50;
    --body-bg-gradient: linear-gradient(135deg, var(--blue-35),var(--blue-65));
    --note-bg: #e4f3f4;
    --hover-color: #cecece32;
    --border-rounded: 100vmax;
    --border-circle: 50%;
    --border-5: 5px;
}

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'poppins', sans-serif;
}

body{
    background: var(--body-bg-gradient);
    background-repeat: no-repeat;
    min-height: 100vh;
}

.note-app__container{
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 2rem;
}  

.note-app__new-note,
.note-app__note-item{
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 240px;
    width: 100%;
    max-width: 330px;
    height: 300px;
    border-radius: var(--border-5);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.note-app__new-note{
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: var(--grey-40-opcty-50);
    transition: transform 0.1s;
}

.note-app__new-note:active{
    transform: scale(0.98);
}

.note-app__new-note__icon{
    font-size: 5rem;
    color: var(--blue-65);
}

.note-app__note-item{
    display: grid;
    grid-template-rows: 50px 1fr 40px;
    padding: 10px;
    background-color: var(--note-bg);
}

.note-app__note-item__title{
    border-bottom: 1px solid var(--grey-100);
    overflow: hidden;
}

.note-app__note-item__title h1{
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.note-app__note-item__description{
    overflow: auto;
    padding: 5px 0;
    color: var(--grey-100);
}

.note-app__note-item__description::-webkit-scrollbar{
    width: 5px;
}

.note-app__note-item__description::-webkit-scrollbar-thumb{
    background-color: var(--grey-100);
    border-radius: var(--border-rounded);
}

.note-app__note-item__edit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-top: 1px solid var(--grey-100);
    color: var(--blue-65);
}

.note-app__note-item__edit__icon button{
    border: none;
    outline: none;
    background-color: transparent;
    border-radius: var(--border-circle);
    width: 30px;
    height: 30px;
    font: 1rem;
    color: var(--blue-65);
    cursor: pointer;
}

.note-app__note-item__edit__icon button:hover{
    background-color: var(--hover-color);
}

.note-app__note-item__edit__popup{
    position: absolute;
    background-color: var(--note-bg);
    top: -80px;
    right: 20px;
    border-radius: var(--border-5);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.2s ease;
}

.note-app__note-item__edit__icon.show-popup .note-app__note-item__edit__popup{
    transform: scale(1);
}

.note-app__note-item__edit__popup__list-item{
    list-style: none;
    display: flex;
    align-items: center;
    column-gap: 5px;
    padding: 10px 15px;
    cursor: pointer;
}

.note-app__note-item__edit__popup__list-item:hover{
    background-color: var(--hover-color);
}

.form-bg{
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(75, 75, 75, 0.35);
}

.form__container{
    position: relative;
    background-color: var(--note-bg);
    padding: 1rem 0.7rem;
    border-radius: var(--border-5);
    min-width: 260px;
    width: 100%;
    max-width: 380px;
    margin: 10px;
}

.form__header{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.form__header h2{
    font-weight: 600;
    text-transform: capitalize;
}

.form__close{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--border-circle);
    font-size: 1.2rem;
    color: var(--blue-65);
    cursor: pointer;
}

.form__close:hover{
    background-color: var(--hover-color);
}

.form__header::after{
    content: "";
    position: absolute;
    left: -0.7rem;
    bottom: -5px;
    width: calc(100% + 1.4rem);
    height: 1px;
    background-color: var(--grey-100);
}

.form__group{
    display: flex;
    flex-direction: column;
    row-gap: 5px;
    margin: 1.4rem 0;
    width: 100%;
}

.form__label{
    font-size: 1.1rem;
    text-transform: capitalize;
}

.form__field{
    border: 1px solid var(--grey-100);
    outline: none;
    border-radius: var(--border-5);
    height: 44px;
    width: 100%;
    padding: 5px;
    font-size: 1rem;
    transition: all 0.1s;
}

.form__field:focus{
    border: var(--blue-65);
    background-color: var(--blue-65-opcty-28);
}

textarea.form__field{
    resize: vertical;
    height: auto;
}

.form__submit{
    width: 100%;
    border: none;
    outline: none;
    text-transform: capitalize;
    background-color: var(--blue-65);
    border-radius: var(--border-5);
    padding: 10px 0;
    font-size: 1rem;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.1s ease;
}

.form__submit:active{
    transform: scale(0.98);
}

@keyframes popup {
	from{
		opacity: 0;
		transform: scale(1.5);
	}
	to{
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes popdown {
	from{
		opacity: 1;
		transform: scale(1);
	}
	to{
		opacity: 0;
		transform: scale(1.5);
	}
}








@media screen and (max-width:725px){
    .note-app__container{
        justify-content: center;
    }
}