/* Show every configured language in the header language switcher at once,
   without an internal scrollbar. With 17+ locales the default single-column
   dropdown overflows the viewport, so we lay the entries out in a grid that
   grows to fit them all. */

.md-header__option .md-select__inner {
  max-height: none;
  overflow: visible;
  width: max-content;
}

.md-header__option .md-select__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: 0;
  max-height: none;
  overflow: visible;
  background-color: var(--md-default-bg-color);
}

/* On very narrow viewports fall back to a single column — the dropdown is
   already constrained by the header width there and scrolling is acceptable
   if the user is on a tiny screen. */
@media screen and (max-width: 30em) {
  .md-header__option .md-select__list {
    grid-template-columns: 1fr;
  }
}
