/* ==============================
   TOÀN BỘ TRANG
   ============================== */

body {
    margin: 0;
    padding: 20px;

    font-family: Arial, sans-serif;

    background-color: white;
}


/* ==============================
   KHUNG WORK TO-DOS
   ============================== */

.todo-container {
    width: 90%;
    max-width: 1068px;

    margin: 0 auto;
    padding: 25px 40px 35px;

    background-color: #0ba3bd;

    box-sizing: border-box;
}


/* ==============================
   TIÊU ĐỀ
   ============================== */

.todo-container h1 {
    margin: 0 0 25px;

    text-align: center;

    font-size: 50px;
    font-weight: bold;

    color: white;
}


/* ==============================
   CÁC DÒNG HƯỚNG DẪN
   ============================== */

.instruction {
    text-align: center;

    font-size: 20px;
    font-weight: bold;

    margin: 20px 0;
}


/* Dòng màu vàng */

.yellow {
    color: #ffc928;
}


/* Dòng màu xanh lá */

.green {
    color: #45e56a;
}


/* Dòng màu xanh đậm */

.blue {
    color: #006b85;
}


/* ==============================
   KHU VỰC NHẬP CÔNG VIỆC
   ============================== */

.input-area {
    display: flex;

    width: 94%;

    margin: 40px auto 25px;

    gap: 5px;
}


/* Ô nhập */

.input-area input {
    flex: 1;

    height: 42px;

    padding: 0 10px;

    border: none;

    border-radius: 6px;

    font-size: 18px;

    box-sizing: border-box;
}


/* Chữ mờ trong ô nhập */

.input-area input::placeholder {
    color: #777;
}


/* Nút thêm */

.input-area button {
    width: 55px;
    height: 42px;

    border: none;

    border-radius: 6px;

    background-color: #006c86;

    color: #00a5c0;

    font-size: 30px;
    font-weight: bold;

    cursor: pointer;
}


/* Hiệu ứng khi rê chuột */

.input-area button:hover {
    background-color: #005a70;
}


/* ==============================
   DANH SÁCH CÔNG VIỆC
   ============================== */

#todoList {
    width: 90%;

    margin: auto;
}


/* ==============================
   MỘT CÔNG VIỆC
   ============================== */

.todo-item {
    position: relative;

    min-height: 55px;

    margin-bottom: 14px;

    padding: 0 55px 0 25px;

    display: flex;

    align-items: center;

    border: 2px solid #006b85;

    border-radius: 6px;

    background-color: #50b5ca;

    color: white;

    font-size: 20px;
    font-weight: bold;

    box-sizing: border-box;
}


/* ==============================
   NỘI DUNG CÔNG VIỆC
   ============================== */

.todo-text {
    width: 100%;

    cursor: pointer;
}


/* ==============================
   CÔNG VIỆC ĐÃ HOÀN THÀNH
   ============================== */

/*
   Khi click vào công việc:
   - Đổi nền thành xanh lá
   - Đổi màu chữ
   - KHÔNG gạch ngang
*/

.todo-item.completed {
    background-color: #45df68;

    color: #087c45;
}


/*
   Không gạch ngang chữ
*/

.todo-item.completed .todo-text {
    text-decoration: none;
}


/* ==============================
   NÚT XÓA
   ============================== */

.remove {
    position: absolute;

    right: 25px;
    top: 50%;

    transform: translateY(-50%);

    color: #006b85;

    font-size: 22px;
    font-weight: bold;

    cursor: pointer;
}


/* Hover nút X */

.remove:hover {
    color: #003d4c;
}


/* ==============================
   LINK QUAY VỀ INDEX
   ============================== */

.back {
    text-align: center;

    margin-top: 25px;
}


.back a {
    color: #0645ad;

    text-decoration: none;

    font-size: 18px;
}


.back a:hover {
    text-decoration: underline;
}


/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 700px) {

    .todo-container {
        width: 100%;

        padding: 20px 15px 30px;
    }


    .todo-container h1 {
        font-size: 35px;
    }


    .instruction {
        font-size: 16px;
    }


    #todoList {
        width: 100%;
    }


    .input-area {
        width: 100%;
    }

}