//
// sidebar_custom.scss
//

.app-sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa; /* Warna sidebar putih */
}

.logo-box {
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Menu utama */
.navbar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #6c757d;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Parent Menu */
.nav-item {
    position: relative;
}

.nav-item > .nav-link {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: #343a40;
    text-decoration: none;
    padding: 12px 20px;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    cursor: pointer;
}

.nav-item > .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #007bff;
}

/* Ikon di sebelah kiri menu */
.nav-icon {
    font-size: 20px;
    margin-right: 10px;
    color: #6c757d;
}

/* CHILD MENU (Submenu) */
.sub-navbar-nav {
    list-style: none;
    padding-left: 20px;
}

/* Menampilkan submenu ketika parent di-hover atau memiliki fokus */
.nav-item:hover > .sub-navbar-nav,
.nav-item:focus-within > .sub-navbar-nav {
    display: block;
}

/* Aturan untuk setiap submenu item */
.sub-navbar-nav .nav-item {
    margin-left: 0;
    width: 100%;
}

.sub-navbar-nav .nav-link {
    font-size: 14px;
    font-weight: normal;
    color: #6c757d;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    transition: color 0.3s ease-in-out, background 0.3s ease-in-out;
}

/* Hover effect untuk submenu */
.sub-navbar-nav .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #007bff;
}

/* CHILD dari CHILD (Level lebih dalam) */
.sub-navbar-nav .sub-navbar-nav {
    margin-left: 15px;
}

/* Menampilkan submenu level dalam saat parent di-hover */
.nav-item:hover > .sub-navbar-nav .nav-item:hover > .sub-navbar-nav {
    display: block;
}

/* Aturan tambahan untuk submenu anak-anak */
.sub-navbar-nav .sub-navbar-nav .nav-link {
    font-size: 13px;
    color: #868e96;
}

/* Ikon anak panah saat menu terbuka */
.menu-arrow {
    transition: transform 0.3s ease;
}

/* Efek putar ikon saat submenu terbuka */
.nav-item:hover > .nav-link .menu-arrow,
.nav-item:focus-within > .nav-link .menu-arrow {
    transform: rotate(90deg);
}
