.eat-switcher {
	display: inline-block;
	margin: 0;
	position: relative;
	--eat-switcher-text: inherit;
	--eat-switcher-bg: transparent;
	--eat-switcher-border: currentColor;
	--eat-switcher-hover-text: inherit;
	--eat-switcher-hover-bg: transparent;
	--eat-switcher-current-text: inherit;
	--eat-switcher-current-bg: transparent;
}

.eat-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.eat-switcher__list a,
.eat-switcher__menu a {
	color: var(--eat-switcher-text);
	background-color: var(--eat-switcher-bg);
	border-radius: 0.25rem;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.eat-switcher__list a:hover,
.eat-switcher__list a:focus-visible,
.eat-switcher__menu a:hover,
.eat-switcher__menu a:focus-visible {
	color: var(--eat-switcher-hover-text);
	background-color: var(--eat-switcher-hover-bg);
}

.eat-switcher__list .is-current a,
.eat-switcher__list a.is-current,
.eat-switcher__menu .is-current a,
.eat-switcher__menu a.is-current {
	font-weight: 600;
	color: var(--eat-switcher-current-text);
	background-color: var(--eat-switcher-current-bg);
}

.eat-switcher__flag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	margin-inline-end: 0.35em;
	vertical-align: middle;
}

.eat-switcher__flag-img {
	display: block;
	width: 1.25rem;
	height: auto;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.eat-switcher__flag-emoji {
	display: none;
}

/* Emoji mode (default): no third-party image, so show the emoji itself.
   Windows has no flag-emoji font and falls back to the two-letter code. */
.eat-switcher__flag--emoji .eat-switcher__flag-emoji {
	display: inline;
	font-size: 1.1em;
	letter-spacing: 0.02em;
}

.eat-switcher__name {
	display: inline;
	vertical-align: middle;
}

.eat-switcher__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	position: relative;
	max-width: 100%;
	margin: 0;
	padding: 0.55rem 1.75rem 0.55rem 0.9rem;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--eat-switcher-text);
	background-color: var(--eat-switcher-bg);
	border: 1px solid var(--eat-switcher-border);
	border-radius: 999px;
	cursor: pointer;
	appearance: none;
}

.eat-switcher__toggle:hover,
.eat-switcher__toggle:focus-visible {
	color: var(--eat-switcher-hover-text);
	background-color: var(--eat-switcher-hover-bg);
}

.eat-switcher__caret {
	position: absolute;
	right: 0.7rem;
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.7;
	pointer-events: none;
}

.eat-switcher--custom {
	position: relative;
}

.eat-switcher__menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	inset-inline-end: 0;
	z-index: 1000;
	min-width: 12rem;
	margin: 0;
	padding: 0.35rem;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.75rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.eat-switcher__menu[hidden] {
	display: none !important;
}

.eat-switcher__menu a {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 0.7rem;
	border-radius: 0.5rem;
	white-space: nowrap;
}

.eat-switcher.is-open .eat-switcher__caret {
	transform: rotate(225deg);
	margin-top: 0.2rem;
}

.eat-lang-suggest {
	position: sticky;
	bottom: 0;
	padding: 0.75rem 1rem;
	background: #111;
	color: #fff;
	text-align: center;
}

.eat-lang-suggest a {
	color: #fff;
}


/* ------------------------------------------------------------------------
   Automatic placement (Languages > Language switcher > Where the dropdown appears).
   The switcher is either the last item of the theme's main menu (.eat-menu-switcher)
   or a small box in a corner of the page (.eat-switcher-float). While its list is
   open in a menu, the list is shown in a layer of its own (.eat-switcher-portal)
   so nothing in the theme can cover it.
   ------------------------------------------------------------------------ */

/* Colours of the automatic dropdown: a white pill that reads on any header or page.
   :where() keeps this at the weakest strength, so every colour chosen under
   Languages > Language switcher (printed after this file) still wins. */
