@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
    --gray-clr: 245, 245, 245;
}

.inter {
    font-style: normal;
    font-weight: 400;
    font-family: "Inter";
    font-optical-sizing: auto;
}

body {
    max-width: 600px;
    margin-inline: auto;
    padding: 2rem;
    background-color: hsl(0, 0%, 95%);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
        "Open Sans", "Helvetica Neue", sans-serif;
}

main {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    border-radius: 1rem;
    background-color: white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

form {
    display: flex;
    gap: 10px;
}

.todo-input {
    flex: 1;
    padding: 1rem;
    border-radius: 6px;
    background-color: rgb(236, 236, 236);
    font-size: 1rem;
    font-family: inherit;
}

button {
    padding: 8px 12px;
}

ul {
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;

    border-radius: 6px;
    background-color: rgb(var(--gray-clr));
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.5s ease;

    &:hover {
        background-color: rgb(210, 210, 210);
    }

    & span {
        overflow-wrap: anywhere;
    }
}

span.done {
    color: rgb(49, 49, 49);
    text-decoration: line-through;
}

button[type="submit"] {
    padding: 0.5rem 1.5rem;
    background-color: darkorange;
    font-size: 1rem;

    &:hover {
        background-color: rgb(212, 106, 0);
    }
}

input,
button,
li {
    border: none;
    border-radius: 4px;
    font-family: inherit;
}

button {
    padding: 12px 16px;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.5s ease;

    &.delete-button {
        background-color: red;

        &:hover {
            background-color: rgb(163, 0, 0);
        }
    }

    &.edit-button {
        background-color: blue;

        &:hover {
            background-color: rgb(1, 1, 126);
        }
    }
}

.save-button {
    background-color: rgb(0, 194, 0);

    &:hover {
        background-color: rgb(0, 163, 0);
    }
}

.buttons {
    display: flex;
    gap: 10px;
}

.edit-input {
    flex: 1;
    margin-right: 10px;
    padding: 6px;
}
