/*
 * Keep the flag on the same line as the language name.
 *
 * A deliberate departure from the old site, asked for after seeing it: WPML
 * gives the switcher width:15.5em with max-width:100%, and in this header the
 * parent is narrower than that, so "Nederlands" -- the longest of the eleven
 * names -- ran a few pixels past the space left over by the flag, the gap and
 * the arrow's padding, and wrapped onto a second line under the flag.
 *
 * Sizing the box to its content instead of to the parent fixes every language
 * at once rather than tuning a width that only suits Dutch. Nothing else about
 * the switcher changes: the vendored WPML stylesheet and the inline colours it
 * generated are untouched, and the submenu still tracks the box because it is
 * positioned against it.
 */
.wpml-ls-legacy-dropdown {
	width: max-content;
	max-width: none;
}

.wpml-ls-legacy-dropdown a {
	white-space: nowrap;
}

/*
 * The box is now as wide as the name it is showing, so on a page whose own
 * name is short -- English, or Arabic's العربية -- it would be narrower than
 * "Nederlands" in the list below it, and with wrapping off that name would
 * spill outside the panel. The submenu is positioned against the box with both
 * edges pinned, so giving it a content-based minimum lets it grow past that
 * width, to the right in English and to the left in Arabic, where being
 * over-constrained drops the opposite edge.
 */
.wpml-ls-legacy-dropdown .wpml-ls-sub-menu {
	min-width: max-content;
}
