
  
.drawer-menu-header {
    background: #333;
    color: #fff;
    padding: 1em;
    text-align: right;
  }

.drawer-menu-button {
    background: #fff;
    aspect-ratio: 1 / 1;
    border-radius: 30px;
    width: 40px;
    border: none;
    font-size: 24px;
    color: #545454;
    cursor: pointer;
    float: right;
    padding-top: 5px;
}

.drawer-menu {
    position: fixed;
    direction:rtl;
    top: 0;
    right: -450px;
    width: 80%;
    max-width: 400px;
    height: calc(100% - 60px);
    background: #f5f5f5;
    color: #666;
    overflow: auto;
    transition: right 0.3s ease;
    z-index: 15000;
    border-left: 2px solid #bdbdbd;
    box-shadow: -10px 0px 20px 0 #00000040;
}
  
  .drawer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .drawer-menu ul li {
    border-bottom: 1px solid #dfdfdf;
  }
  
  .drawer-menu ul li a {
    display: block;
    padding: 1em;
    color: #666;
    text-decoration: none;
    text-align: right; /* Align text to the right */
  }
  
  .drawer-menu ul li a:hover {
    background: #e9e9e9;
  }

.close-button {
    background: none;
    border: none;
    font-size: 48px;
    color: #3e3e3e;
    line-height: 0px;
    cursor: pointer;
    padding: .7em;
    text-align: right;
    float: left;
}
  
  .main {
    padding: 1em;
    transition: filter 0.3s ease;
  }
  
  .menu-open {
    right: 0; /* Slide in from the right */
  }
  
  .menu-open-main {
    filter: blur(4px);
  }
  
  .menu-open-body {
    overflow: hidden;
  }
  
  /* Tab styles */
.drawer-menu .tabs {
    display: flex;
    background: #d8d8d8;
    direction: rtl;
    padding: 0;
}

.drawer-menu .tabs .tab-button {
    flex: 1;
    background: #e9e9e9;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 1em;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #dcdcdc;
    box-shadow: inset 0px -4px 5px 0px #33333312;
}

.drawer-menu .tabs .tab-button.active {
    background: #f5f5f5;
    color: #333;
    font-weight: bold;
    border-top: 1px solid #dcdcdc;
    border-left: 1px solid #dcdcdc;
    border-right: 1px solid #dcdcdc;
    border-bottom: none;
    box-shadow: 0px -4px 5px 0px #33333312;
    z-index: 10;
}

.drawer-menu .tab-content {
    padding: 0px;
}

    .drawer-menu .tab-content .tab-pane {
        display: none;
    }

        .drawer-menu .tab-content .tab-pane.active {
            display: block;
        }






    .drawer-menu .tab-content ul.tree, .drawer-menu .tab-content ul.tree ul {
        list-style-type: none;
        padding-left: 0;
        margin: 0;
        flex: 1 1 100%;
        order: 3;
    }

.drawer-menu .tab-content ul.tree li {
    position: relative; /* برای زیرمنوها که مطمئن شویم زیر منوی اصلی قرار می‌گیرند */

    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0px;
    border-top: 1px solid #ddd;
    max-width: 100%;
    width: 100%;
    border-bottom: none;
}


/* تنظیم موقعیت زیرمنو */
.drawer-menu .tab-content ul.tree ul {
    display: none;
    position: relative; /* قرار دادن زیرمنو زیر آیتم اصلی */
    /* فاصله از سمت چپ برای زیرمنوها */
}
.drawer-menu .tab-content ul.tree li .nav-link-text {
    padding: 0 15px 0 0 !important;
    color: #333;
}
.drawer-menu .tab-content ul.tree .expanded .nav-link-text {
    font-weight: bold;
    color: #000000;
}

.drawer-menu .tab-content ul.tree li a {
    padding: 0 15px 0 0 !important;
    color: #777;
}

/* نشانگر گسترش/جمع‌شدن در انتهای آیتم با border */
.drawer-menu .tab-content ul.tree li .toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 18px;
    border-top: 1px solid #0000001b;
    transition: transform 0.2s ease-in-out;
    transform: rotate(90deg);
}

/* وقتی گسترش داده می‌شود */
.drawer-menu .tab-content ul.tree li.expanded > ul {
    display: block; /* نمایش زیرشاخه‌ها */
}

.drawer-menu .tab-content ul.tree li.expanded .toggle-icon {
    transform: rotate(0deg); /* چرخاندن آیکون به سمت بالا */
    background: #ffbb00;
    color: #fff;
}

/* استایل برای آیتم‌های بدون زیرشاخه */
.drawer-menu .tab-content ul.tree li.leaf .toggle-icon {
    visibility: hidden; /* پنهان کردن آیکون برای گره‌های بدون زیرشاخه */
}

.drawer-menu .tab-content ul.tree li.leaf {
    justify-content: flex-start; /* تراز کردن آیتم بدون نشانگر در چپ */
    padding-right: 15px;
    height: 50px;
}
.drawer-menu .tab-content ul.tree li.leaf a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}