/* The original trigger remains available to Divi's JavaScript only. */
.trx-tb-header .trx-accessible-menu > .mobile_menu_bar {
    display: none !important;
}

/* Divi also shows this menu above 980px, where the wrapper fills the header. */
.trx-tb-header .et_mobile_nav_menu {
    align-items: center;
}

.trx-tb-header .trx-accessible-menu > .et_mobile_menu {
    top: 100%;
}

.trx-tb-header .trx-mobile-menu-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--trx-accent, #c7f43d);
    cursor: pointer;
    touch-action: manipulation;
}

.trx-tb-header .trx-mobile-menu-toggle::before {
    content: '';
    display: block;
    box-sizing: border-box;
    width: 25px;
    height: 20px;
    border-block: 2px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.trx-tb-header .trx-mobile-menu-toggle:hover {
    background-color: rgba(199, 244, 61, .1);
}

.trx-tb-header .trx-mobile-menu-toggle:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.trx-tb-header .et_mobile_menu a:focus-visible,
.trx-tb-header .et-menu a:focus-visible {
    outline: 2px solid var(--trx-accent, #c7f43d);
    outline-offset: 3px;
}

/* Divi's hover-only dropdowns otherwise skip every child link when tabbing. */
.trx-tb-header .et-menu li:focus-within > ul.sub-menu {
    visibility: visible;
    opacity: 1;
}

/* The mobile copy uses disclosure buttons, with a separate demo destination. */
@media (max-width: 1250px) {
    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy {
        padding: 8px 16px 16px !important;
        height: auto !important;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 18px 36px rgba(0, 0, 0, .3);
    }

    .trx-tb-header .mobile_nav.opened > .trx-mobile-hierarchy { display: block !important; }
    .trx-tb-header .mobile_nav.closed > .trx-mobile-hierarchy { display: none !important; }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy ul.sub-menu[hidden] {
        display: none !important;
    }

    .trx-tb-header .trx-submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        min-height: 52px;
        padding: 12px 14px;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
        background: transparent;
        color: #fff;
        font: inherit;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.4;
        text-align: left;
        cursor: pointer;
        touch-action: manipulation;
    }

    .trx-tb-header .trx-submenu-toggle::after {
        content: '';
        flex: 0 0 8px;
        height: 8px;
        margin-right: 4px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }

    .trx-tb-header .trx-submenu-toggle[aria-expanded="true"] { color: var(--trx-accent, #c7f43d); }
    .trx-tb-header .trx-submenu-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
    .trx-tb-header .trx-submenu-toggle:hover { background: rgba(255,255,255,.06); }
    .trx-tb-header .trx-submenu-toggle:focus-visible { outline: 2px solid var(--trx-accent, #c7f43d); outline-offset: -2px; }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy > li > a {
        font-size: 17px;
        font-weight: 700;
    }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy ul.sub-menu {
        width: auto;
        margin: 4px 0 12px 14px;
        padding: 0 0 0 10px !important;
        border-left: 2px solid rgba(199, 244, 61, .4) !important;
        background: transparent !important;
    }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy ul.sub-menu li > a {
        padding: 12px 10px !important;
        font-size: 15px;
        font-weight: 400;
    }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy .trx-mobile-overview > a {
        color: var(--trx-accent, #c7f43d) !important;
        font-weight: 600;
    }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy > .trx-mobile-demo {
        margin: 16px 0 4px;
        padding: 0;
        border: 1px solid rgba(199, 244, 61, .45);
        border-radius: 8px;
        background: rgba(199, 244, 61, .045);
    }

    body .trx-tb-header .trx-tb-menu.et_pb_menu .trx-mobile-hierarchy > .trx-mobile-demo > a {
        display: block;
        padding: 14px !important;
        border: 0;
        border-radius: 8px;
        color: #fff !important;
    }

    .trx-tb-header .trx-demo-caption {
        display: block;
        margin-top: 3px;
        color: var(--trx-accent, #c7f43d);
        font-size: 14px;
        font-weight: 500;
    }

    /* Centre the language label within the existing 48px touch target. */
    body .trx-tb-header .trx-tb-menu.et_pb_menu .et_mobile_menu li.trp-menu-ls-item > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .trx-tb-header .trx-mobile-menu-toggle[aria-expanded="true"]::before {
        width: 25px;
        height: 25px;
        border: 0;
        background: linear-gradient(45deg, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%),
            linear-gradient(-45deg, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%);
    }
}
