/* Scheme A: the public-site mobile drawer. Desktop navigation stays unchanged. */
@media (max-width: 991px) {
    #m-header #miniMenuToggle.mobile-drawer-scheme-a {
        display: none !important;
        position: fixed;
        z-index: 1035;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        float: none;
        flex-direction: column;
        width: 86vw;
        min-width: 0;
        max-width: 360px;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        margin: 0;
        padding: 0;
        overflow: hidden;
        color: #2f3950;
        background: #fff;
        border: 0;
        border-radius: 0;
        box-shadow: -12px 0 44px rgba(25, 39, 52, .13);
        font-size: 15px;
        line-height: 1.5;
        text-align: left;
        white-space: normal;
        -webkit-text-size-adjust: 100%;
    }

    #m-header #miniMenuToggle.mobile-drawer-scheme-a.is-open {
        display: flex !important;
    }

    #m-header #miniMenuToggle.mobile-drawer-scheme-a *,
    #m-header #miniMenuToggle.mobile-drawer-scheme-a *::before,
    #m-header #miniMenuToggle.mobile-drawer-scheme-a *::after {
        box-sizing: border-box;
    }

    #m-header #miniMenuToggle.mobile-drawer-scheme-a [hidden],
    #mobileDrawerBackdrop.mobile-drawer-backdrop[hidden] {
        display: none !important;
    }

    #mobileDrawerBackdrop.mobile-drawer-backdrop {
        position: fixed;
        z-index: 1034;
        inset: 0;
        background: rgba(24, 34, 45, .38);
        -webkit-tap-highlight-color: transparent;
    }

    body.mobile-drawer-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-header {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
        padding: 14px 14px 14px 20px;
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
        border-bottom: 1px solid #edf0f3;
    }

    #m-header #miniMenuToggle .mobile-drawer-header > a {
        display: flex;
        align-items: center;
        min-width: 0;
        padding: 0;
    }

    #m-header #miniMenuToggle .mobile-drawer-header img {
        display: block;
        width: 126px;
        max-width: 100%;
        height: auto;
        margin: 0;
    }

    #m-header #miniMenuToggle button {
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    #m-header #miniMenuToggle .mobile-drawer-close {
        display: flex;
        flex: 0 0 44px;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0 0 0 10px;
        padding: 10px;
        color: #667183;
        background: transparent;
        border: 0;
        border-radius: 10px;
        font-size: 24px;
        line-height: 1;
    }

    #m-header #miniMenuToggle .mobile-drawer-close img,
    #m-header #miniMenuToggle .mobile-drawer-close svg {
        width: 20px;
        height: 20px;
    }

    #m-header #miniMenuToggle .mobile-drawer-scroll {
        flex: 1 1 auto;
        min-height: 0;
        padding: 18px 16px 88px;
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    #m-header #miniMenuToggle [data-mobile-menu-page] {
        width: 100%;
        min-width: 0;
    }

    #m-header #miniMenuToggle .mobile-drawer-profile {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 64px;
        margin: 0 0 16px;
        padding: 10px 14px;
        color: #2f3950;
        background: #f8fafb;
        border: 1px solid #e7edf0;
        border-radius: 12px;
        text-align: left;
        text-decoration: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-profile .avatar-group {
        position: relative;
        display: block;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        margin: 0 12px 0 0;
    }

    #m-header #miniMenuToggle .mobile-drawer-profile .avatar-group > img:first-child {
        display: block;
        width: 40px !important;
        height: 40px !important;
        margin: 0;
        border-radius: 50%;
        object-fit: cover;
    }

    #m-header #miniMenuToggle .mobile-drawer-profile .avatar-group .user-icon {
        position: absolute;
        right: -2px;
        bottom: -2px;
        width: 14px;
        height: 14px;
        margin: 0;
    }

    #m-header #miniMenuToggle .mobile-drawer-profile .avatar-group .user-icon img {
        display: block;
        width: 14px;
        height: 14px;
    }

    #m-header #miniMenuToggle .mobile-drawer-name {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        font-size: 16px;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #m-header #miniMenuToggle .mobile-drawer-chevron {
        display: inline-flex;
        flex: 0 0 18px;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 20px;
        margin-left: 10px;
        color: #8791a0;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation,
    #m-header #miniMenuToggle .mobile-drawer-account-list {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li,
    #m-header #miniMenuToggle .mobile-drawer-account-list > li {
        margin: 0 0 3px;
        padding: 0;
        list-style: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li > .mobile-drawer-nav-link,
    #m-header #miniMenuToggle .mobile-drawer-account-list > li > a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 12px !important;
        color: #354157 !important;
        background: transparent !important;
        border: 0;
        border-radius: 9px;
        font-size: 15px;
        font-weight: 500;
        line-height: 24px;
        text-decoration: none;
        white-space: normal;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    #m-header #miniMenuToggle .mobile-drawer-nav-link > .fa {
        flex: 0 0 20px;
        width: 20px;
        margin: 0 12px 0 0;
        color: #748192;
        font-size: 18px;
        text-align: center;
    }

    #m-header #miniMenuToggle .mobile-drawer-nav-link > .fa.pull-right,
    #m-header #miniMenuToggle .mobile-drawer-nav-link > .fa-angle-down,
    #m-header #miniMenuToggle .mobile-drawer-nav-link > .fa-angle-up {
        float: none !important;
        margin-right: 0;
        margin-left: auto;
        font-size: 16px;
    }

    #m-header #miniMenuToggle .mobile-drawer-nav-link > .m-menu-span,
    #m-header #miniMenuToggle .mobile-drawer-account-list .m-menu-span {
        min-width: 0;
        margin: 0;
        color: inherit;
        overflow-wrap: break-word;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li.active > a {
        color: #149879 !important;
        background: #edf8f4 !important;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li.active > a .fa {
        color: inherit;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li.mobile-drawer-publish {
        margin-top: 5px;
        margin-bottom: 10px;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li.mobile-drawer-publish > a {
        color: #fff !important;
        background: #1ab394 !important;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li.mobile-drawer-publish > a .fa {
        color: inherit;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation .panel-collapse {
        margin: 3px 0 6px 32px;
        padding: 0;
        background: transparent;
        list-style: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation .panel-collapse > li {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation .panel-collapse > li > a {
        display: block;
        width: 100%;
        min-height: 44px;
        padding: 11px 12px;
        color: #667386;
        border-radius: 8px;
        font-size: 14px;
        line-height: 22px;
        text-decoration: none;
        white-space: normal;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation .panel-collapse img {
        display: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-auth-actions {
        margin-top: 18px;
    }

    /* Login and logout share the unchanged legacy button styles from header.css. */
    #m-header #miniMenuToggle .mobile-drawer-auth-actions > a {
        padding: 15px 12px 15px 15px;
        font-weight: 600;
        line-height: 1.5;
        border-radius: 8px;
        margin-bottom: 15px;
        border: none;
    }

    #m-header #miniMenuToggle .mobile-drawer-auth-actions > a.btn-gray {
        background: #eff2f4;
    }

    #m-header #miniMenuToggle .mobile-drawer-back {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        max-width: 100%;
        margin: -7px 0 12px;
        padding: 8px 8px 8px 0;
        color: #586679;
        background: transparent;
        border: 0;
        border-radius: 8px;
        text-align: left;
    }

    #m-header #miniMenuToggle .mobile-drawer-back .fa,
    #m-header #miniMenuToggle .mobile-drawer-back svg {
        flex: 0 0 20px;
        width: 20px;
        margin-right: 8px;
    }

    #m-header #miniMenuToggle .mobile-drawer-account-list .account-menu-lucide-icon {
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
        margin-right: 12px !important;
        color: #758196;
    }

    #m-header #miniMenuToggle .mobile-drawer-account-list > li.mobile-account-menu-support-start {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #edf0f3;
    }

    #m-header #miniMenuToggle .mobile-drawer-close:hover,
    #m-header #miniMenuToggle .mobile-drawer-close:active,
    #m-header #miniMenuToggle .mobile-drawer-back:hover,
    #m-header #miniMenuToggle .mobile-drawer-navigation > li > a:hover,
    #m-header #miniMenuToggle .mobile-drawer-account-list > li > a:hover,
    #m-header #miniMenuToggle .mobile-drawer-navigation .panel-collapse > li > a:hover {
        background: #f2f6f7 !important;
    }

    #m-header #miniMenuToggle .mobile-drawer-navigation > li.mobile-drawer-publish > a:hover {
        background: #149c80 !important;
    }

    #m-header #miniMenuToggle .mobile-drawer-profile[data-mobile-menu-action]:hover,
    #m-header #miniMenuToggle .mobile-drawer-profile[data-mobile-menu-action]:active {
        background: #f0f7f4;
        border-color: #cfe8df;
    }

    #m-header #miniMenuToggle a:focus-visible,
    #m-header #miniMenuToggle button:focus-visible {
        outline: 2px solid #159b7d;
        outline-offset: -2px;
    }
}
