﻿#sidebar2020 {
    min-width: 180px;
    max-width: 180px;
    background: #555655;
    color: #fff;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-logo-top {
    flex-shrink: 0;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #FFF;
    margin-bottom: 0.3rem;
}

    .sidebar-logo-top img {
        max-height: 45px !important;
        width: auto;
        object-fit: contain;
    }

/* NEW WRAPPER for nav list and arrows */
.nav-area-wrapper {
    flex-grow: 1; /* Takes up the available middle space */
    position: relative; /* Positioning context for the absolute arrows */
    display: flex; /* To make the ul fill height */
    flex-direction: column;
    overflow: hidden; /* Ensures arrows don't cause overflow if too wide */
}

.sidebar-nav-main {
    /* MODIFIED: No longer needs position:relative */
    /* MODIFIED: Needs to fill the new wrapper */
    height: 100%;
    flex-grow: 1; /* If nav-area-wrapper is flex */
    overflow-y: auto !important;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    scrollbar-width: none;
}

    .sidebar-nav-main::-webkit-scrollbar {
        display: none;
    }

.sidebar-bottom-content {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #555655;
}

#sidebar2020 .list-group-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.5rem;
    color: #ffffff;
    background-color: transparent !important;
    border: none;
    border-left: 4px solid transparent;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-left-color 0.2s ease;
    overflow: hidden;
}

#sidebar2020 .sidebar-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sidebar2020 li:hover > .list-group-item, #sidebar2020 li:hover > div > .list-group-item {
    color: #ffffff;
    background-color: #7C7D7C !important;
    text-decoration: none;

}

#sidebar2020 li.active > .list-group-item {
    background-color: #5FCAF5 !important;
    border-left-color: #ffc107;
}

#sidebar2020 .list-group-item i.fa-fw {
    width: 1.5em;
    margin-right: 1rem;
}

.sidebar-user-info {
    padding: 1rem;
    background-color: rgba(0,0,0,0.15);
}

.sidebar-footer-nav { /* styles */
}

.sidebar-footer-logo {
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.25);
}


/* --- CLICKABLE SIDE ARROW SCROLL INDICATORS CSS --- */
.scroll-arrow {
    position: absolute; /* Positioned relative to .nav-area-wrapper */
    right: 5px;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, background-color 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

    .scroll-arrow:hover {
        background-color: rgba(0, 0, 0, 0.5);
    }

    .scroll-arrow.visible {
        opacity: 1;
        pointer-events: auto;
    }

.scroll-arrow-up {
    top: 5px;
}

.scroll-arrow-down {
    bottom: 5px;
}
/* --- END CLICKABLE SIDE ARROW CSS --- */


/*#main_content {
    transition: margin-left 0.3s ease-in-out;
    padding: 5px;
    width: 100%;
}*/

@media (min-width: 769px) {
 /*   #main_content {
        margin-left: 180px;
    }

        #main_content.sidebar-collapsed {
            margin-left: 0;
        }*/

    #sidebar2020.active {
        margin-left: -180px;
    }

    #mobileNavBar, .sidebar-dismiss {
        display: none !important;
    }
}

@media (max-width: 768.98px) {

    #sidebar2020 {
        min-width: 260px;
        max-width: 260px;
    }

    #sidebar2020 {
        left: -260px;
    }

        #sidebar2020.active {
            left: 0;
            margin-left: 0;
        }

    .sidebar-dismiss {
        display: block;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

        .overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

    #sidebar2020 .list-group-item {
        font-size: 1.3rem;
    }
}

#mobileNavBar {
    background-color: #fff;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
