/* موقعیت wrapper */
.mk-mobile-menu-wrapper {
    position: relative;
    z-index: 9999;
}

/* دکمه باز کردن منو */
.mk-mobile-menu-toggle {
    display: flex;
    align-items: center;
    color: #fff;
    padding: 10px 15px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

/* دکمه بستن منو */
.mk-mobile-menu-close {
    align-self: flex-end;
    font-size: 18px;
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

/* overlay */
.mk-mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

/* کشوی منو */
.mk-mobile-menu-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 250px;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

/* جهت چپ یا راست کشو */
.mk-position-left .mk-mobile-menu-drawer {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.mk-position-right .mk-mobile-menu-drawer {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

.mk-mobile-menu-wrapper.open .mk-mobile-menu-drawer {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.mk-mobile-menu-wrapper.open .mk-mobile-menu-overlay {
    display: block;
}

/* منو */
.mk-mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mk-mobile-menu>li>a {
    margin: 15px 0;
}

.mk-mobile-menu li a {
    display: flex;
    align-items: center;
    padding-inline-start: 15px;
    height: 40px;
    border-bottom: 1px solid #eee;
}

.mk-mobile-menu>li>a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.mk-mobile-menu li.current-menu-item a {
    color: var(--mk-primary-color);
}

/* زیرمنوها - مخفی در ابتدا */
.mk-mobile-menu .sub-menu {
    display: none;
}

.mk-mobile-menu .sub-menu li a {
    color: #949494;
}

/* لینک منو دارای زیرمنو */
.mk-mobile-menu .menu-item-has-children>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* آیکن باز/بستن زیرمنو */
.mk-submenu-toggle {
    font-size: 14px;
    padding: 10px;
    border-inline-start: 1px solid #eee;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* حالت باز */
.menu-item-open {
    padding-bottom: 10px;
}

.menu-item-open>a {
    background-color: #00000009;
}

.menu-item-open>.sub-menu {
    display: block;
    list-style: none;
}

.menu-item-open>a .mk-submenu-toggle {
    background-color: var(--mk-primary-color);
    transition: all 0.3s ease;
}

/* برای سایت‌های راست‌چین (فارسی/عربی) */
[dir="rtl"] .mk-submenu-toggle i.mk-toggle-icon {
    transform: rotate(180deg);
}

/* برای سایت‌های چپ‌چین (انگلیسی و...) */
[dir="ltr"] .mk-submenu-toggle i.mk-toggle-icon {
    transform: rotate(0deg);
}

.mk-submenu-toggle i.mk-toggle-icon {
    transition: transform 0.3s ease;
}

.menu-item-open>a .mk-submenu-toggle i.mk-toggle-icon {
    color: white;
    transform: rotate(90deg);
}