
/* MOBILDA V4 — MOBILE HEADER V2 */

.mobile-account-actions {
    display: none;
}

@media (max-width: 640px) {

    header.top .nav {
        display: none !important;
    }

    header.top .top-in,
    header.top.is-compact .top-in {
        display: grid;
        grid-template-columns: minmax(0,1fr) auto;
        grid-template-areas: "logo right";
        grid-template-rows: auto;
        align-items: center;
        gap: 8px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
    }

    header.top .top-right {
        grid-area: right;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    header.top .top-right > a {
        display: none !important;
    }

    header.top .logo {
        grid-area: logo;
        align-self: center;
    }

    header.top .logo img {
        width: auto;
        height: 30px;
        max-width: 155px;
        display: block;
    }

    header.top .themebtn,
    header.top.is-compact .themebtn {
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    nav.tabbar .mobile-account-actions {
        display: flex;
        flex-direction: column;
        border-top: 1px solid var(--tab-border);
        margin-top: 5px;
        padding-top: 5px;
        gap: 2px;
    }

    nav.tabbar .moremenu a,
    nav.tabbar .mobile-menu-logout button {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        min-height: 44px;
        padding: 10px 12px;
        white-space: normal;
        text-align: left;
        font-size: 14px;
        box-sizing: border-box;
    }

    nav.tabbar .mobile-menu-logout {
        width: 100%;
        margin: 0;
    }

    nav.tabbar .mobile-menu-logout button {
        width: 100%;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: var(--tab-active);
        font-family: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    nav.tabbar .mobile-menu-logout button:focus-visible {
        outline: 2px solid var(--tab-active);
        outline-offset: -2px;
    }

    nav.tabbar .moremenu {
        max-height: 65vh;
        max-height: 65dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* MOBILDA DESKTOP LOGOUT ALIGNMENT V3 */
@media (min-width: 641px) {
    header.top .nav {
        align-items: center;
    }

    header.top .nav > .nav-logout {
        display: inline-flex;
        align-items: center;
        align-self: center;
        margin: 0;
        padding: 0;
    }

    header.top .nav > a,
    header.top .nav > .nav-logout > button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-height: 44px;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 1.2;
        font-size: inherit;
        vertical-align: middle;
        margin: 0;
    }

    header.top.is-compact .nav > a,
    header.top.is-compact .nav > .nav-logout > button {
        min-height: 36px;
        padding-top: 0;
        padding-bottom: 0;
    }
}
