/* Style for the main container */
.bar_group {
    position: relative;
    /* Anchor for the absolute positioned list */
    font-family: sans-serif;
    width: 95%;
    /* margin-bottom: 10px; */
}

/* Style for the clickable title bar */
.bar_tile {
    cursor: pointer;
    transition: background-color 0.3s;
}


.bar_tile p {
    margin: 0;
    display: flex;
    align-items: center;
}

.bar_tile i {
    margin-right: 10px;
}

/* Style for the list of links, hidden by default */
.bar_list:not(.app-grid) {
    display: block;
    /* Use block and manage visibility with opacity/transform */
    position: fixed;
    top: calc(100% + 5px);
    /* Position below the tile with a 5px gap */
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    z-index: var(--z-dropdown);

    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
}

.bar_list.app-grid {
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    display: none !important;
}

#app_selector_modal.active .bar_list.app-grid {
    display: grid !important;
}

/* Style for individual items in the list */
.bar {
    border-bottom: 1px solid var(--border-color);
}

.bar:first-child a {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.bar:last-child {
    border-bottom: none;
}

.bar:last-child a {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.bar a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-main);
    transition: background-color 0.3s, padding-left 0.3s;
}

.bar a:hover {
    background-color: var(--bg-surface);
    padding-left: 20px;
}

.bar a i {
    margin-right: 10px;
    width: 20px;
    /* Ensures icons are aligned */
    text-align: center;
    color: var(--text-muted);
}

/* Class to show the list */
.bar_list.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* Liens du menu de gestion réservés à l'administrateur absolu : affichés par src/js/admin_menu.js */
#menu_content #app_management a.admin-only-link:not(.is-visible) { display: none; }
