﻿.sidebar {
    width: 250px;
    height: 100vh;
    box-shadow: 5px 10px 10px #eee;
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    scrollbar-width: thin;
    background-color: var(--color-light);
    text-transform: uppercase;
}

    .sidebar.toggled {
        width: 80px;
    }

        .sidebar.toggled #brand-letters {
            display: none;
        }

#sidebarToggle {
    display: flex;
    position: relative;
    float: inline-end;
    gap: 0.75rem;
    padding: 0rem 0;
    text-decoration: none;
    color: black;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    #sidebarToggle::before {
        font-family: 'Font Awesome 6 Free';
        content: "\f191";
        position: absolute;
        font-size:1.3rem;
        right: 0px;
        z-index: 100;
    }

    #sidebarToggle.toggled::before {
        font-family: 'Font Awesome 6 Free';
        content: "\f152";
        position: absolute;
        right: 0px;
        z-index: 100;
    }

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-divider {
    border: 0;
    height: 1px;
    background-color: #383535;
    margin: 0;
}


.sidebar-brand {
    height: 8rem;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.sidebar-brand-icon {
    margin-top: 1rem;
}

.sidebar-item {
    width: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 1rem;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-radius: 4px;
    transition: width 0.3s ease;
}

    .sidebar-link.active {
        color: var(--color-accent-1);
    }

        .sidebar-link.active span {
            text-decoration: underline;
        }

.sidebar.toggled .sidebar-link {
    flex-direction: column;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    text-align: center;
    transition: background-color 0.2s;
}

    .sidebar.toggled .sidebar-link span {
        font-size: 0.65rem;
        display: block;
    }

.sidebar-link:hover {
    color: var(--color-accent-1);
}

.sidebar-link span {
    display: inline;
    font-size: 0.85rem;
}

.sidebar-item.logout {
    margin-top: 3rem;
}

@media (max-width: 768px){
    .sidebar-brand{
        height:11rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 120px;
    }

        .sidebar #brand-letters {
            display: none;
        }

        .sidebar .sidebar-link {
            flex-direction: column;
            justify-content: center;
            padding: 0.6rem 0.5rem;
            text-align: center;
        }

    sidebar .sidebar-link span {
        font-size: 0.65rem;
        display: block;
    }
}
