@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans', sans-serif;
}

:root{
    --item-height: 2.5rem;
    --box-padding: 2rem;
}

body{
    width: 100svw;
    min-height: 100svh;
    overflow-x: hidden;
    display: grid;
    place-items: center;
}

#todo-list{
    max-width: 90svw;
    box-shadow: black 0rem 0rem 2rem;
    background-color: hsl(0, 0%, 30%);
}

#todo-list>footer, #todo-list>.top-bar{
    background-color: hsl(0, 0%, 10%);
    height: var(--box-padding);
    width: calc(100% - 1rem);
    padding: 0.5rem;
}

#todo-list>header{
    display: grid;
    padding: 1rem 0rem;
    width: 100%;
}

#todo-list>header h2{
    color: white;
    font-size: 2rem;
    height: 3rem;
    width: 100%;
    text-align: center;
    line-height: 3rem;
}

#todo-list>header>*{
    margin: 0.2rem 0rem;
}

.todo-form{
    display: grid;
    place-items: center;
    grid-template-columns: 4fr 1fr;
    width: calc(100% - 2rem);
    padding: 0.3rem 1rem;
}

#todo-list .todo-form>input[type="text"]{
    width: calc(100% - 0.4rem);
    height: 2rem;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0rem 0.2rem;
}

#todo-list>header .addBtn{
    background-color: red;
    width: 100%;
    height: 2rem;
    text-align: center;
    line-height: 2rem;
    color: white;
    cursor: pointer;
}


#list-items{
    min-height: calc(var(--item-height) * 3.35);
    background-color: white;
}

#list-items>li{
    cursor: pointer;
}

#list-items>li:hover{
    background-color: hsl(0, 0%, 90%);
}

#todo-list>footer{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

#todo-list>footer>button{
    height: 100%;
    cursor: pointer;
    aspect-ratio: 5/2;
    background-color: red;
    text-decoration: none;
    color: white;
    text-align: center;
    line-height: var(--box-padding);
    border: none;
}



#todo-list>main ul{
    display: flex;
    flex-direction: column;
    list-style: none;
}


#todo-list>main ul li::before{
    content: '';
    color: white;
    font-size: 1.5rem;
    height: var(--item-height);
    aspect-ratio: 1/1;
    text-align: center;
    line-height: var(--item-height);
}

#todo-list>main ul li.completed::before{
    content: '✓';
}

#todo-list>main ul li p{
    flex-grow: 1;
    line-height: var(--item-height);
    padding-left: 0.5rem;
}

#todo-list>main ul li{
    min-height: var(--item-height);
    display: flex;
}

#todo-list>main ul li.completed{
    background-color: hsl(0, 0%, 50%);
    color: white;
}

.remove{
    font-size: 1.5rem;
    height: 100%;
    aspect-ratio: 1/1;
    text-align: center;
    line-height: var(--item-height);
    cursor: pointer;
    z-index: 2;
}

#todo-list>main ul li.completed p{
    text-decoration: line-through;
}


@media screen and (min-width: 600px){
    #todo-list{
        width: 50svw;
    }
}


