/* Shared navigation for the public portal and native public pages. */
html body.wm-public-v2 .wm-header.wm-public-header {
    --wm-header-ink: #10364d;
    --wm-header-teal: #126e7f;
    --wm-header-teal-hover: #0d5464;
    --wm-header-orange: #a7440c;
    --wm-header-action: #b64e2e;
    --wm-header-action-hover: #9e4125;
    --wm-header-line: #bad9ea;
    background: #fdfeff !important;
    border-bottom: 0;
    box-shadow: inset 0 -1px 0 var(--wm-header-line);
    color: var(--wm-header-ink);
}

html body.wm-public-v2 .wm-header.wm-public-header :is(
    .wm-mega-main, .wm-mega-main span, .wm-mega-disclosure > summary,
    .wm-guest-business, .wm-guest-business span, .wm-guest-login > a,
    .wm-guest-login > a > span
) {
    color: var(--wm-header-ink) !important;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > .wm-logo {
    font-size: 34px;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-logo,
html body.wm-public-v2 .wm-header.wm-public-header .wm-logo span {
    color: #104e5c !important;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-logo .wm-logo-dot {
    font-size: 1.1em;
    line-height: 0;
    color: var(--wm-header-orange) !important;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-logo .wm-logo-tagline {
    font-size: .425em;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-mobile-country-flag {
    display: none;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav :is(
    .wm-mega-group:is(:hover, :focus-within) > .wm-mega-main,
    .wm-mega-group:is(:hover, :focus-within) > .wm-mega-main > span,
    .wm-guest-business:is(:hover, :focus-visible),
    .wm-guest-login > a:is(:hover, :focus-visible)
) {
    color: var(--wm-header-orange) !important;
}

/* Give each top-level destination the same icon color on desktop and mobile. */
.wm-public-header [data-wm-nav-item="companies"] {
    --wm-nav-icon: var(--wm-header-orange);
}

.wm-public-header [data-wm-nav-item="recipes"] {
    --wm-nav-icon: #a4375d;
}

.wm-public-header [data-wm-nav-item="life"] {
    --wm-nav-icon: #367044;
}

.wm-public-header [data-wm-nav-item="news"] {
    --wm-nav-icon: #285eb2;
}

.wm-public-header [data-wm-nav-item="business"] {
    --wm-nav-icon: #70459c;
}

.wm-public-header [data-wm-nav-item="add-company"] {
    --wm-nav-icon: #ffe29a;
}

html body.wm-public-v2 .wm-header.wm-public-header [data-wm-nav-item] > svg:first-child {
    color: var(--wm-nav-icon, currentColor) !important;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-guest-login > .wm-login-link::before {
    background-color: #486475;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-compact-menu > summary {
    border-radius: 12px;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav :is(.wm-guest-business, .wm-guest-login > a):hover {
    background: #edf7fb;
}

html body.wm-public-v2 .wm-header.wm-public-header :is(
    .wm-compact-menu > summary, .wm-mobile-signin > a, .wm-mobile-account-entry > summary,
    .wm-guest-company, .wm-guest-login > a, .wm-guest-business, .wm-mega-disclosure > summary
):focus-visible {
    outline: 2px solid var(--wm-header-teal);
    outline-offset: 3px;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-guest-login > a {
    border: 1px solid #9bbdc7;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-guest-login > a:is(:hover, :focus-visible) {
    border-color: var(--wm-header-teal);
}

html body.wm-public-v2 .wm-header.wm-public-header :is(.wm-guest-company, .wm-compact-menu > summary) {
    background-color: var(--wm-header-action) !important;
    border-color: var(--wm-header-action) !important;
    color: #fff !important;
}

html body.wm-public-v2 .wm-header.wm-public-header :is(
    .wm-guest-company:is(:hover, :focus-visible), .wm-compact-menu > summary:is(:hover, :focus-visible),
    .wm-compact-menu[open] > summary
) {
    background-color: var(--wm-header-action-hover) !important;
    border-color: var(--wm-header-action-hover) !important;
}

html body.wm-public-v2 .wm-header.wm-public-header :is(
    .wm-mobile-signin > a, .wm-mobile-account-entry > summary
) {
    background-color: var(--wm-header-teal) !important;
    border-color: var(--wm-header-teal) !important;
    color: #fff !important;
}

html body.wm-public-v2 .wm-header.wm-public-header .wm-guest-company > span {
    color: inherit !important;
}

html body.wm-public-v2 .wm-header.wm-public-header :is(
    .wm-mobile-signin > a, .wm-mobile-account-entry > summary
):is(:hover, :focus-visible) {
    background-color: var(--wm-header-teal-hover) !important;
    border-color: var(--wm-header-teal-hover) !important;
}

@media (min-width: 1281px) {
    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner {
        width: 100%;
        max-width: 1380px;
        padding-inline: 30px;
    }

    /* Center the two lines in the existing logo slot. */
    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > .wm-logo {
        box-sizing: border-box;
        block-size: 58.5px;
        justify-content: center;
        gap: 4px;
        font-size: 44px;
        translate: 0 -5.5px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-logo-wordmark {
        line-height: 32px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-logo .wm-logo-tagline {
        font-size: 19.5px;
        line-height: 19px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav > .wm-mega-group > .wm-mega-main {
        font-size: 16px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav > .wm-guest-login {
        display: flex;
        align-items: stretch;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav > .wm-guest-login > a {
        border-color: transparent;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav :is(.wm-guest-business, .wm-guest-login > a, .wm-guest-company) {
        font-size: 15px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav :is(.wm-guest-login > a, .wm-guest-company) {
        padding-inline: 14px;
    }
}

@media (max-width: 1280px) {
    html body.wm-public-v2 .wm-header.wm-public-header .wm-mobile-navigation-list :is(.wm-mobile-navigation-link, .wm-guest-company) {
        font-size: 17px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-mobile-navigation-list :is(.wm-guest-business, .wm-guest-login > a) {
        font-size: 18px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-mobile-navigation-list .wm-guest-login > a {
        border-color: transparent;
    }
}

@media (max-width: 750px) {
    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > .wm-logo {
        gap: 4px;
        letter-spacing: -1.7px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-logo .wm-logo-tagline-mobile {
        line-height: 1.25;
    }
}

/* Use the same navigation width and spacing across the public site. */
html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner {
    width: 100%;
    max-width: 1300px;
    padding-inline: 30px;
}

@media (min-width: 1281px) {
    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav > .wm-mega-group > .wm-mega-main {
        font-size: 15px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner > nav > .wm-guest-business[data-wm-nav-item="business"] {
        font-size: 14px;
    }
}

@media (max-width: 1280px) {
    html body.wm-public-v2 .wm-header.wm-public-header.wm-header-guest .wm-header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 1100px) {
    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner {
        padding-inline: 20px;
    }
}

@media (max-width: 750px) {
    html body.wm-public-v2 .wm-header.wm-public-header.wm-header-guest:not([data-wm-mobile-drawer]) .wm-header-inner {
        padding-block-start: 14px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header.wm-header-guest:not([data-wm-mobile-drawer]):not(:has(.wm-compact-menu[open])) .wm-header-inner {
        padding-block-end: 0;
    }
}

@media (max-width: 600px) {
    html body.wm-public-v2 .wm-header.wm-public-header .wm-header-inner {
        padding-inline: 12px;
    }
}

/* On phones the menu slides in below the existing header row. */
.wm-mobile-drawer-backdrop,
.wm-mobile-top-company,
.wm-phone-menu-list {
    display: none;
}

@media screen and (max-width: 750px) {
    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] {
        --wm-drawer-ink: #133b43;
        --wm-drawer-surface: #123e46;
        --wm-drawer-light: #e4f3f4;
        --wm-drawer-open: #10343b;
        --wm-drawer-accent: #b9dce4;
        --wm-drawer-line: #b9dce43d;
        background: #fff !important;
        color: var(--wm-header-ink);
        box-shadow: inset 0 -1px 0 var(--wm-header-line);
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-header-inner {
        min-height: 72px;
        padding: 10px 12px;
        align-items: center;
        grid-template-columns: minmax(0,1fr) auto 44px;
        column-gap: 8px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-header-inner > .wm-logo {
        font-size: 32px;
        gap: 2px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-logo .wm-logo-tagline-mobile {
        font-size: var(--wm-mobile-tagline-size, 14px);
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-mobile-top-company {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 10px;
        border-radius: 9px;
        background: var(--wm-header-action);
        color: #fff !important;
        font: 750 13px/1.2 Inter, system-ui, sans-serif;
        text-decoration: none;
        white-space: nowrap;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-compact-menu {
        grid-column: 3;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-compact-menu > summary {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        height: 44px;
        padding: 0;
        gap: 0;
        border: 1px solid #126e7f !important;
        border-radius: 9px;
        background: #fff !important;
        color: #126e7f !important;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-compact-menu > summary svg {
        width: 22px;
        height: 22px;
        color: #126e7f !important;
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-compact-menu > summary .wm-menu-cross,
    .wm-public-header[data-wm-mobile-drawer] .wm-compact-menu[open] > summary .wm-menu-bars {
        display: none;
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-compact-menu[open] > summary .wm-menu-cross {
        display: block;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer]:has(.wm-compact-menu[open]) {
        position: relative;
        inset: auto;
        height: auto;
        overflow: visible;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer]:has(.wm-compact-menu[open]) .wm-header-inner {
        padding-block-end: 10px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer]:has(.wm-compact-menu[open]) .wm-header-inner > .wm-mobile-header-actions {
        display: grid;
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-compact-menu[open] .wm-mobile-drawer-backdrop {
        position: fixed;
        z-index: 1;
        display: block;
        inset: var(--wm-mobile-panel-top, 72px) 0 0;
        background: #081b24ad;
        backdrop-filter: blur(4px);
        touch-action: none;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-compact-menu > nav.wm-mobile-navigation-panel {
        position: fixed;
        z-index: 2;
        inset: var(--wm-mobile-panel-top, 72px) 0 auto;
        display: block;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - var(--wm-mobile-panel-top, 72px));
        padding: 14px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
        color: #fff;
        background: var(--wm-drawer-surface) !important;
        box-shadow: 0 12px 25px #09242a38;
        clip-path: none;
        scrollbar-color: #8aacb1 var(--wm-drawer-surface);
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-compact-menu[open] > .wm-mobile-navigation-panel {
        animation: wm-mobile-drawer-enter 220ms ease-out both;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-mobile-navigation-panel > h2,
    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-fallback {
        display: none;
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-list {
        display: grid;
        gap: 3px;
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-group {
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: transparent;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-entry {
        --wm-nav-icon: var(--wm-drawer-accent);
        display: grid;
        grid-template-columns: 18px minmax(0,1fr) 16px;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 8px 12px;
        border: 0;
        border-radius: 10px;
        color: #fff !important;
        background: transparent;
        font: 750 17px/1.3 Inter, system-ui, sans-serif;
        text-decoration: none;
        list-style: none;
        cursor: pointer;
    }

    .wm-phone-menu-entry::-webkit-details-marker { display: none; }
    .wm-phone-menu-entry > svg { width: 16px; height: 16px; color: var(--wm-nav-icon); }
    .wm-phone-menu-group > summary > svg:last-child { rotate: 90deg; }
    .wm-phone-menu-group[open] > summary > svg:last-child { rotate: -90deg; }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-group:not([open]) > .wm-phone-menu-entry.is-primary {
        --wm-nav-icon: var(--wm-header-teal);
        background: var(--wm-drawer-light);
        color: var(--wm-drawer-ink) !important;
    }

    .wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-group[open] {
        background: var(--wm-drawer-open);
        box-shadow: inset 0 0 0 1px var(--wm-drawer-line);
    }

    .wm-phone-menu-section { padding: 0 12px 8px; color: #fff; }
    .wm-phone-menu-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wm-drawer-line); }
    .wm-phone-menu-links li + li { border-top: 1px solid var(--wm-drawer-line); }
    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-links a {
        display: grid;
        grid-template-columns: 18px minmax(0,1fr);
        align-items: center;
        gap: 10px;
        min-height: 40px;
        padding: 7px 0;
        color: #fff !important;
        font-size: 14px;
        text-decoration: none;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    .wm-phone-menu-links a::before {
        content: "";
        justify-self: center;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--wm-drawer-accent);
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-links a:is(:hover, :focus-visible) {
        text-decoration: underline;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-section .wm-search {
        display: grid;
        grid-template-columns: minmax(0,1fr);
        gap: 8px;
        margin: 0 0 10px;
        padding: 10px 0 0;
        border: 0;
        border-top: 1px solid var(--wm-drawer-line);
        background: transparent;
        box-shadow: none;
    }

    .wm-phone-menu-section .wm-home-finder-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-section .wm-search input[type="search"] {
        width: 100%;
        min-width: 0;
        height: 44px;
        padding: 0 11px;
        border: 1px solid #aacbd9;
        border-radius: 8px;
        background: var(--wm-drawer-surface);
        color: #fff !important;
        color-scheme: dark;
        font-size: 16px;
    }

    .wm-phone-menu-section .wm-search input[type="search"]::placeholder {
        color: var(--wm-drawer-accent);
        opacity: 1;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-section .wm-suggestions {
        position: static;
        max-height: min(36dvh, 220px);
        margin-top: 5px;
        border-color: var(--wm-drawer-line);
        background: var(--wm-drawer-open);
        color: #fff;
    }

    .wm-phone-menu-section .wm-suggestions li:is(:hover, [aria-selected="true"]) {
        background: #21535d;
    }

    .wm-phone-menu-section .wm-suggestions li > span { color: var(--wm-drawer-accent); }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-section .wm-search > .wm-button {
        width: 100%;
        justify-content: center;
        grid-column: 1;
        min-height: 44px;
        margin: 0;
        background: var(--wm-header-action) !important;
        border-color: var(--wm-header-action);
        color: #fff !important;
    }

    .wm-phone-menu-section .wm-finder-status { color: var(--wm-drawer-accent); }
    .wm-phone-menu-section .wm-finder-status:empty { display: none; }

    .wm-phone-menu-actions {
        display: grid;
        grid-template-columns: minmax(0,1fr) auto;
        align-items: center;
        gap: 12px;
        margin-top: 10px;
        padding-top: 14px;
        border-top: 1px solid #a9c8ce;
    }

    .wm-phone-menu-actions > p {
        display: grid;
        gap: 3px;
        margin: 0;
        color: var(--wm-drawer-accent);
        font: 400 13px/1.3 Inter, system-ui, sans-serif;
    }

    .wm-phone-menu-actions > p > strong { color: #fff; font-weight: 650; }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-actions > a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        margin: 0;
        padding: 8px 15px;
        border: 1px solid transparent !important;
        border-radius: 9px;
        background: transparent !important;
        color: #fff !important;
        font: 750 14px/1.3 Inter, system-ui, sans-serif;
        text-decoration: none;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-phone-menu-actions > .wm-login-link::before {
        background-color: var(--wm-drawer-accent);
    }

    .wm-public-header[data-wm-mobile-drawer] :is(.wm-mobile-top-company, .wm-phone-menu-list a, .wm-phone-menu-entry, .wm-phone-menu-list button):focus-visible {
        outline: 2px solid #ffcfaa;
        outline-offset: 2px;
    }
}

@media screen and (max-width: 359px) {
    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-header-inner > .wm-logo {
        font-size: 29px;
    }

    html body.wm-public-v2 .wm-header.wm-public-header[data-wm-mobile-drawer] .wm-mobile-top-company {
        padding-inline: 7px;
        font-size: 12px;
    }
}

@keyframes wm-mobile-drawer-enter {
    from { translate: 100% 0; }
    to { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .wm-public-header[data-wm-mobile-drawer] .wm-compact-menu[open] > .wm-mobile-navigation-panel {
        animation: none;
    }
}
