@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300&family=Space+Grotesk:wght@300;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    position: relative;
}

#tasks {
    display: flex;
    flex-direction: column;
}

#tasks p {
    margin-bottom: 0px;
}

.task-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;
    border-radius: 8px;
}

.task-editing {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    flex-direction: column !important;
    justify-content: center !important;
    background: hsl(0 0% 100% / 0.1);
    backdrop-filter: blur(1em);
    border-radius: 3px;
    box-shadow: none;
    transform: translate(-50%, -50%);
}

.task-editing #task-input {
    width: clamp(50vw, 55vw, 60vw) !important;
    padding: 1em;
    line-height: 2em;
    display: block !important;
    box-shadow: none !important;
    margin-bottom: 2em;
    text-align: center;
}

.task-editing #task__name {
    color: #fff;
}

.task-editing :is(.is__completed, .delete) {
    display: none !important;
}

.task-editing .edit {
    position: relative;
    font-size: 1.4em;
    padding: .3em .5em;
    border-radius: .5em;
}

.task-editing .edit::after {
    content: 'Edit Task';
    position: absolute;
    top: 4em;
    left: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
    transform: translate(-50%, -50%);
}

.save-edited-todo {
    position: absolute;
    left: -100%;
    width: 0 !important;
    height: 0 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.listed {
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
        rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

.error {
    margin-top: 10px;
    animation: error .5s linear forwards;
}

#refresh {
    cursor: pointer;
    transform: scale(.9);
    transition: .3s ease-in-out;
}

#refresh:hover {
    transform: scale(1);
    transform: rotate(90deg);
}

.clear__all {
    width: 30%;
    display: block;
    margin: 0 auto;
}

@keyframes error {
    0% {
        opacity: 0
    }

    80% {
        transform: scale(1.08);
        opacity: 1
    }

    90% {
        transform: scale(.8);
    }

    100% {
        transform: scale(1);
    }
}

@media screen and (max-width: 765px) {
    form {
        width: 100% !important;
    }

    form>* {
        display: block !important;
    }
}

@media screen and (max-width: 450px) {
    form {
        flex-direction: column;
    }

    form div {
        justify-content: space-evenly;
    }

    #create-task,
    #search-task {
        width: 40%;
        display: inline !important;
        margin: .5em 0 .2em !important;
    }
}

@media screen and (max-width: 375px) {
    body {
        min-width: 375px;
    }
}