/* Native details keeps the country navigation available without JavaScript. */
#mainNav .nav-inner {
  flex-wrap: wrap;
  overflow: visible;
}

.nav-country-portals {
  position: relative;
  flex: 0 0 auto;
  color: #fff;
}

.nav-country-portals > summary {
  list-style: none;
  cursor: pointer;
}

.nav-country-portals > summary::-webkit-details-marker {
  display: none;
}

.nav-country-portals[open] > summary {
  background: rgba(255, 255, 255, 0.12);
}

.nav-country-portals[open] > summary span {
  transform: rotate(180deg);
}

.nav-country-portals:not([open]) > .nav-dropdown-menu {
  display: none;
}

.nav-country-portals > .nav-dropdown-menu {
  left: auto;
  right: 0;
  min-width: min(280px, calc(100vw - 32px));
  text-align: left;
  max-height: min(72vh, 570px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#countryPortalsMenu a {
  margin: 0;
  color: #fff;
  font-size: 0.76rem;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: normal;
}

.nav-country-portals :focus-visible {
  outline: 2px solid var(--gold, #c4ad7b);
  outline-offset: -3px;
}

@media (max-width: 900px) {
  .nav-country-portals {
    width: 100%;
  }

  .nav-country-portals > .nav-dropdown-menu {
    max-height: none;
    overflow-y: visible;
  }
}
