/* Use the same dimensions, colors and touch targets as the app's member navigation. */
:root {
    --nw-secondary-nav-height: calc(64px + env(safe-area-inset-bottom, 0px));
}

.nw-secondary-nav-space {
    display: block;
    box-sizing: border-box;
    height: var(--nw-secondary-nav-height);
    min-height: var(--nw-secondary-nav-height);
    flex: none;
    clear: both;
    pointer-events: none;
}

nav.nw-secondary-nav {
    position: fixed;
    z-index: 70;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 96px));
    justify-content: center;
    gap: 2px;
    box-sizing: border-box;
    height: var(--nw-secondary-nav-height);
    margin: 0;
    padding: 4px max(6px, env(safe-area-inset-right, 0px))
        calc(4px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    border: 0;
    border-top: 1px solid #ffffff0c;
    background: #0d0b10;
    color: #a99eaa;
    font: 650 10px/1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.nw-secondary-nav > a:any-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
    min-height: 52px;
    gap: 3px;
    margin: 0;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
}

.nw-secondary-nav > a > svg {
    flex: none;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.nw-secondary-nav > a > small {
    font: inherit;
    font-size: clamp(9px, 2.6vw, 10px);
    white-space: nowrap;
}

.nw-secondary-nav > a[aria-current],
.nw-secondary-nav > a:hover {
    color: #f4ccd6;
}

.nw-secondary-nav > a[aria-current]::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(50% - 9px);
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: #9b2847;
}

.nw-secondary-nav > a:focus-visible {
    outline: 2px solid #f4ccd6;
    outline-offset: -3px;
}

@media (max-width: 920px), (max-width: 1100px) and (max-height: 500px) and (orientation: landscape) {
    nav.nw-secondary-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Modal dialogs stay above navigation. The consent banner remains independently scrollable. */
html:has(.nw-secondary-nav) { scroll-padding-bottom: var(--nw-secondary-nav-height); }
body:has(.nw-secondary-nav) .nwe-cookie {
    bottom: calc(var(--nw-secondary-nav-height) + 8px);
    max-height: calc(100vh - var(--nw-secondary-nav-height) - 16px);
    max-height: calc(100dvh - var(--nw-secondary-nav-height) - 16px - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
}
body:has(.nw-secondary-nav) .nwpub-toast { bottom: calc(var(--nw-secondary-nav-height) + 12px); }
body.nightwall-city-map-page:has(.nw-secondary-nav) .nwm.is-expanded {
    bottom: calc(var(--nw-secondary-nav-height) + 8px);
}
body:has(.nw-secondary-nav) .wc-block-cart__submit-container--sticky { bottom: var(--nw-secondary-nav-height); }

/* Messaging owns the visual viewport. Flow the bar immediately after the chat
   rather than pinning it underneath an open software keyboard. */
body.nwc-page:has(.nw-secondary-nav) > .nwc-app {
    top: 0;
    margin-top: var(--nwc-visual-offset, 0px);
    height: calc(var(--nwc-visual-height, 100vh) - var(--nw-secondary-nav-height));
    height: calc(var(--nwc-visual-height, 100dvh) - var(--nw-secondary-nav-height));
}
body.nwc-page .nw-secondary-nav-space { display: none; }
body.nwc-page nav.nw-secondary-nav { position: relative; inset: auto; }

@media (forced-colors: active) {
    .nw-secondary-nav > a[aria-current]::before { background: LinkText; forced-color-adjust: none; }
    .nw-secondary-nav > a:focus-visible { outline-color: Highlight; }
}

@media print {
    nav.nw-secondary-nav, .nw-secondary-nav-space { display: none; }
}
