/* WP Quick Translations — language switcher */
.wpqt-switcher {
	--wpqt-flag-size: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.75em;
}
.wpqt-switcher--inline {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}
.wpqt-switcher--list {
	flex-direction: column;
}
.wpqt-switcher__item {
	margin: 0;
	padding: 0;
}
.wpqt-switcher__item a,
.wpqt-switcher__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	text-decoration: none;
}
.wpqt-switcher__item.is-current a {
	font-weight: 600;
}
.wpqt-switcher__item.is-missing a {
	opacity: 0.7;
}

/* Flags: images, so they look the same on Windows, macOS and phones. */
.wpqt-switcher__flag {
	display: inline-flex;
	line-height: 0;
	flex: none;
}
.wpqt-flag {
	display: inline-block;
	width: var(--wpqt-flag-size, 20px);
	height: auto;
	max-width: none;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	vertical-align: middle;
}
.wpqt-flag--square {
	aspect-ratio: 1 / 1;
}
.wpqt-flag--circle {
	aspect-ratio: 1 / 1;
	border-radius: 50%;
}
.menu-item .wpqt-switcher__flag {
	margin-right: 0.35em;
	vertical-align: middle;
}

/* Dropdown: <details>, works without JavaScript; switcher.js closes it on outside click and Escape. */
.wpqt-switcher--dropdown {
	display: inline-block;
	position: relative;
}
.wpqt-switcher__dropdown {
	position: relative;
}
.wpqt-switcher__toggle {
	cursor: pointer;
	list-style: none;
	padding: 0.45em 0.7em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	background: #fff;
	user-select: none;
	line-height: 1.2;
}
.wpqt-switcher__toggle::-webkit-details-marker {
	display: none;
}
.wpqt-switcher__toggle::marker {
	content: "";
}
.wpqt-switcher__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.wpqt-switcher__caret {
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.15em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-25%) rotate(45deg);
	transition: transform 0.15s ease;
}
.wpqt-switcher__dropdown[open] .wpqt-switcher__caret {
	transform: translateY(15%) rotate(-135deg);
}
.wpqt-switcher__menu {
	position: absolute;
	z-index: 9999;
	top: calc(100% + 4px);
	right: 0;
	min-width: 100%;
	margin: 0;
	padding: 0.3em 0;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.wpqt-switcher__menu .wpqt-switcher__item a {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	padding: 0.45em 0.8em;
	white-space: nowrap;
}
.wpqt-switcher__menu .wpqt-switcher__item a:hover,
.wpqt-switcher__menu .wpqt-switcher__item a:focus-visible {
	background: rgba(0, 0, 0, 0.05);
}
.wpqt-switcher--select select {
	max-width: 100%;
}
.wpqt-switcher .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* 1.0.5: menu items with flags only. */
.menu-item.wpqt-menu-names-none .wpqt-switcher__flag {
	margin-right: 0;
}
