:root {
    --primary-color: #FA9F20;
    --button-border-color: #FA9F20;
    --selected-page-color: #e0d7c886;
    --bg-color: beige;
    --search-bg-color: #e3e3e391;
    --secondary-text-color: #424242;
    --primary-text-color: black;
    --priority-filter-color: #C2B199;
    --button-text-color: #696969;
    --button-bg-color: #fa9f20dd;
}

body {
    display: flex;
    flex-direction: row;
    margin: 0;
    font-family: "Inter", sans-serif;
    background-color: var(--bg-color);
}

#sidebar-section {
    background-color: var(--bg-color);
    height: 100dvh;
    margin-left: 20px;
    width: 25%;
    display: flex;
    align-items: start;
    flex-direction: column;

    .page {
        max-width: 173px;
        width: 173px;
        padding: 8px;
        border-radius: 6px;
        transition: 0.1s ease-in-out transform;
        p, svg {
            color: var(--primary-text-color);
            transition: 0.3s ease-in-out color;
        }
    }

    .page:not(.selected):hover {
        transform: scale(1.015);
        display: flex;
        align-items: center;
        /* background-color: rgba(205, 205, 205, 0.224); */
    }

    .selected {
        background-color: var(--selected-page-color);
    }


    #logo-area {
        display: flex;
        align-items: center;
        gap: 12px;
        
        h1 {
            font-weight: 600;
        }
    }

    #search-box {
        font-size: 1em;
        color: var(--secondary-text-color);
    }

    #search-area {
        position: relative;
        width: fit-content;
        margin-bottom: 20px;
    }

    #search-box {
        width: 210px;
        height: 35px;
        border: none;
        outline: none;
        background-color: var(--search-bg-color);
        padding-left: 35px;
        border-radius: 7px;
        margin-bottom: 0;
    }

    #search-area svg {
        position: absolute;
        left: 6px;
        top: 50%;
        transform: translateY(-50%) scale(0.7);
        pointer-events: none;
        color: var(--secondary-text-color);
    }

    #top-pages-section, #filter-pages-section {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 10px;
        margin-bottom: 5px;
    }

    #filter-pages-section {
        display: flex;
        gap: 25px;
    }

    #priority-filter-section, #status-filter-section {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .block {
        width: 20px;
        height: 20px;
    }

    h1 {
        font-size: 1.6em
    }

    .top-page, .filter-item {
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 15px;
        p {
            margin: 0;
            font-size: 1em;
        }
        svg {
            scale: 95%;
        }
    }

    .filter-item {
        color: var(--priority-filter-color);
    }

    .top-page {
        color: var(--primary-color);
        p {
            font-weight: 500;
        }
    }

}

#menu-context {
    display: none;
    position: absolute;
    width: 120px;
    height: fit-content;
    top: 0;
    left: 0;
}

.filter-select {
    display: none;
}

#menu-context.open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    margin: 0;
    background-color: #f9fafc;
    .menu-option {
        height: 30px;
    }
    div {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    .menu-option:hover {
        cursor: pointer;
        background-color: #f2e4aa;
    }
}