:where(.eat-menu-switcher, .eat-switcher-float) .eat-switcher--dropdown {
	--eat-switcher-text: #1d2327;
	--eat-switcher-bg: #fff;
	--eat-switcher-border: rgba(0, 0, 0, 0.22);
	--eat-switcher-hover-text: #1d2327;
	--eat-switcher-hover-bg: #f0f0f1;
	--eat-switcher-current-text: #1d2327;
	--eat-switcher-current-bg: #f0f0f1;
}

/* "List of links" and "Flags" in a corner sit in a white pill of their own. */
:where(.eat-switcher-float) .eat-switcher:not(.eat-switcher--dropdown) {
	--eat-switcher-text: #1d2327;
	--eat-switcher-hover-text: #1d2327;
	--eat-switcher-current-text: #1d2327;
	padding: 0.4rem 0.7rem;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

/* In a menu. Themes style menu items and the links and lists inside them with
   strong selectors, so the few properties that keep the dropdown usable are
   set with !important - and only inside this item. */
.eat-menu-switcher {
	display: flex !important;
	align-items: center;
	flex: 0 0 auto;
	position: relative;
	list-style: none !important;
	margin: 0 0 0 0.75rem;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	line-height: 1.2;
}

.eat-menu-switcher::before,
.eat-menu-switcher::after {
	content: none !important;
}

/* Sizes are in pixels here: many themes shrink "rem" (html { font-size: 62.5% }),
   which would turn a rem-sized dropdown into something too small to press. */
.eat-menu-switcher .eat-switcher {
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
}

.eat-menu-switcher .eat-switcher__toggle,
.eat-switcher-float .eat-switcher__toggle {
	box-shadow: none;
	text-shadow: none !important;
	text-transform: none !important;
	text-decoration: none !important;
	letter-spacing: normal;
	min-height: 40px;
	padding: 8px 32px 8px 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	opacity: 1 !important;
	/* Theme styles for buttons and menu items must not repaint this one. */
	color: var(--eat-switcher-text) !important;
	background-color: var(--eat-switcher-bg) !important;
	border: 1px solid var(--eat-switcher-border) !important;
	border-radius: 999px !important;
}

.eat-menu-switcher .eat-switcher__toggle:hover,
.eat-menu-switcher .eat-switcher__toggle:focus-visible,
.eat-switcher-float .eat-switcher__toggle:hover,
.eat-switcher-float .eat-switcher__toggle:focus-visible {
	color: var(--eat-switcher-hover-text) !important;
	background-color: var(--eat-switcher-hover-bg) !important;
}

.eat-menu-switcher .eat-switcher__caret,
.eat-switcher-float .eat-switcher__caret {
	right: 13px;
	width: 7px;
	height: 7px;
}

[dir="rtl"] .eat-menu-switcher .eat-switcher__toggle,
[dir="rtl"] .eat-switcher-float .eat-switcher__toggle {
	padding: 8px 14px 8px 32px;
}

[dir="rtl"] .eat-menu-switcher .eat-switcher__caret,
[dir="rtl"] .eat-switcher-float .eat-switcher__caret {
	right: auto;
	left: 13px;
}

/* The open list: in a corner it hangs off the box; in a menu it is in the layer. */
.eat-switcher-float .eat-switcher__menu,
.eat-switcher-portal .eat-switcher__menu {
	display: block;
	min-width: 180px;
	max-height: min(70vh, 420px);
	overflow-y: auto;
	text-align: start;
}

.eat-switcher-float .eat-switcher__menu[hidden],
.eat-switcher-portal .eat-switcher__menu[hidden] {
	display: none !important;
}

.eat-switcher-portal {
	position: fixed;
	z-index: 2147483000;
	top: 0;
	left: 0;
	margin: 0;
	padding: 0;
	line-height: 1.2;
}

.eat-switcher-portal .eat-switcher__menu {
	position: static;
	inset: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.eat-switcher-float .eat-switcher__menu a,
.eat-switcher-portal .eat-switcher__menu a {
	display: flex !important;
	align-items: center;
	gap: 8px;
	width: auto !important;
	height: auto !important;
	min-height: 40px;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 9px 14px !important;
	border: 0 !important;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.3 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	white-space: nowrap;
	color: var(--eat-switcher-text, #1d2327) !important;
	background-color: transparent !important;
	text-decoration: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}

.eat-switcher-float .eat-switcher__menu a:hover,
.eat-switcher-float .eat-switcher__menu a:focus-visible,
.eat-switcher-portal .eat-switcher__menu a:hover,
.eat-switcher-portal .eat-switcher__menu a:focus-visible {
	color: var(--eat-switcher-hover-text, #1d2327) !important;
	background-color: var(--eat-switcher-hover-bg, #f0f0f1) !important;
}

.eat-switcher-float .eat-switcher__menu a.is-current,
.eat-switcher-portal .eat-switcher__menu a.is-current {
	font-weight: 700;
	color: var(--eat-switcher-current-text, #1d2327) !important;
	background-color: var(--eat-switcher-current-bg, #f0f0f1) !important;
}

.eat-switcher-portal .eat-switcher__menu a:focus-visible,
.eat-switcher-float .eat-switcher__menu a:focus-visible,
.eat-menu-switcher .eat-switcher__toggle:focus-visible,
.eat-switcher-float .eat-switcher__toggle:focus-visible {
	outline: 2px solid #2271b1 !important;
	outline-offset: 2px;
}

/* "List of links" and "Flags" inside a menu or corner: one row of plain links, no list,
   so the theme's own menu link styling applies to them in a menu. */
.eat-menu-switcher .eat-switcher__list,
.eat-switcher-float .eat-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	align-items: center;
}

.eat-menu-switcher .eat-switcher__list a,
.eat-switcher-float .eat-switcher__list a {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.5rem;
}

/* In a corner of the page. */
.eat-switcher-float {
	position: fixed;
	z-index: 99990;
	margin: 0;
	line-height: 1.2;
}

.eat-switcher-float--top-right,
.eat-switcher-float--top-left {
	top: max(1rem, env(safe-area-inset-top));
}

.eat-switcher-float--bottom-right,
.eat-switcher-float--bottom-left {
	bottom: max(1rem, env(safe-area-inset-bottom));
}

.eat-switcher-float--top-right,
.eat-switcher-float--bottom-right {
	right: max(1rem, env(safe-area-inset-right));
}

.eat-switcher-float--top-left,
.eat-switcher-float--bottom-left {
	left: max(1rem, env(safe-area-inset-left));
}

/* The WordPress toolbar covers the top of the page for signed-in people. */
body.admin-bar .eat-switcher-float--top-right,
body.admin-bar .eat-switcher-float--top-left {
	top: calc(32px + 1rem);
}

@media screen and (max-width: 782px) {
	body.admin-bar .eat-switcher-float--top-right,
	body.admin-bar .eat-switcher-float--top-left {
		top: calc(46px + 1rem);
	}
}

.eat-switcher-float .eat-switcher__toggle {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

/* The list opens away from the edge the box sits on. */
.eat-switcher-float--bottom-right .eat-switcher__menu,
.eat-switcher-float--bottom-left .eat-switcher__menu {
	top: auto;
	bottom: calc(100% + 0.35rem);
}

.eat-switcher-float--top-right .eat-switcher__menu,
.eat-switcher-float--bottom-right .eat-switcher__menu {
	inset-inline-start: auto;
	inset-inline-end: auto;
	right: 0;
	left: auto;
}

.eat-switcher-float--top-left .eat-switcher__menu,
.eat-switcher-float--bottom-left .eat-switcher__menu {
	inset-inline-start: auto;
	inset-inline-end: auto;
	left: 0;
	right: auto;
}

@media print {
	.eat-switcher-float,
	.eat-switcher-portal {
		display: none;
	}
}
