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

:root {
    --bg-universal: #FFFAE6;
    --bg-header: #DDEBFF;
    --bg-form: #FFF9D9;
    --bg-input: #FFFEF0;

    --border: #A1B1C9;
    --border-focus: #77859d;

    --color-task: #E3F2FF;
    --color-done: #CBE8D6;
    --color-overdue: #FFB5B5;

    --color-task-act: #A8D2FF;
    --color-done-act: #9FD8AF;
    --color-overdue-act: #FF8C8C;

    --label-low: #CCE4FF;
    --label-med: #fff3AC;
    --label-high: #FFA3A3;

    --btn-add: #B4E4FF;
    --btn-add-hover: #A3DAFF;
    --btn-delete: #FF8A8A;
    --btn-delete-hover: #FF6B6B;
    --btn-delete-disabled: #F0E9E9;

    --text-1: #1E293B;
    --text-2: #475569;
    --text-3: #64748B;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
    transition: all .3s ease-in-out;
}

body {
    background-color: var(--bg-universal);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.text-base {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
}

.text-medium {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-3);
}

.text-task, input::placeholder {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-1);
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

button, li {
    cursor: pointer;
}

header {
    position: fixed;
    top: 20px;
    background-color: var(--bg-header);
    width: 96vw;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 20px;
}

.header-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
}

header img {
    width: 84px;
    border: 1px solid var(--border);
    border-radius: 50%;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 140px;
    padding: 20px 24px;
    gap: 12px;
    width: 100vw;
}

.add-task {
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    gap: 20px;
    background-color: var(--bg-form);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.add-task-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.add-task-header h1 {
    font-family: "Nunito", sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-1);
}

.add-task-header button, .btn-task-form-action {
    padding: 8px 20px;
    background-color: var(--btn-add);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
    border: none;
    border-radius: 8px;
}

.add-task-header button:hover, .btn-task-from-action:hover {
    background-color: var(--btn-add-hover);
}

.add-task-form {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.task-form {
    display: flex;
    flex-direction: column;
    justify-content: left;
    width: 100%;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label span {
    color: red;
}

.form-group input, .form-group select {
    padding: 10px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border: 1px solid var(--border-focus);
    box-shadow: 0 0 0 1px var(--border-focus);
}

.task-form-action {
    display: flex;
    flex-direction: row;
    justify-content: right;
    gap: 12px;
}

.tasks {
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    gap: 20px;
    width: 100vw;
}

.btn-delete-tasks {
    display: flex;
    flex-direction: row;
    justify-content: right;
}

.btn-delete-all {
    padding: 8px 16px;
    background-color: var(--btn-delete-disabled);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-2);
}

.btn-cancel, .btn-delete-all--active, .btn-delete-task {
    background-color: var(--btn-delete);
}

.btn-cancel:hover, .btn-delete-all--active:hover, .btn-delete-task:hover {
    background-color: var(--btn-delete-hover);
}

.tasks-tabs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tasks-tabs ul {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.tasks-tabs ul li {
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 16px;
}

.mytask-tab {
    background-color: var(--color-task);
}

.mytask-tab--active, .mytask-tab:hover {
    background-color: var(--color-task-act);
}

.done-tab {
    background-color: var(--color-done);
}

.done-tab--active, .done-tab:hover {
    background-color: var(--color-done-act);
}

.overdue-tab {
    background-color: var(--color-overdue);
}

.overdue-tab--active, .overdue-tab:hover {
    background-color: var(--color-overdue-act);
}

.tabs-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    gap: 6px;
}

.tasks-list-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 28px;
    width: 100%;
    min-height: 200px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.tasks-list-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.task-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.task-card-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.level-priority {
    width: fit-content;
    padding: 6px;
    border-radius: 4px;
}

.low {
    background-color: var(--label-low);
}

.med {
    background-color: var(--label-med);
}

.high {
    background-color: var(--label-high);
}

.task-card-action {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-card-action button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
    width: 32px;
    height: 32px;
    border-radius: 8px;

}

.btn-check {
    background-color: var(--bg-input);
    border: 1px solid var(--text-1);
}

.check-icon {
    opacity: 0;
}

.check-icon--active {
    opacity: 1;
    display: block;
    font-size: 20px;
}

.btn-delete-task {
    border: none
}

@media (min-width: 1024px) {
    .text-base {
        font-size: 16px;
    }

    .text-medium {
        font-size: 14px;
    }

    header {
        justify-content: right;
        gap: 24px;
        padding: 16px 160px;
    }

    .add-task-header h1 {
        font-size: 32px;
        font-weight: 900;
    }

    .add-task-header button, .btn-task-form-action {
        padding: 10px 28px;
        font-size: 16px;
        font-weight: 800;
    }

    .tasks {
        width: 40vw;
    }

    .tasks-tabs ul {
        justify-content: space-evenly;
    }

    .tasks-tabs ul li {
        padding: 16px 44px;
    }

    .tabs-divider {
        width: 80%;
        height: 2px;
    }

    .tasks-list {
        padding: 16px 24px;
        border-radius: 16px;
    }

    .task-card-action {
        flex-direction: row;
    }
}