/* CMS-owned responsive horizontal menu behaviour. */

@media (max-width: 800px) {

  body.mobile-menu-open {
    overflow: hidden !important;
  }

  div#menu_hor {
    position: fixed !important;
    top: 0 !important;
    right: 0;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box;
  }

  /* Keep the compact menu below the PartnerNET logo until the header retracts. */
  div#partnernet div#menu_hor {
    top: 76px !important;
    z-index: 253;
  }

  /* The reduced header moves the menu to the top of the viewport. */
  div#partnernet.sticky-reduced div#menu_hor {
    top: 0 !important;
  }

  /* Keep the mobile menu below page navigation headers when they are present. */
  div#partnernet:has(div.nav_header) div#menu_hor {
    top: 113px !important;
  }

  div#partnernet.sticky-reduced:has(div.nav_header) div#menu_hor {
    top: 75px !important;
  }

  div#menu_hor > ul#nav {
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--lor-color);
  }

  div#menu_hor:not(.opened) > ul#nav > li.mh_class:not(.partnernet_menu),
  div#menu_hor ul li.partnernet_return_to_your_own_account:not(.account_switched) {
    display: none !important;
  }

  div#menu_hor.opened > ul#nav > li.mh_class {
    display: block;
  }

  div#menu_hor > ul#nav > li.mh_class,
  div.sticky-reduced div#menu_hor > ul#nav > li.mh_class {
    float: none;
    width: 100%;
    min-height: 56px;
    height: auto;
    margin: 0;
    border-bottom: 1px solid var(--lor-color-lighter);
    box-sizing: border-box;
    line-height: 1.4;
  }

  div#menu_hor > ul#nav > li.mh_class.partnernet_menu {
    display: block;
    min-height: 56px;
  }

  div#menu_hor button.partnernet_menu_toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    color: white;
    text-align: left;
  }

  div#menu_hor button.partnernet_menu_toggle i {
    margin-right: 10px;
  }

  div#menu_hor ul li a:link,
  div#menu_hor ul li a:visited {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 56px;
    padding: 14px 60px 14px 16px;
    margin: 0;
    line-height: 1.4;
  }

  div#menu_hor ul li ul {
    width: 100%;
    box-sizing: border-box;
  }

  div#menu_hor ul li ul li,
  div.sticky-reduced div#menu_hor ul li ul li {
    display: block;
    float: none;
    clear: both;
    width: 100%;
    height: auto;
    margin: 0;
    box-sizing: border-box;
  }

  div#menu_hor ul li ul {
    display: none;
    position: static;
    top: auto;
    left: auto;
    margin: 0;
    padding: 0;
  }

  div#menu_hor ul li.submenu-open > ul.menu_submenu {
    display: block;
  }

  div#menu_hor ul li ul li a:link,
  div#menu_hor ul li ul li a:visited {
    min-height: 50px;
    padding-left: 32px;
  }

  div#menu_hor button.menu_hor_angle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    color: white;
  }

  div#menu_hor button.menu_hor_angle i {
    display: block;
    width: 10px;
    height: 10px;
    box-sizing: border-box;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    font-size: 0;
    line-height: 0;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  /* Draw the control locally while the deferred icon font is unavailable. */
  div#menu_hor button.menu_hor_angle i::before {
    content: none;
  }

  div#menu_hor li.submenu-open > button.menu_hor_angle i {
    transform: rotate(180deg);
  }
}

@media (min-width: 801px) {

  div#menu_hor button.partnernet_menu_toggle,
  div#menu_hor button.menu_hor_angle {
    display: none;
  }
}