/* The browser uses a site header; the installed app uses its existing tab bar. */
.wc-web-publish,
.wc-web-mobile-links { display: none; }

@media (max-width: 991.98px) {
    body.wc-theme:not(.wc-native-app, .wc-admin-theme, .wc-business-theme) {
        --wc-mobile-nav-h: 0px;
        --wc-mobile-menu-bottom-reserve: env(safe-area-inset-bottom, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    body.wc-theme:not(.wc-native-app) .mobile-app-nav {
        display: none !important;
    }

    body.wc-theme:not(.wc-native-app, .wc-admin-theme, .wc-business-theme, .page-messages, .page-blocked-users, .page-create-listing, .offline-page) > .site-footer {
        display: block;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-desktop-header-inner:has(.wc-web-publish) {
        display: grid;
        direction: rtl;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
        gap: 0 8px;
        padding-inline: 12px;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-desktop-header-inner:has(.wc-web-publish) > .navbar-brand {
        position: static;
        grid-area: 1 / 2;
        justify-self: start;
        inset: auto;
        margin: 0;
        transform: none;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-desktop-header-inner:has(.wc-web-publish) > .navbar-toggler {
        grid-area: 1 / 1;
        min-width: 44px;
        min-height: 44px;
        margin: 0;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-desktop-header-inner:has(.wc-web-publish) > .nav-actions {
        display: none !important;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-web-publish {
        display: inline-flex;
        grid-area: 1 / 3;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        width: max-content;
        min-width: max-content;
        padding-inline: 14px;
        border-radius: 9px;
        background: #006785;
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    /* The shared logo masthead also serves the native layout, which uses
       fixed-width icon columns. Web pages need room for the publish label. */
    html body.wc-theme.wc-logo-header:not(.wc-native-app) > .wc-desktop-header > .wc-desktop-header-inner:has(> .wc-web-publish) {
        grid-template-columns: minmax(44px, 108px) minmax(0, 1fr) max-content !important;
    }

    html body.wc-theme.wc-logo-header:not(.wc-native-app) > .wc-desktop-header > .wc-desktop-header-inner:has(> .wc-web-publish) > .navbar-toggler {
        grid-area: 1 / 1 !important;
        justify-self: start;
    }

    html body.wc-theme.wc-logo-header:not(.wc-native-app) > .wc-desktop-header > .wc-desktop-header-inner:has(> .wc-web-publish):has(> .native-back, > .native-page-bar > .native-back) {
        grid-template-columns: 44px 44px minmax(0, 1fr) max-content !important;
    }

    html body.wc-theme.wc-logo-header:not(.wc-native-app) > .wc-desktop-header > .wc-desktop-header-inner:has(> .wc-web-publish):has(> .native-back, > .native-page-bar > .native-back) > .navbar-toggler {
        grid-area: 1 / 2 !important;
    }

    html body.wc-theme.wc-logo-header:not(.wc-native-app) > .wc-desktop-header > .wc-desktop-header-inner:has(> .wc-web-publish):has(> .native-back, > .native-page-bar > .native-back) > .navbar-brand {
        grid-area: 1 / 3 !important;
    }

    html body.wc-theme.wc-logo-header:not(.wc-native-app) > .wc-desktop-header > .wc-desktop-header-inner:has(> .native-back, > .native-page-bar > .native-back) > .wc-web-publish {
        grid-area: 1 / 4;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-desktop-header-inner:has(> .wc-web-publish) > #mainNav {
        grid-column: 1 / -1;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-web-mobile-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
        padding: 8px 0;
        border-bottom: 1px solid #dfe8eb;
    }

    .wc-web-mobile-links a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding-inline: 10px;
        color: #164758;
        font-weight: 600;
        text-decoration: none;
    }

    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-web-publish ~ .wc-web-publish,
    body.wc-theme:not(.wc-native-app) .wc-desktop-header .wc-web-mobile-links ~ .wc-web-mobile-links { display: none; }

    body.wc-theme:not(.wc-native-app) .category-results-toolbar .view-toggle a {
        flex: 0 0 auto;
        width: auto !important;
        min-width: max-content !important;
        min-height: 44px;
        padding-inline: 10px;
        gap: 5px;
        white-space: nowrap;
    }

    .wc-web-publish:focus-visible,
    .wc-web-mobile-links a:focus-visible {
        outline: 2px solid #087da8;
        outline-offset: 2px;
    }

    body.wc-theme:not(.wc-native-app).page-home .hero .hero-inner {
        padding-block: 28px 24px;
    }
}

@media (max-width: 991.98px) {
    .wc-desktop-header-inner:has(> .nav-auth-mobile) .wc-web-member-link,
    .wc-desktop-header-inner:not(:has(> .nav-auth-mobile)) .wc-web-guest-link {
        display: none;
    }
}

/* Keep consent available after the app keyboard closes. */
.wc-native-keyboard body.wc-native-app #cookieBanner {
    display: none !important;
}
