#result {
    white-space: pre-wrap;
}

body {
    background-color: rgb(208, 208, 208);
    margin-bottom: 4rem;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

button {
    box-shadow: 2px 2px grey;
}

button:hover {
    cursor: pointer;
    transform: translate(-1px, -1px);
}

.hidden {
    display: none;
}

.mainBox {
    background-color: rgb(208, 208, 208);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    height: 100%;
}

.containerButton {
    width: 100%;
}

.containerTask {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.containerButton #AddNewTask {
    width: 100%;
    height: 4rem;
    font-size: 20px;
    background-color: rgb(188, 188, 255);
    border: 1px solid gray;
    border-radius: 20px;
}

.containerButton #AddNewTask:hover {
    background-color: rgb(184, 184, 255);
    transform: translate(-2px, -2px);
}

.completeBtn {
    background: #b8d5b8;
    padding: 20px;
    font-size: 30px;
    width: 200px;
}

.editBtn {
    background: #e6d3a6;
    padding: 20px;
    font-size: 30px;
    width: 200px;
}

.deleteBtn {
    background: #e6b6b6;
    padding: 20px;
    font-size: 30px;
    width: 200px;
}

.taskActions .completeBtn,
.taskActions .editBtn,
.taskActions .deleteBtn {
    width: 100px;
    height: 70px;
    padding: 10px;
    font-size: 15px;
    font-weight: bold;
}

.taskActions button {
    margin-left: 10px;
}

.actionButtons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.task {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 15px;
    background: #f7f7f7;
    border-radius: 10px;
    width: 95%;
    box-shadow: 2px 2px black;
}

.taskHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bolder;
}

.left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.taskBody {
    padding: 0 5px 5px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.taskDescription {
    border: 1px solid #ccc;
    padding: 15px;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
}

.taskText {
    width: 100%;
    height: 120px;
    border: none;
    resize: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    overflow-y: auto;
}

.taskToggle {
    font-size: 30px;
    width: 3rem;
}

.taskFooter {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.taskActions {
    display: flex;
    align-items: center;
    width: 100%;
}

.taskDates {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.taskDates div {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 10px;
}

.dateBox {
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 6px;
    background: white;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.taskPriorityHigh {
    display: flex;
    background-color: rgb(255, 126, 126);
    box-shadow: 2px 2px gray;
    color: rgb(160, 0, 0);
    padding: 8px 16px;
    font-size: 16px;
    font-weight: bold;
    width: 100px;
    height: 2rem;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.taskPriorityMild {
    display: flex;
    background-color: rgb(255, 242, 99);
    box-shadow: 2px 2px gray;
    color: rgb(85, 89, 11);
    padding: 8px 16px;
    font-size: 16px;
    font-weight: bold;
    width: 100px;
    height: 2rem;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.taskPriorityLow {
    display: flex;
    background-color: rgb(142, 255, 183);
    box-shadow: 2px 2px gray;
    color: rgb(0, 89, 0);
    padding: 8px 16px;
    font-size: 16px;
    width: 100px;
    height: 2rem;
    font-weight: bold;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.reminder {
    font-size: 32px;
    width: auto;
    margin-right: 10px;
}

.reminder:hover {
    cursor: pointer;
}

/* footer status */

.taskCompletion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.statusOnTime {
    background: #b8d5b8;
    padding: 10px 20px;
    border: 1px solid #5ca65c;
    font-weight: bold;
}

.statusLate {
    background: #e6b6b6;
    padding: 10px 20px;
    border: 1px solid #c44;
    font-weight: bold;
}

.statusLate,
.statusOnTime {
    margin-top: 10px;
    display: inline-block;
    width: fit-content;
}

/*footer*/

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 100;
    transition: bottom 0.3s;
}

.footer.up {
    bottom: 80%;
}

.completedPanel {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 80%;
    background: white;
    transition: bottom 0.3s;
    background-color: rgb(210, 210, 210);
    margin: auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    overflow-y: auto;
    flex: 1;

    box-shadow: 0 -8px 20px rgba(0,0,0,0.25);
    z-index: 100;
}

.completedPanel.show {
    bottom: 0;
}

.completedPanel h2 {
    text-align: center;
    margin-top: 40px;
}

.completedList {
    width: 95%;
}

.completedList .taskFooter {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.completedList .deleteBtn {
    width: 70px;
    height: 70px;
    padding: 10px;
}

/*task section*/

.addNewTask,
.editExistingTask,
.submitCurrentTask,
.deleteCurrentTask {
    background-color: rgb(170, 170, 170);
    width: 75%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 2px 2px grey;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.formContainer {
    width: 100%;
}

.addNewTask .formContainer div,
.editExistingTask .formContainer div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 0 0 10px 0;
}

.submitCurrentTask .description,
.deleteCurrentTask .description {
    display: flex;
    flex-direction: column;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.formContainer h2 {
    color: red;
    text-align: center;
}

.newTaskTitle,
.editTaskTitle {
    width: 100%;
    height: 4rem;
    padding: 20px;
    font-size: 20px;
    border-radius: 20px;
    font-weight: bolder;
    box-shadow: 2px 2px rgb(77, 77, 77);
}

.newTaskDescription,
.editTaskDescription {
    width: 100%;
    height: 15rem;
    padding: 20px;
    font-size: 18px;
    border-radius: 20px;
    box-shadow: 2px 2px rgb(77, 77, 77);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.newTaskDate,
.editTaskDate {
    width: 300px;
    height: 3rem;
    font-size: 17.5px;
    border-radius: 10px;
    margin-left: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 2px 2px rgb(77, 77, 77);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.prioritySelectTask {
    width: 100px;
    border-radius: 10px;
    padding: 10px 0;
    text-align: center;
    margin-left: 10px;
}

.formButtons {
    gap: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.addNewTask .formButtons button,
.editExistingTask .formButtons button,
.submitCurrentTask .formButtons button,
.deleteCurrentTask .formButtons button {
    width: 10rem;
    height: 3rem;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid gray;
    font-size: 15px;
    font-weight: 700;
}

.submitBtn,
.updateBtn {
    background-color: rgb(117, 255, 117);
    box-shadow: 2px 2px rgb(47, 169, 47);
}

.submitBtn:hover,
.updateBtn {
    background-color: rgb(147, 255, 147);
}

.cancelBtn {
    background-color: rgb(255, 106, 106);
    box-shadow: 2px 2px rgb(255, 67, 67);
}

.cancelBtn:hover {
    background-color: rgb(255, 128, 128);
}

/* mobile only */
@media (max-width:768px) {
    .taskFooter {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .taskActions {
        width: 100%;
        justify-content: space-between;
    }

    .completeBtn,
    .editBtn,
    .deleteBtn {
        width: 100px;
        font-size: 22px;
    }

    .reminder {
        font-size: 28px;
        width: auto;
        margin-right: 0;
    }

    .completedList .taskFooter {
        grid-template-columns: 1fr;
    }

    .completedList .deleteBtn {
        width: 100%;
        height: 60px;
    }

    .taskDates div {
        grid-template-columns: 1fr;
    }

    .task {
        width: 95%;
    }

    .containerTask {
        max-height: calc(100vh - 100px);
        width: 99%;
    }
}