/* Shared SHIP2 switcher for the three platform headers. */
header .s2b-ship2-item,
header .s2b-ship2-menu {
  position: relative;
}

header .s2b-ship2-menu > summary {
  display: block;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

header .s2b-ship2-menu > summary::-webkit-details-marker {
  display: none;
}

header .s2b-ship2-menu > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

header .s2b-ship2-menu > .dropdown-menu {
  right: 0;
  left: auto;
  max-width: calc(100vw - 2rem);
}

header .s2b-ship2-menu[open] > .dropdown-menu {
  display: block;
  visibility: visible;
  opacity: 1;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  body:not(.s2b-base) #navbarSupportedContent .region-nav-main {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  body:not(.s2b-base) #block-b5subtheme-main-navigation {
    order: 0;
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  body:not(.s2b-base) #block-b5subtheme-account-menu {
    order: 1;
    margin-left: 0 !important;
  }

  body:not(.s2b-base) #block-b5subtheme-gtranslate { order: 2; }
}

/* Ship2Base has the longest main menu; keep every item readable on tablets. */
@media (min-width: 992px) and (max-width: 1439.98px) {
  body.s2b-base #navbarSupportedContent .region-nav-main {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  body.s2b-base #block-b5subtheme-main-navigation {
    order: 0;
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  body.s2b-base #block-b5subtheme-main-navigation .navbar-nav {
    justify-content: flex-end !important;
  }

  body.s2b-base #block-b5subtheme-account-menu {
    order: 1;
    margin-left: 0 !important;
  }
  body.s2b-base #block-b5subtheme-gtranslate { order: 2; }
}

@media (max-width: 991.98px) {
  header .s2b-ship2-menu > summary {
    white-space: normal;
  }

  header .s2b-ship2-menu > .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 0.5rem;
    max-height: 40dvh;
    overflow-y: auto;
  }
}

body.s2b-work #navbarSupportedContent .s2w-maps-mobile-menu .s2b-ship2-menu > summary {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e8d5d3;
  border-radius: 12px;
  background: #fff;
  color: #382f32 !important;
  font-size: 14px;
  font-weight: 700;
}

body.s2b-work #navbarSupportedContent .s2w-maps-mobile-menu .s2b-ship2-menu > .dropdown-menu {
  position: static;
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 0;
}
