/* =========================================================
   Mobile Menu Widget — mobile-menu.css  v1.0.4
   ========================================================= */

.mmw-nav,
.mmw-nav * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.mmw-list,
.mmw-submenu {
    list-style: none;
}

/* ── Top-level list ─────────────────────────────────────── */
.mmw-list {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Each top-level item ────────────────────────────────── */
.mmw-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* overridden by control */
}

.mmw-item:last-child {
    border-bottom: none;
}

/* ── Item row (shared by <div> toggle and <a> link) ─────── */
.mmw-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    /* padding overridden by Elementor control */
    padding: 13px 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: none;
    border-radius: 0;        /* reset button default */
    -webkit-appearance: none; /* reset iOS button styling */
    appearance: none;
    outline: none;
    font: inherit;           /* button doesn't inherit font by default */
    text-align: left;        /* button defaults to center */
    transition: background-color 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    line-height: 1.3;
}

.mmw-item-row:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.mmw-item-row:focus:not(:focus-visible) {
    outline: none;
}

.mmw-item-label {
    flex: 1 1 auto;
    text-align: left;
}

/* ── Icon — fixed-size inline SVG ───────────────────────── */
.mmw-item-icon {
    flex: 0 0 auto;
    display: block;
    width: 14px;             /* overridden by Elementor slider */
    height: 14px;
    overflow: visible;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rotate indicator when open */
.mmw-item.is-open > .mmw-item-row .mmw-icon-toggle {
    transform: rotate(180deg);
}

/* Plus becomes X when open */
.mmw-item.is-open > .mmw-item-row .mmw-icon-toggle.mmw-icon-plus {
    transform: rotate(45deg);
}

/* ── Submenu — CSS grid slide ───────────────────────────── */
/*
 * The <ul class="mmw-submenu"> is the grid container.
 * The <div class="mmw-submenu-inner"> is the single grid row.
 * Animating grid-template-rows from 0fr → 1fr collapses/expands
 * the inner div without any JS height calculations.
 */
.mmw-submenu {
    display: grid;
    grid-template-rows: 0fr;          /* collapsed by default */
    transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Keep display:grid even when [hidden] so the transition works */
.mmw-submenu[hidden] {
    display: grid !important;
    visibility: hidden;
}

.mmw-item.is-open > .mmw-submenu {
    grid-template-rows: 1fr;          /* expanded */
    visibility: visible;
}

/* Inner wrapper must have overflow:hidden and min-height:0 */
.mmw-submenu-inner {
    overflow: hidden;
    min-height: 0;
    background-color: rgba(0, 0, 0, 0.03); /* overridden by control */
}

/* Sub-items */
.mmw-submenu li {
    list-style: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07); /* overridden by control */
}

.mmw-submenu li:last-child {
    border-bottom: none;
}

.mmw-submenu a {
    display: block;
    /* padding overridden by Elementor control */
    padding: 11px 16px 11px 28px;
    text-decoration: none;
    color: #444444;                   /* overridden by control */
    transition: color 0.15s ease, background-color 0.15s ease;
    line-height: 1.3;
}

.mmw-submenu a:hover,
.mmw-submenu a:focus-visible {
    background-color: rgba(0, 0, 0, 0.04);
}

.mmw-submenu a[aria-current="page"] {
    font-weight: 600;
}

.mmw-item.is-current > .mmw-item-row {
    font-weight: 600;
}
