/* ── Wrapper ── */
.mm-wrapper {
    direction: rtl;
    display: inline-block;
    font-family: yekanbakh;
}

/* ── دکمه trigger ── */
.mm-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1b388d;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    padding: 12px 18px 12px 18px;
}

.mm-trigger-btn:hover {
    background: #1b388d;
}

.mm-trigger-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.mm-chevron {
    font-size: 14px !important;
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.2s;
    aspect-ratio: 1 !important;
}

.mm-trigger-btn[aria-expanded="true"] .mm-chevron {
    transform: rotate(180deg);
}

/* ── پنل اصلی مگامنو ── */
.megamenu {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    right: 50px;
    width: 60%;
    background: #ffffff;
    z-index: 9999;
    overflow: hidden;
    flex-direction: row;
}

.megamenu.open {
    display: flex;
    padding: 20px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 19px 25px #0000001a;
}

/* ── سایدبار (تب‌ها) ── */
.mm-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-left: 1px solid #e5e7eb;
    padding: 8px 0;
}

.mm-tab {
    padding: 16px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #292C2D;
    cursor: pointer;
    border-right: 3px solid transparent;
    transition: all 0.15s ease-in-out;
    user-select: none;
    gap: 15px;
    display: flex;
    align-items: center;
}

.mm-tab:hover,
.mm-tab.active {
    color: #00A0DC;
}
.mm-tab svg * {
	transition: all .3s ease-in-out;
}
.mm-tab.active svg * {
	fill: #00A0DC;
	transition: all .3s ease-in-out;
}

.mm-tab:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: -2px;
}

/* ── محتوای پنل ── */
.mm-content {
    flex: 1;
    padding: 20px 22px;
    min-height: 280px;
    overflow-y: auto;
}

.mm-panel {
    display: none;
    animation: mmFadeIn 0.15s ease;
}

.mm-panel.active {
    display: block;
}

@keyframes mmFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── عنوان پنل ── */
.mm-panel-title {
    font-size: 13px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mm-panel-title a {
    color: #2E2F39;
    text-decoration: none !important;
    font-weight: 500;
    display: flex;
}

.mm-panel-title a:hover {
    text-decoration: underline;
}

/* ── گرید آیتم‌ها ── */
.mm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

/* ── هر آیتم لینک ── */
.mm-item {
    display: flex;
    align-items: center;
    padding: 9px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s, color 0.12s;
    gap: 10px;
}

.mm-item:hover {
    color: #00A0DC;
}
.mm-item:hover svg * {
    fill: #00A0DC;
}

/* ── خطا ── */
.mm-error {
    color: #dc2626;
    font-size: 13px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 6px;
}

/* ── ریسپانسیو ── */
@media (max-width: 780px) {
    .megamenu {
        width: 98vw;
        right: auto;
        left: 0;
        flex-direction: column;
    }

    .mm-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        border-left: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 0;
    }

    .mm-tab {
        white-space: nowrap;
        border-right: none;
        border-bottom: 3px solid transparent;
        padding: 10px 14px;
    }

    .mm-tab.active {
        border-bottom-color: #ef4444;
        border-right-color: transparent;
    }

    .mm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mm-column-title a {
    color: #1e1e23;
    font-weight: 600;
    font-size: 16px;
}
.mm-sub-list {
	padding: 0;
}