.omtr-switcher {
	--omtr-bg: #fff;
	--omtr-fg: #18181b;
	--omtr-hover: #f4f4f5;
	--omtr-border: #e4e4e7;
	--omtr-radius: 7px;
	--omtr-flag-size: 16px;
	position: relative;
	z-index: 20;
	color: var(--omtr-fg);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
}

.omtr-switcher * {
	box-sizing: border-box;
}

.omtr-switcher__dropdown {
	position: relative;
}

.omtr-switcher__trigger,
.omtr-switcher__link {
	display: flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.omtr-switcher__trigger {
	min-height: 32px;
	padding: 0 9px;
	cursor: pointer;
	list-style: none;
	border: 1px solid var(--omtr-border);
	border-radius: var(--omtr-radius);
	background: var(--omtr-bg);
	box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.omtr-switcher__trigger:hover {
	background: var(--omtr-hover);
}

.omtr-switcher__trigger::-webkit-details-marker {
	display: none;
}

.omtr-switcher__trigger:focus-visible,
.omtr-switcher__link:focus-visible {
	outline: 2px solid var(--omtr-fg);
	outline-offset: 2px;
}

.omtr-switcher__chevron {
	width: 6px;
	height: 6px;
	margin: -2px 1px 0 3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	opacity: 0.65;
	transform: rotate(45deg);
	transition: transform 150ms ease;
}

.omtr-switcher__dropdown[open] .omtr-switcher__chevron {
	transform: rotate(225deg) translate(-1px, -1px);
}

.omtr-switcher__list {
	display: flex;
	gap: 3px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.omtr-switcher__dropdown > .omtr-switcher__list {
	position: absolute;
	top: calc(100% + 5px);
	right: 0;
	display: grid;
	min-width: 148px;
	padding: 4px;
	border: 1px solid var(--omtr-border);
	border-radius: calc(var(--omtr-radius) + 1px);
	background: var(--omtr-bg);
	box-shadow: 0 6px 18px rgb(0 0 0 / 9%);
}

.omtr-switcher--flag .omtr-switcher__dropdown > .omtr-switcher__list,
.omtr-switcher--code .omtr-switcher__dropdown > .omtr-switcher__list {
	min-width: 100%;
	width: max-content;
}

.omtr-switcher__link {
	min-height: 30px;
	padding: 0 8px;
	border-radius: max(4px, calc(var(--omtr-radius) - 2px));
}

.omtr-switcher__link:hover {
	background: var(--omtr-hover);
}

.omtr-switcher__check {
	margin-left: auto;
	font-size: 11px;
	opacity: 0.7;
}

.omtr-switcher__flag {
	width: var(--omtr-flag-size);
	height: calc(var(--omtr-flag-size) * 0.72);
	object-fit: cover;
	border: 1px solid rgb(0 0 0 / 8%);
	border-radius: 2px;
}

.omtr-switcher--inline .omtr-switcher__list {
	padding: 2px;
	border: 1px solid var(--omtr-border);
	border-radius: var(--omtr-radius);
	background: var(--omtr-bg);
	box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.omtr-switcher--inline .omtr-switcher__link {
	min-height: 28px;
	padding: 0 7px;
}

.omtr-switcher--inline .is-active {
	background: var(--omtr-hover);
}

.omtr-switcher--floating {
	position: fixed;
	right: 16px;
	bottom: 16px;
	filter: drop-shadow(0 4px 10px rgb(0 0 0 / 8%));
}

.omtr-switcher--flag .omtr-switcher__trigger,
.omtr-switcher--flag .omtr-switcher__link {
	justify-content: center;
}

.omtr-switcher--flag .omtr-switcher__check {
	display: none;
}

.omtr-switcher--flag .is-active {
	background: var(--omtr-hover);
}

.omtr-switcher--bottom-left {
	right: auto;
	left: 16px;
}

.omtr-switcher--top-right {
	top: 16px;
	bottom: auto;
}

.omtr-switcher--top-left {
	top: 16px;
	right: auto;
	bottom: auto;
	left: 16px;
}

@media (prefers-color-scheme: dark) {
	.omtr-switcher--auto-dark {
		--omtr-bg: #18181b !important;
		--omtr-fg: #fafafa !important;
		--omtr-hover: #27272a !important;
		--omtr-border: #3f3f46 !important;
	}

	.omtr-switcher--auto-dark .omtr-switcher__flag {
		border-color: rgb(255 255 255 / 12%);
	}
}
