/* Mobile header drawer */
.custom-mobile-nav-icon {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #111111 !important;
}

.custom-mobile-menu-line {
    position: absolute;
    left: 9px;
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: top 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.custom-mobile-menu-line:nth-child(1) {
    top: 12px;
}

.custom-mobile-menu-line:nth-child(2) {
    top: 18px;
}

.custom-mobile-menu-line:nth-child(3) {
    top: 24px;
}

.custom-mobile-nav-icon.is-open .custom-mobile-menu-line:nth-child(1) {
    top: 18px;
    transform: rotate(45deg);
}

.custom-mobile-nav-icon.is-open .custom-mobile-menu-line:nth-child(2) {
    opacity: 0;
}

.custom-mobile-nav-icon.is-open .custom-mobile-menu-line:nth-child(3) {
    top: 18px;
    transform: rotate(-45deg);
}

@media (max-width: 849px) {
    #masthead .header-inner > .show-for-medium.flex-left,
    .medium-logo-center .header-main .flex-left,
    .medium-logo-center .header-main .flex-center {
        flex: 0 0 auto !important;
        order: 1 !important;
        margin: 0 !important;
    }

    #masthead .header-inner > #logo,
    .medium-logo-center .header-main .logo {
        flex: 0 0 auto !important;
        order: 2 !important;
        margin: 0 0 0 8px !important;
        text-align: left !important;
    }

    #masthead .header-inner > .show-for-medium.flex-right,
    .medium-logo-center .header-main .flex-right {
        flex: 0 0 auto !important;
        order: 3 !important;
        margin-left: auto !important;
    }

    #masthead .header-inner > .show-for-medium.flex-left .mobile-nav.nav-left,
    .medium-logo-center .header-main .mobile-nav.nav-left {
        display: inline-flex !important;
        align-items: center;
        margin: 0 !important;
    }

    body.custom-mobile-drawer-is-open #header,
    body.custom-mobile-drawer-is-open .header,
    body.custom-mobile-drawer-is-open .header-wrapper,
    body.custom-mobile-drawer-is-open .header-wrapper.stuck {
        position: relative !important;
        z-index: 2147483647 !important;
    }

    .mfp-bg.main-menu-overlay,
    body.custom-mobile-drawer-is-open .mfp-bg.main-menu-overlay {
        display: none !important;
    }

    body.custom-mobile-drawer-is-open .mfp-wrap.off-canvas-left {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        transform: none !important;
        background: transparent !important;
        pointer-events: none;
    }

    .mfp-bg.main-menu-overlay,
    .mfp-wrap.off-canvas-left,
    .mfp-wrap.off-canvas-left .mfp-container,
    body.custom-mobile-drawer-is-open .mfp-bg,
    body.custom-mobile-drawer-is-open .mfp-wrap,
    body .mfp-wrap:has(#main-menu.custom-mobile-drawer),
    .main-menu-overlay,
    .main-menu-overlay + .mfp-wrap {
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: none !important;
    }

    .mfp-wrap.off-canvas-left .mfp-content,
    body.custom-mobile-drawer-is-open .mfp-container,
    body.custom-mobile-drawer-is-open .mfp-content,
    body .mfp-wrap:has(#main-menu.custom-mobile-drawer) .mfp-container,
    body .mfp-wrap:has(#main-menu.custom-mobile-drawer) .mfp-content,
    .main-menu-overlay + .mfp-wrap .mfp-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        transform: none !important;
        pointer-events: none;
    }

    .mfp-wrap.off-canvas-left .mfp-close,
    body.custom-mobile-drawer-is-open .mfp-close,
    body .mfp-wrap:has(#main-menu.custom-mobile-drawer) .mfp-close,
    .main-menu-overlay + .mfp-wrap .mfp-close {
        display: none !important;
    }

    #main-menu.custom-mobile-drawer {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        padding: 0;
        background: transparent;
        color: #111111;
        box-shadow: none;
        pointer-events: none;
    }

    .custom-mobile-drawer-surface {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 2147483646;
        width: 100% !important;
        height: auto !important;
        background: #ffffff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto;
    }

    .custom-mobile-drawer-inner {
        width: 100%;
        min-height: 100%;
        background: #ffffff;
    }

    .custom-mobile-drawer-panel {
        display: none;
        flex-direction: column;
        padding: 0;
    }

    .custom-mobile-drawer-panel.is-active {
        display: flex;
    }

    .custom-mobile-drawer-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 0 14px;
        border: 0;
        border-bottom: 1px solid #eeeeee;
        background: transparent;
        color: #222222 !important;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.2;
        letter-spacing: 0;
        text-align: left;
        text-decoration: none !important;
        text-transform: none;
        cursor: pointer;
    }

    .custom-mobile-drawer-label {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        min-width: 0;
    }

    .custom-mobile-drawer-arrow {
        width: 7px;
        height: 12px;
        color: #111111;
        flex: 0 0 auto;
    }

    .custom-mobile-drawer-arrow-back {
        transform: rotate(180deg);
    }

    .custom-mobile-drawer-back {
        justify-content: flex-start;
        gap: 6px;
        color: #7e8583 !important;
    }
}
