.wppt-picker { font-size: 14px; line-height: 1.4; }
.wppt-picker ul { list-style: none; margin: 0; padding: 0; }
.wppt-picker a { text-decoration: none; color: inherit; }
.wppt-picker__code { font-weight: 600; }
/* Themes often size every image (max-width: 100%, width: auto); inside a
   switcher that collapses a flag to nothing, so its size is fixed here. */
.wppt-flag {
	display: inline-block !important; width: 1.25em !important; min-width: 1.25em; max-width: none !important;
	height: auto !important; aspect-ratio: 4 / 3; margin: 0; padding: 0; border: 0; border-radius: 2px;
	vertical-align: -.15em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); object-fit: cover;
}
.wppt-flag + span { margin-left: .15em; }
.wppt-menu-picker .wppt-flag, .wppt-menu-picker-language .wppt-flag { margin-right: .1em; }

.wppt-picker--inline ul { display: flex; gap: .75em; }
.wppt-picker--inline a[aria-current] { text-decoration: underline; }
.wppt-picker--vertical ul { display: flex; flex-direction: column; gap: .4em; }
.wppt-picker--vertical a[aria-current] { font-weight: 600; }

.wppt-picker--dropdown details { position: relative; display: inline-block; }
.wppt-picker--dropdown summary {
	cursor: pointer; list-style: none; padding: .45em .8em; border-radius: 6px;
	background: #fff; color: #1d1d1f; border: 1px solid rgba(0, 0, 0, .15);
}
.wppt-picker--dropdown summary::-webkit-details-marker { display: none; }
.wppt-picker--dropdown summary::after { content: "▾"; margin-left: .4em; font-size: .8em; }
.wppt-picker--dropdown ul {
	position: absolute; min-width: 100%; margin-top: 4px; padding: 4px 0; z-index: 99999;
	background: #fff; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.wppt-picker--dropdown li a { display: block; padding: .4em .8em; white-space: nowrap; color: #1d1d1f; }
.wppt-picker--dropdown li a:hover, .wppt-picker--dropdown li a:focus-visible { background: #f2f2f4; }
.wppt-picker--dropdown li a[aria-current] { font-weight: 600; }
.wppt-picker summary:focus-visible, .wppt-picker a:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }

.wppt-picker--floating { position: fixed; bottom: 0; z-index: 99999; }
.wppt-picker--floating.wppt-picker--right { right: 40px; }
.wppt-picker--floating.wppt-picker--left { left: 40px; }
.wppt-picker--floating summary { border-bottom: 0; border-radius: 6px 6px 0 0; box-shadow: 0 -2px 12px rgba(0, 0, 0, .12); }
.wppt-picker--floating ul { bottom: 100%; margin: 0 0 4px; }
.wppt-picker--floating.wppt-picker--right ul { right: 0; }

@media print { .wppt-picker--floating { display: none; } }

/* Menu item: a dropdown that works in any theme. How it opens is ours; how
   it looks is the theme's when the theme styles submenus (zero specificity). */
li.wppt-menu-picker { position: relative; }
li.wppt-menu-picker > ul.sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 99999; display: none;
	flex-direction: column; align-items: stretch; gap: 0; width: max-content; min-width: 100%; margin: 0; list-style: none;
}
li.wppt-menu-picker:hover > ul.sub-menu, li.wppt-menu-picker:focus-within > ul.sub-menu { display: flex; }
li.wppt-menu-picker > ul.sub-menu > li { margin: 0; }
:where(li.wppt-menu-picker > ul.sub-menu) {
	padding: 6px 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
:where(li.wppt-menu-picker > ul.sub-menu a) { display: block; padding: .45em 1em; white-space: nowrap; }