#main-section {
    height: 100dvh;
    width: 100%;
    background-color: var(--bg-color);

    #header-area {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-right: 50px;
    }

    #title-area {
        display: flex;
        align-items: center;
        flex-direction: row;
        gap: 10px;
        font-weight: 600;
        color: var(--primary-color);
        svg {
            transform: scale(1.2);
        }
        svg path {
            stroke-width: 2px;
        }
        p {
            font-size: 1.5em;
        }
    }

    #task-btn-area {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--button-text-color);
        border: 1px dashed var(--button-border-color);
        border-radius: 6px;
        padding-left: 10px;
        width: 60%;
        font-size: 0.9em;
        svg {
            color: var(--button-border-color);
        }
        #task-btn-header {
            cursor: pointer;
            height: 35px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }
        
        #task-btn-details {
            height: 0;
            display: flex;
            gap: 10px;

            pointer-events: none;

            opacity: 0;
            transition: 0.5s ease-in-out height, 0.5s ease-in-out opacity, 0.5s ease-in-out padding;


            .propriety {
                border: 1px solid var(--search-bg-color);
                border-radius: 6px;
                padding: 0 14px;
                height: 25px;
                font-size: 0.9em;
                display: flex;
                align-items: center;
                p {
                    cursor: pointer;
                    color: var(--secondary-text-color);
                    font-weight: 500;
                }
                input, select {
                    position: absolute;
                    visibility: none;
                    opacity: 0;
                    pointer-events: none;
                }
            }
        }

        button {
            cursor: pointer;
            display: flex;
            align-items: center;
            margin-left: auto;
            margin-right: 20px;
            padding: 0 10px;
            border-radius: 6px;
            height: 25px;
            border: none;
            background-color: transparent;
            border: 1px solid var(--search-bg-color);
            color: var(--secondary-text-color);
            font-weight: 500;
            font-size: 0.9em;
            transition: 0.3s ease-in-out color, 0.3s ease-in-out border-color, 0.3s ease-in-out background-color;
        }

        button:hover {
            background-color: var(--button-bg-color);
            border-color: var(--button-bg-color);
            color: white;
            transform: scale(1.02);
        }

        #task-btn-details.open {
            height: 30px;
            opacity: 1;

            pointer-events: all;

            padding-bottom: 10px;
        }

        #task-btn-text {
            background-color: transparent;
            border: none;
            transition: 0.3s ease-in-out color;
            font-weight: 500;
            font-size: 1.05em;
            margin: 0;
        }

        #task-btn-text:focus {
            outline: none;
        }

        margin-bottom: 10px;
    }

    #tasks-area {
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: 100%;
        width: 65%;
        div {
            display: flex;
            align-items: center;
        }
    }

    .task-template {
        display: flex;
        flex-direction: row;
        gap: 10px;
        align-items: center;
        font-size: 0.95em;
        padding: 2px 10px;
        border: 1px solid transparent;
        border-radius: 5px;
        transition: 0.3s ease-in-out background-color, 0.3s ease-in-out border-color;

        .confirm-btn {
            display: flex;
            opacity: 0;
            pointer-events: none;
            width: 75px;
            font-size: 0.90em;
            transition: 0.3s ease-out opacity;
        }

        .confirm-btn.open {
            opacity: 1;
            pointer-events: all;
            position: relative;
            align-content: center;
            justify-content: center;
            top: 1px;
            margin-left: auto;
            background-color: #69696933;
        }

        .confirm-btn.open:hover {
            background-color: var(--button-bg-color);
        }

        .input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        button {
            cursor: pointer;
            display: flex;
            align-items: center;
            margin-left: auto;
            margin-right: 20px;
            padding: 12px 10px;
            border-radius: 4px;
            height: 25px;
            border: none;
            background-color: transparent;
            border: 1px solid var(--search-bg-color);
            color: var(--secondary-text-color);
            transition: 0.3s ease-in-out color, 0.3s ease-in-out border-color, 0.3s ease-in-out background-color;
        }

        button:hover {
            background-color: var(--button-bg-color);
            border-color: var(--button-bg-color);
            color: white;
            
        }

        div:first-child {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .metadata-area {
            position: relative;
            display: flex;
            align-items: center;
            gap: 10px;
            top: 1px;
        }

        .metadata {
            padding: 2px 8px;
            border: 1px solid rgb(222, 222, 201);
            font-weight: 500;
            font-size: .90em;
            border-radius: 4px;
        }

        .priority-high {
            background: #fde2df;
            border-color: #f6bcb5;
            color: #b42318;
        }

        .priority-medium {
            background: #e6f7ea;
            border-color: #a8e6bd;
            color: #137333;
        }

        .priority-low {
            background: #e3f2fd;
            border-color: #b8e0ee;
            color: #1565c0;
        }

        .task-title {
            width: auto;
            background-color: transparent;
            border: none;
            field-sizing: content;
        }

        .task-title:focus {
            outline: none;
        }

        .task-status {
            cursor: pointer;
            appearance: none;
            width: 15px;
            height: 15px;
            background-color: transparent;
            border: 1px solid var(--primary-color);
            border-radius: 3px;
            position: relative;
            display: flex;
            transform: scale(1);
            transition: 0.3s ease-in-out background-color, 0.3s ease-in-out opacity;
        }
        .task-status::after {
            position: absolute;
            inset: 0;
            opacity: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            content: "✓";
            font-weight: bolder;
            color: #472c05;
            transition: 0.3s ease-in-out opacity, 0.3s ease-in-out transform;
        }

        .task-status:checked {
            background-color: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .task-status:checked::after {
            opacity: 1;
            transform: scale(1);
        }
    }

    .task-template.editing {
        border-color: var(--search-bg-color);
        background-color: rgba(234, 234, 213, 0.486);
    }
}
@media only screen and (max-width: 575px) {
    #sidebar-section {
        display: none;
    }
    #main-section {
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        #header-area {
            width: 100%;
            display: flex;
            justify-content: start;
            align-items: center;
            margin-left: 175px;
        }

        #title-area {
            display: flex;
            transform: scale(1.3);
        }

        .header-btn-task-text {
            display: none;
        }

        #task-add-btn {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100px;
        }

        #task-btn-area {
            width: 75%;
        }

        #task-btn-header {
            width: 350px;
            display: flex;
            align-self: start;
            justify-self: start;
        }

        #tasks-area {
            width: 85%;
        }

        .task-date-area, .task-priority-area {

        }


        .task-template {
            .metadata {
                font-size: 0.9em;
                padding: 2px 10px;
                display: flex;
                align-items: center;
                justify-content: center;
                text-wrap: nowrap;
            }
        }

        .confirm-btn.open {
            display: flex;
            flex-wrap: wrap;
        }
    }
}