#sidebar-wrapper {
    position: fixed;
    top: 0;
    padding-top: 125px;
    left: -325px;
    width: 325px;
    height: 100vh;
    background: #fff;
    color: #000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sidebar-wrapper.open {
    left: 0;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-heading {
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #343a40;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto; /* Ensure the sidebar content is scrollable */
    scroll-behavior: smooth;
}

.list-group {
    padding-bottom: 1rem;
}

/* === Menü Toggle === */
#menu-toggle {
    position: fixed;
    top: 70px;
    left: 0;
    width: 210px;
    height: 50px;
    background: white;
    color: black;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-left: -50px;
}

.menu-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
}

.menu-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

#menu-toggle.open .menu-icon {
    transform: rotate(90deg);
}

.lock-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon {
    width: 20px;
    height: 20px;
    transition: filter 0.3s ease;
}

.lock-icon.unlocked {
    filter: brightness(1.2);
}

.lock-icon.locked {
    filter: brightness(0.6);
}

.toggle-div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-div > * {
    margin-left: auto;
    margin-right: auto;
}

.menu-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    margin: 0 10px;
    transition: color 0.3s ease;
    text-align: center;
}

/* === Menügruppen === */
.menu-group {
    margin-top: 1rem;
}

.menu-header {
    cursor: pointer;
    padding: 14px 18px;
    min-height: 48px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-weight: bold;
    width: auto;
}

.menu-content {
    margin-top: 5px;
    margin-left: 5px;
    max-height: 0; /* Menu is collapsed by default */
    overflow-y: hidden; /* Hide overflowing content */
    transition: max-height 0.3s ease-in-out;
    color: #000;
    font-weight: normal;
}

.menu-group.open .menu-content {
    max-height: 999px; /* Allow full height when open */
}

/* === Submenüs === */
.submenu {
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    
}

.submenu-header {
    font-size: 0.95rem;
    padding: 10px 20px;
    min-height: 40px;
    font-weight: bold;
    color: #000;
    background-color: #b7bdc4;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: left;
    align-items: center;
    width: calc(100% - 1.5rem);
    
}

.submenu-content {
    padding-left: 1rem;
    min-height: 20px;
    overflow-y: hidden; /* Hide overflowing content */
    opacity: 0; /* Make submenu invisible by default */
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.submenu.open .submenu-content {
    max-height: 999px; /* Allow full height when open */
    opacity: 1; /* Make submenu visible when open */
}

/* === Menüeinträge === */
.list-group-item-action {
    border: none;
    padding: 8px 20px;
    font-size: 0.95rem;
    color: #000;
    background: none;
    text-decoration: none;
    display: block;
    min-height: 40px;
}

.list-group-item-action:hover {
    background-color: #f0f0f0;
}

.list-group-item-action.active {
    background-color: #0d6efd !important;
    color: white !important;
    font-weight: bold;
    border-radius: 4px;
}

/* === Mobile === */
@media (max-width: 768px) {
    #sidebar-wrapper {
        width: 220px;
    }

    .list-group-item-action,
    .submenu-header {
        font-size: 0.9rem;
    }

    .menu-group.open .menu-content,
    .submenu.open .submenu-content {
        max-height: 999px;
        opacity: 1;
    }

    .menu-content,
    .submenu-content {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }
}

/* === Bildchen === */
.image-wrapper {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    display: inline-block;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}
