/* ganjeh-kala: mobile-menu.css */

/* Overlay */
.gk-mm-overlay{
    position:fixed; inset:0; background:rgba(15,23,42,.72);
    opacity:0; visibility:hidden; transition:opacity .2s ease, visibility .2s ease;
    z-index:100000;
}
.gk-mm-overlay.show{ opacity:.5; visibility:visible; }

/* Drawer */
.gk-mm-drawer{
    position:fixed; top:0; bottom:0; width:min(86vw,380px); max-width:94vw;
    background:var(--gk-surface,#fff); box-shadow:var(--gk-shadow-lg,0 18px 48px rgba(15,23,42,.16));
    z-index:100001; transition:transform .25s ease; will-change:transform;
    right:0; left:auto; transform:translateX(100%);
}
.gk-mm-drawer.gk-drawer--left{ left:0; right:auto; transform:translateX(-100%); }
.gk-mm-drawer.show{ transform:translateX(0) !important; }

body.gk-mm-open{ overflow:hidden; touch-action:none; }

/* Header */
.gk-mm-head{
    position:sticky; top:0; z-index:2;
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:12px 16px; background:var(--gk-surface,#fff); border-bottom:1px solid var(--gk-border-color,#e5e7eb);
}
.gk-mm-title{ font-weight:700; }
.gk-mm-btn-close{
    border:none; background:var(--gk-surface-soft,#f3f4f6); width:32px; height:32px; border-radius:8px; cursor:pointer;
}

/* Body – list */
.gk-mm-body .gk-mobile-menu,
.gk-mm-body .menu{ list-style:none; margin:0; padding:0; }
.gk-mm-body li{ border-bottom:1px solid var(--gk-border-color,#e5e7eb); position:relative; }
.gk-mm-body a{ display:flex; align-items:center; justify-content:space-between; gap:8px;
    padding:12px 16px; text-decoration:none; color:var(--gk-text,#222); font-size:15px; line-height:1.4; }
.gk-mm-body a:hover{ background:var(--gk-surface-soft,#f8fafc); color:var(--gk-primary,#3342fd); }
.gk-mm-body a:visited{ color:var(--gk-text,#222); }

/* Toggle button appended to <a> */
.gk-mm-toggle{
    margin-inline-start:8px; border:none; background:var(--gk-surface-soft,#f3f4f6);
    border-radius:8px; min-width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
.gk-mm-toggle svg{ transition:transform .18s ease; transform:rotate(0deg); }
.gk-mm-body li.is-open > a > .gk-mm-toggle svg,
.gk-mm-body li.is-open > .gk-mm-toggle svg{ transform:rotate(180deg); }

/* Submenu */
.gk-mm-body ul.sub-menu{ margin:0; padding:0; display:none; }
.gk-mm-body li.is-open > ul.sub-menu{ display:block; }
.gk-mm-body ul.sub-menu > li > a{ padding-inline-start:28px; }

/* small visual tweaks */
.gk-mobile-menu-widget .action-btn .label{ margin-inline-start:6px; }


/* Shared menu-item icon contract. */
.gk-mobile-menu-widget .gk-mm-icon{
    --gk-menu-icon-size:20px;
    width:var(--gk-menu-icon-size); height:var(--gk-menu-icon-size);
    flex:0 0 var(--gk-menu-icon-size); display:inline-flex; align-items:center; justify-content:center;
}
.gk-mobile-menu-widget .gk-mm-icon svg,.gk-mobile-menu-widget .gk-mm-icon img{width:100%;height:100%;display:block;object-fit:contain;}
.gk-mobile-menu-widget .gk-mm-link-wrap{display:flex;align-items:center;position:relative;}
.gk-mobile-menu-widget .gk-mm-link-wrap>a{flex:1 1 auto;min-width:0;}
.gk-mobile-menu-widget .gk-mm-link-wrap>.gk-mm-toggle{flex:0 0 32px;margin-inline:4px 12px;}
.gk-mobile-menu-widget .gk-mobile-sub-menu{list-style:none;margin:0;padding:0;display:none;}
.gk-mobile-menu-widget li.is-open>.gk-mobile-sub-menu{display:block;}
.gk-mobile-menu-widget .gk-mobile-sub-menu .gk-mm-link-wrap>a{padding-inline-start:28px;}
.gk-mobile-menu-widget .gk-mm-btn-close svg,.gk-mobile-menu-widget .gk-mm-toggle svg{width:18px;height:18px;display:block;}

.gk-mobile-menu-widget .gk-mm-icon svg *[fill]:not([fill="none"]){fill:currentColor;}
.gk-mobile-menu-widget .gk-mm-icon svg *[stroke]:not([stroke="none"]){stroke:currentColor;}
