html {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    font-size: 10px;
    font-family: "Rubik";
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    color: rgba(17, 23, 94, 1);
    font-size: 4rem;
    margin: 0 0 1.6rem;
}

main {
    width: 100%;
    max-width: 60rem;
    background: #fff;
    border-radius: .8rem;
    padding: 3.2rem 2.4rem;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

#create-task-form {
    display: flex;
    flex-direction: row; 
    align-items: center;
    width: 100%;
}

.input-form {
    height: 4.5rem;
    width: 100%;
    font-size: 1.6rem;
    border-radius: .5rem;
    outline: 0;
    margin-right: 1rem;
    padding-left: 3rem;
    border: 1px solid rgba(238, 238, 238, 1);

    &:focus {
        border: 1px solid #302e2e
    }
}

.add-task-button {
    font-size: 2rem;
    height: 4.5rem;
    width: 10rem;
    box-sizing: border-box;
    color: #fff;
    background: rgba(45, 112, 253, 1);
    border: 0;
    border-radius: .4rem;
    cursor: pointer;

    &:hover {
        opacity: .8;
    }
}

.task-list {
    margin: 0.8rem 0 1.6rem;
    min-height: 5rem;

    & > ul {
        padding-inline-start: 0rem;
        min-height: 6rem;
    }

    & > ul > li {
        list-style: none;
        padding: .8rem 1.6rem;
        font-size: 1.6rem;
    }
}

.task-div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(238, 238, 238, 1);
    border-radius: 1.6rem;
    height: 10rem;
}

.task-info-div {
    padding: 2.4rem 3.6rem;
}

.task-name {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    color: rgba(0, 23, 71, 1);
}

.task-label-date-div {
    color: rgba(177, 186, 203, 1);
    font-size: 1.4rem;
}

.task-label {
    font-size: 1.2rem;
    margin-right: .8rem;
    border: 1px solid rgba(177, 186, 203, 1);
    border-radius: 1.6rem;
    padding: .4rem .8rem;
}

.complete-button {
    font-size: 1.5rem;
    font-weight: 500;
    margin-right: 3.2rem;
    height: 4rem;
    width: 11rem;
    color: #fff;
    background: rgba(45, 112, 253, 1);
    border: 1px solid rgba(45, 112, 253, 1);
    border-radius: .5rem;
    cursor: pointer;

    &:hover {
        opacity: .8;
    }
}

.task-name-div {
    margin-bottom: 1.6rem;
}

.task-completed .task-name {
    color: rgba(150, 150, 150, 1);
}

.task-completed .complete-button{
    background: rgba(0, 216, 167, 1);
    height: 3.2rem;
    width: 3.2rem;
    border: none;
    border-radius: 50%;
    cursor: default;
}

#footer-section {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;   
}

.remove-completed-button {
    background: rgba(45, 112, 253, 1);
    color: #fff;
    border: none;
    border-radius: .5rem;
    height: 3rem;
    width: 15rem;
    margin-left: 2rem;
    cursor: pointer;

    &:hover {
        opacity:.8;
    }
}

#completed-count {
    font-size: 1.5rem;
    color: rgba(177, 186, 203, 1);
    margin-right: 2rem;
}

@media (max-width: 768px) {
    main {
        flex-direction: column; 
        padding: 2rem; 
    }

    #create-task-form {
        flex-direction: column; 
        gap: 1rem; 
    }

    .add-task-button {
        width: 100%; 
    }

    .task-div {
        flex-direction: column; 
        height: auto; 
        padding: 1.6rem; 
    }

    .task-info-div {
        padding: 1rem 0; 
    }

    .task-label-date {
        gap: 1rem; 
    }

    .complete-button {
        margin: 1rem 0 0; 
    }

    #footer-section {
        flex-direction: column; 
        gap: 1rem; 
        margin-top: 1rem; 
    }

    .remove-completed-button {
        width: 100%;
    }
}