/*
 * Vaja – Helix Ultimate asztali Mega Menu akadálymentesítése
 * Csak az akadálymentesítő modul által feldolgozott desktop menüre hat.
 */

/* A lenyíló menü nyitógombja valódi, fókuszálható gomb. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    margin: 0;
    padding: 0 15px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* Jól látható billentyűzetes fókuszjelölés. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading:focus-visible {
    outline: 3px solid #8b0404;
    outline-offset: 3px;
    box-shadow: 0 0 0 2px #fff;
}

/* Régebbi böngészők fókuszjelölése. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading:focus {
    outline-offset: 4px;
}

/* Lenyíló nyíl. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading::after {
    content: "";
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading[aria-expanded="true"]::after {
    transform: rotate(225deg);
}

/*
 * A Helix saját hover/focus megjelenítését felülbíráljuk.
 * Az almenü csak a JavaScript által beállított nyitott állapotban látszik.
 */
@media (min-width: 992px) {
    .sp-megamenu-parent.sp-accessibility-enhanced
    > li.sp-has-child
    > .sp-dropdown {
        display: none !important;
    }

    .sp-megamenu-parent.sp-accessibility-enhanced
    > li.sp-has-child.accessibility-menu-open
    > .sp-dropdown:not([hidden]) {
        display: block !important;
    }
}

/* A hidden attribútum minden esetben rejtett állapotot jelent. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> .sp-dropdown[hidden] {
    display: none !important;
}

/* Ne jelenjen meg alapértelmezett gomb-háttér hover esetén. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading:hover {
    color: inherit;
    background: transparent;
}

/* Firefox belső gombkeret eltávolítása. */
.sp-megamenu-parent.sp-accessibility-enhanced
> li.sp-has-child
> button.sp-menu-heading::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/* A Helix mobil/offcanvas menüjét nem módosítjuk. */
@media (max-width: 991px) {
    .sp-megamenu-parent.sp-accessibility-enhanced
    > li.sp-has-child
    > button.sp-menu-heading {
        min-height: unset;
    }
}

/* Csökkentett mozgás beállítás tiszteletben tartása. */
@media (prefers-reduced-motion: reduce) {
    .sp-megamenu-parent.sp-accessibility-enhanced
    > li.sp-has-child
    > button.sp-menu-heading::after {
        transition: none;
    }
}


/* Vaja – Helix mobil / offcanvas menü akadálymentesítése (1.0.7). */
@media (max-width: 991px) {
    .offcanvas-menu.vaja-mobile-menu-enhanced .mod-menu__heading {
        appearance: none;
        -webkit-appearance: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
        min-height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: inherit;
        font: inherit;
        line-height: inherit;
        text-align: left;
        cursor: pointer;
    }

    /* A fókuszjelölés kizárólag a gomb 2 px-es bordó kerete. */
    .offcanvas-menu.vaja-mobile-menu-enhanced button.mod-menu__heading:focus,
    .offcanvas-menu.vaja-mobile-menu-enhanced button.mod-menu__heading:focus-visible {
        color:#8b0404;
        box-shadow: none !important;
        background-image: none !important;
        text-decoration: none !important;
        position: relative;
        z-index: 5;
    }

    /* A nyíl saját doboza ne befolyásolja a gomb soron belüli igazítását. */
    .offcanvas-menu.vaja-mobile-menu-enhanced button.mod-menu__heading .menu-toggler {
        display: contents !important;
        position: static !important;
        float: none !important;
        inset: auto !important;
        margin: 0 !important;
        transform: none !important;
        pointer-events: none;
    }

    .offcanvas-menu.vaja-mobile-menu-enhanced .menu-child[hidden] {
        display: none !important;
    }

    .offcanvas-menu.vaja-mobile-menu-enhanced .mod-menu__heading::-moz-focus-inner {
        border: 0;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .offcanvas-menu.vaja-mobile-menu-enhanced .mod-menu__heading,
    .offcanvas-menu.vaja-mobile-menu-enhanced .mod-menu__heading .menu-toggler {
        transition: none !important;
        animation: none !important;
    }
}


/* Helix offcanvas nyitó- és bezáró vezérlői: valódi HTML-gombok. */
#offcanvas-toggler.vaja-offcanvas-toggle-button,
.offcanvas-menu button.close-offcanvas.vaja-offcanvas-close-button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

#offcanvas-toggler.vaja-offcanvas-toggle-button {
    padding: 0;
}

.offcanvas-menu button.close-offcanvas.vaja-offcanvas-close-button {
    padding: 0;
    line-height: 1;
}

/* Látható fókuszjelölés a két vezérlőn. */
#offcanvas-toggler.vaja-offcanvas-toggle-button:focus-visible,
.offcanvas-menu button.close-offcanvas.vaja-offcanvas-close-button:focus-visible {
    outline: 3px solid #8b0404;
    outline-offset: 3px;
}

/* A rejtett Helix-proxyk semmilyen módon ne jelenjenek meg. */
.vaja-helix-click-proxy[hidden] {
    display: none !important;
}
