/* SIM05 v65: on phones the navigation remains fixed to the top and the
   dropdown follows the header rather than the scrolled document. Desktop
   controls and catalogue filtering are untouched. */
@media (max-width: 860px) {
  body.partner-auth {
    padding-top: var(--sim05-partner-topbar-height, 68px);
  }
  body.partner-auth .partner-topbar {
    position: fixed !important;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 12000;
  }
  body.partner-auth .partner-nav {
    position: static !important; /* make the fixed header the containing block */
  }
  body.partner-auth .partner-nav__dropdown {
    /* Fixed position inside backdrop-filter headers breaks Safari scrolling.
       Absolute instead anchors the menu to the moving/fixed header itself. */
    position: absolute !important;
    top: calc(100% + 2px) !important;
    right: 12px !important;
    left: 12px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 440px;
    max-height: min(670px, calc(100dvh - var(--sim05-partner-topbar-height, 68px) - env(safe-area-inset-bottom, 0px) - 12px)) !important;
    margin-left: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 12025;
  }
  body.partner-auth .partner-nav__veil {
    z-index: 11999;
  }
  body.partner-auth .partner-nav__toggle {
    touch-action: manipulation;
  }
  body.partner-auth .wrap {
    scroll-margin-top: calc(var(--sim05-partner-topbar-height, 68px) + 8px);
  }
}
