@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Basic Resets */
*, *::after, *::before{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    background-color: #0093E9;
    background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
    background-repeat: no-repeat;
}

html {
    font-family: 'Poppins', sans-serif;
}

input, input:active {
    border: 0;
    outline: 0;
    font-family: inherit;
}

button {
    font-family: inherit;
    outline: none;
    border: 0;
    cursor: pointer;
}

img {
    pointer-events: none;
}

/* scrollbar */
/* width */
::-webkit-scrollbar {
  width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* utilities */
.container{
    width: 90%;
    height: 90vh;
    margin: 0 auto;
}

/* Header */
.navbar__container{
    height: 20vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 4rem;
}

.navbar__heading{
    font-weight: 500;
    font-size: 2rem;
    color: whitesmoke;
    text-align: center;
}

/* To Do list section */

.todo__container{
    width: 80%;
    max-width: 900px;
    height: 50vh;
    margin-top: 2rem;
}

/*<--- add new task container */
.addnewtask__container{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin-bottom: 1rem;
    background-color: lightblue;
    border-radius: 4px;
}

.addnewtask__container > form{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    height: 50px;
}

.addnewtask__container > form > input {
    height: 100%;
    width: 100%;
    font-size: 1rem;
    padding: 0 1rem;
    background-color: whitesmoke;
    border-radius: 4px;
}

.addnewtask__container > form > button {
    display: grid;
    place-content: center;
    height: 100%;
    padding: .5rem .8rem;
    background-color: whitesmoke;
}

.addnewtask__container > form > button:hover > span > img {
    scale: 1.1;
}

.addnewtask__container > form > button > span > img {
    width: 25px;
}

.addnewtask__container > form > button > span {
    display: grid;
    place-content: center;
    position: relative;
}

.addnewtask__container > form > button > span::after {
    content: '';
    width: 0;
    height: 3px;
    background-color: #0093E9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-80%, -50%);
    transition: width .3s ease;
}

.addnewtask__container > form > button:hover > span::after {
    width: 100%;
}

.addedtask__container{
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    background-color: whitesmoke;
    border-radius: 4px;
}

.addnewtask__menu {
    width: 60px;
    height: 60px;
    display: grid;
    place-content: center;
    position: relative;
    cursor: pointer;
    z-index: 999;
}

/* menu */
.addnewtask__menu > span {
    display: block;
    width: 23px;
    height: 3px;
    background-color: #0093E9;
    margin: 2.5px 0;
    transform-origin: bottom left;
    transition: all .3s ease;
}

.addnewtask__menu.opened > span:first-child {
    width: 40%;
}

.addnewtask__menu.opened > span:nth-child(2) {
    width: 60%;
}

/* .addnewtask__menu.opened > span:nth-child(3) {
} */

.menu__dropdown {
    width: 120px;
    font-size: 1rem;
    position: absolute;
    top: 50px;
    left: -50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 1;
    border-radius: 4px;
    overflow: hidden;
    transition: all .3s ease;
}

.menu__dropdown.opened{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.menu__dropdown > ul {
    width: 100%;
    list-style-type: none;
    background-color: whitesmoke;
}

.menu__dropdown > ul > li {
    text-align: center;
    padding: .6rem 0;
    color: #0093E9;
    font-weight: 500;
}

.menu__dropdown > ul >li.warning-text {
    color: lightcoral;
}

.menu__dropdown > ul > li.active {
    color: whitesmoke;
    background-color: #438eb9;
}


.menu__dropdown > ul > li:hover:not(:last-child) {
    cursor: pointer;
    color: whitesmoke;
    background-color: #0093E9;
}

.menu__dropdown > ul > li:hover:last-child {
    cursor: pointer;
    color: whitesmoke;
    background-color: lightcoral;
}

.overlay {
    width: 100%;
    height: 100vh;
    background-color: black;
    opacity: 0.4;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 998;
    transition: all .3s ease;
}

.overlay--first{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    font-size: 2rem;
    width: 100%;
    height: 100vh;
    background-color: black;
    opacity: 1;
    visibility: visible;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all .3s ease;
    cursor: default;
}

.overlay--first.opened{
    opacity: 0;
    visibility: hidden;
}

.overlay.opened {
    opacity: 0;
    pointer-events: none;
}

/* added task */
.task{
    width: 100%;
    display: grid;
    grid-template-columns: 80% 20%;
    padding: .5rem 1rem;
    /* background-color: #d2e7f3; */
    background-color: transparent;
    margin-right: 0;
    position: relative;
    transform: none;
    transition: all .8s ease;
}

.task:not(:last-child):after{
    content: '';
    width: 95%;
    height: 1.5px;
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    background-color: #0093E9;
}

.task:last-child:after{
    content: '';
    width: 95%;
    height: 1.5px;
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    background-color: lightcoral;
}

.task:last-child::before{
    content: 'END';
    color: lightcoral;
    font-weight: 500;
    position: absolute;
    left: 50%;
    bottom: 0;
    background-color: whitesmoke;
    z-index: 997;
    transform: translate(-50%, 70%);

}

.task.mark-as-done {
    opacity: .25;
    text-decoration: line-through;
}

.task.mark-as-done-light {
    opacity: .6;
    text-decoration: line-through;
}

.task.task.mark-as-deleted{
    transform: translateX(-100%);
    opacity: 0;
}

.task-info {
    color: #0093E9;
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 1rem;
    word-wrap: break-word;
}

.task-info > span {
    font-size: 1.1rem;
    max-width: 100%;
}

/* bullets */
.task-info:before{
    content: '';
    width: 5px;
    height: 5px;
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translate(0, -50%);
    background-color: #0093E9;
}

.task-operations {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    height: 100%;
    width: 100%;
}


.task-operations > button {
    height: 50px;
    padding: .5rem .5rem;
    transition: all .3s ease;
}

.task-operations > button:hover {
    scale: 1.2;
}


.task-operations > button > img {
    width: 25px;
}

.task-operations > button:first-child {
    color: whitesmoke;
    background-color: transparent;
}

.task-operations > button:last-child {
    color: whitesmoke;
    background-color: transparent;
}

/* starting screen */

.overlay--first__container {

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}

.overlay--first__container > h1 {

    color: whitesmoke;
    margin-bottom: 2.5rem;
    font-weight: 400;

}

.overlay--first {
    padding: 2rem;
}

.overlay--first__container > form {
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay--first__container > h1 {
    font-size: 2rem;
}

.overlay--first__container > form >button{
    background-color: whitesmoke;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}


.overlay--first__container > form > input {
    height: 100%;
    width: 80%;
    padding: .4rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: #f5f5f5;
    border-bottom-left-radius: 4px;
    border-top-left-radius: 4px;
}
