/* Safari-only overrides.
   Loaded after the main stylesheet and gated by html.browser-safari
   from client-diagnostics.js. Shared CSS stays unchanged for other browsers. */

/* iOS Safari: dvh is missing before 15.4, and 100vh includes the area
   behind the collapsing toolbar, so the open menu can run under the chrome.
   -webkit-fill-available tracks the visible viewport; newer Safari uses dvh. */
html.browser-safari .pi-header__nav.is-open {
    max-height: calc(-webkit-fill-available - 96px);
    max-height: min(78dvh, calc(100dvh - 96px));
}

/* Momentum scrolling on the menu list. Other browsers ignore this property. */
html.browser-safari .pi-header__nav.is-open .pi-header__nav-list {
    -webkit-overflow-scrolling: touch;
}

/* iOS paints native button chrome and a grey tap flash on disclosure controls. */
html.browser-safari .pi-header__menu-btn,
html.browser-safari .pi-nav-disclosure,
html.browser-safari .pi-header__nav .pi-btn {
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
