/* Custom Sidebar Menu Styles for inapp-1.0.0 */

/* Submenu Arrow/Chevron rotation */
.sidebar-link.has-arrow::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    display: inline-block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.3s ease;
}

.sidebar-link.has-arrow[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Submenu container spacing */
.first-level {
    padding-left: 15px;
    list-style: none;
    background: rgba(0, 0, 0, 0.02);
}

.sidebar-nav {
    padding: 15px 0;
}

/* Submenu circle indicator refinement */
.sidebar .sidebar-nav .menu-list .menu-item .sub-menu .menu-item .menu-link::before {
    content: "";
    width: 6px;
    height: 6px;
    border: 1px solid #adb5bd;
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.sidebar .sidebar-nav .menu-list .menu-item .sub-menu .menu-item .menu-link:hover::before {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary);
}

/* Complete Sidebar Hide on Desktop */
@media (min-width: 992px) {
    .sidebar.collapsed {
        left: -260px !important;
        visibility: hidden;
    }

    .content.full {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .topbar {
        transition: all 0.3s ease;
    }

    .topbar.full {
        left: 0 !important;
        margin-left: 0 !important;
        padding-left: 1.5rem !important;
        /* px-3 equivalent */
        width: 100% !important;
    }

    .content {
        transition: all 0.3s ease;
    }

    /* Page Title Visibility: Only show on desktop if sidebar is hidden (full mode) */
    #pageTitle {
        display: none !important;
    }

    .topbar.full #pageTitle {
        display: block !important;
    }
}

/* Mobile: Drawer and Overlay Styles */
@media (max-width: 991.98px) {
    #pageTitle {
        display: block !important;
        font-size: 1rem;
    }

    .sidebar {
        left: -260px;
        transition: all 0.3s ease;
    }

    .sidebar.mobile-show {
        left: 0 !important;
        z-index: 1050;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .overlay.show {
        display: block;
    }
}

/* Modal and Role Selection Styles */
.active-rol {
    border-left: 4px solid var(--bs-primary) !important;
}

.icon-shape {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Small circle indicator for submenus */
.submenu-icon {
    width: 6px;
    height: 6px;
    border: 1.5px solid #6b7280;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.sidebar-item:hover .submenu-icon {
    background-color: #6b7280;
    border-color: #5b626e;
}

/* Alignment for sidebar links */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
}

.sidebar-link i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.sidebar-link:hover {
    color: #111827;
    background-color: #f3f4f6;
}

/* Ensure the circular indicator is on the same line as the text */
.sidebar-link .hide-menu {
    vertical-align: middle;
    display: inline-block;
}