/* we kept a list of colors at one place and we can access them using var */
:root{
    --primary:#EA40A4;
    --business:#3A82EE;
    --personal:var(--primary);
    --light:#EEE;
    --grey:#888;
    --dark:#313154;
    --danger:#ff5b57;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

    --business-glow:0px 0px 4px rgba(58, 130, 238, 0.75);
    --personal-glow:0px 0px 4px rgba(234, 64, 164, 0.75);

}


/* we used "montserrat-style" from fonts.google.com */
*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'montserrat', sans-serif;
}

input:not([type="radio"]):not([type="checkbox"]), button{
    appearance: none;
    border: none;
    outline: none;
    background: none;
    cursor: initial;
}

body{
    background:var(--light);
    color:var(--dark);
}

section{
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

h3{
    color: var(--dark);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;

}

h4{
    color: var(--grey);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.greeting .title{
    display: flex;

}

.greeting .title input{
    margin-left: 0.5rem;
    flex:1 1 0%;
    min-width: 0;
}

.greeting .tilte, 
.greeting .title input{
 color: var(--dark);
 font-size: 1.5rem;
 font-weight: 700;

 
}

.create-todo input[type="text"]{
    display: block;
    width: 100%;
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
    color: var(--dark);
    background-color: #fff;
   border-radius: 0.5rem;
   box-shadow: var(--shadow);
   margin-bottom: 1.5rem;

}

.create-todo .options{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap:1rem;
    margin-bottom: 1.5rem;
}


/* we arranged them in  center column  wise and given some shadow color  */
.create-todo .options label{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
}

/* now we remove the radio tick options */
input[type="radio"],
input[type="checkbox"]{
    display: none;
}

.bubble{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--business);
    box-shadow: var(--business-glow);
}

/* now we change the color for Business-blue, for personal-pink */
.bubble.personal{
    border-color: var(--personal);
    box-shadow: var(--personal-glow);
}

/* we use a transition of 2 sec to make it look fesible  */
.bubble::after{
    content: "";
    display: block;
    opacity: 0;
    width: 0px;
    height: 0px;
    background-color: var(--business);
    box-shadow: var(--business-glow);
    border-radius: 50%;
    transition: 0.2s ease-in-out;
}

.bubble.personal::after{
    background-color: var(--personal);
    box-shadow: var(--personal-glow);
}

input:checked ~ .bubble::after{
    width: 10px;
    height: 10px;
    opacity: 1;
}


/* we give some space between the icon and "Business"  */

.create-todo .options label div{
    color: var(--dark);
    font-size: 1.125rem;
    margin-top: 1rem;
}


/* now we give the submit button "Add Todo" some color,margin and shadow */

.create-todo input[type="submit"]{
    display: block;
    width: 100%;
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
    color: #fff;
    background-color: var(--primary);
    border-radius: 0.5rem;
    box-shadow: var(--personal-glow);
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

/* to make it some what faded when hovered */
.create-todo input[type="submit"]:hover{
    opacity: 0.75;
}

/* now we do make the todo list items in a center */

.todo-list .list{
    margin: 1rem 0;
}

.todo-list .todo-item{
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;

}

/* now we push the lables to 1 rem towards right */

.todo-item label{
    display: block;
    margin-right: 1rem;
    cursor: pointer;
}

/* now we alin the content in the right manner like edit & delete buttons towards rightside */
.todo-item .todo-content{
    flex:1 1 0%;

}

.todo-item .todo-content input{
    color: var(--dark);
    font-size: 1.125rem;

}

.todo-item .actions{
    display: flex;
    align-items: center;
}

/* now we give some color and shadow to Edit & Delete buttons */
.todo-item .actions button{
    display: block;
    padding: 0.5rem;
    border-radius: 0.2rem;
    color: #fff;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.todo-item .actions button:hover{
    opacity: 0.75;
}
.todo-item .actions .edit{
    margin-right: 0.5rem;
    background-color: var(--primary);
}
.todo-item .actions .delete{
    margin-right: 0.5rem;
    background-color: var(--danger);
}


/* after completing the task we can strike it off */
.todo-item.done .todo-content input{
    text-decoration: line-through;
    color: var(--grey);
}