.bx-language-switcher {
	--bx-ls-accent: #3360ff;
	--bx-ls-accent-soft: #698cff;
	--bx-ls-background: #11111c;
	--bx-ls-border: #33373d;
	--bx-ls-hover: #1b1730;
	--bx-ls-text: #fff;
	--bx-ls-admin-bar-height: 0px;

	position: relative;
	z-index: 10000;
	display: inline-flex;
	align-items: center;
	color: var(--bx-ls-text);
	font-family: "Montserrat", sans-serif;
}

.bx-language-switcher-menu-item {
	position: relative;
	display: flex;
	align-items: center;
}

.bx-language-switcher-menu-item > .bx-language-switcher {
	width: 100%;
}

.admin-bar .bx-language-switcher {
	--bx-ls-admin-bar-height: 32px;
}

.bx-language-switcher,
.bx-language-switcher * {
	box-sizing: border-box;
}

.bx-language-switcher__details {
	position: relative;
	margin: 0;
	padding: 0;
}

.bx-language-switcher__summary {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-height: 46px;
	margin: 0;
	padding: 0.8125rem 0.75rem;
	color: var(--bx-ls-text);
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	list-style: none;
	cursor: pointer;
	transition: color 0.3s ease;
}

.bx-language-switcher__summary::-webkit-details-marker {
	display: none;
}

.bx-language-switcher__summary::marker {
	display: none;
	content: "";
}

.bx-language-switcher__summary:hover {
	color: var(--bx-ls-accent);
}

.bx-language-switcher__summary:focus-visible,
.bx-language-switcher__option:focus-visible {
	border-radius: 8px;
	outline: 2px solid #93b7ff;
	outline-offset: 3px;
}

.bx-language-switcher__globe {
	flex: 0 0 auto;
	display: block;
	width: 24px;
	height: 24px;
}

.bx-language-switcher__current {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bx-language-switcher__chevron {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-inline-start: 2px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.3s cubic-bezier(0.58, 0.3, 0.005, 1);
}

.bx-language-switcher__details[open] .bx-language-switcher__chevron {
	transform: rotate(225deg) translate(-2px, -2px);
}

.bx-language-switcher__panel {
	position: absolute;
	z-index: 10001;
	top: calc(100% + 8px);
	inset-inline-end: 0;
	width: min(544px, calc(100vw - 32px));
	max-height: calc(100dvh - var(--bx-ls-admin-bar-height) - 96px);
	padding: 16px;
	overflow-x: hidden;
	overflow-y: auto;
	color: var(--bx-ls-text);
	background: var(--bx-ls-background);
	border: 1px solid var(--bx-ls-border);
	border-radius: 20px;
	box-shadow: 0 16px 48px rgb(0 0 0 / 67%);
	animation: bx-language-panel-in 0.3s cubic-bezier(0.58, 0.3, 0.005, 1);
	overscroll-behavior: contain;
}

.bx-language-switcher__title {
	margin: 4px 12px 12px;
	color: var(--bx-ls-accent-soft);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.bx-language-switcher__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Elementor Nav Menu treats every nested ul as its own hidden submenu.
 * Reset those menu rules for the language grid embedded in our marker item.
 */
.elementor-nav-menu .bx-language-switcher__list,
.elementor-nav-menu--main .elementor-nav-menu .bx-language-switcher__list {
	position: static !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	visibility: visible !important;
	opacity: 1 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	transform: none !important;
}

.bx-language-switcher__item {
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bx-language-switcher__option {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 46px;
	padding: 12px 20px;
	overflow-wrap: anywhere;
	color: var(--bx-ls-text);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.15;
	text-align: start;
	text-decoration: none;
	border-radius: 12px;
	transition: color 0.2s ease, background-color 0.2s ease;
	unicode-bidi: plaintext;
}

a.bx-language-switcher__option:hover {
	color: var(--bx-ls-text);
	background: var(--bx-ls-hover);
}

.bx-language-switcher__option--current {
	color: #fff;
	background: rgb(51 96 255 / 18%);
	cursor: default;
}

.bx-language-switcher-error {
	display: inline-block;
	padding: 8px 12px;
	color: #fff;
	font: 14px/1.4 "Montserrat", sans-serif;
	background: #7a1d1d;
	border-radius: 8px;
}

@keyframes bx-language-panel-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 782px) {
	.admin-bar .bx-language-switcher {
		--bx-ls-admin-bar-height: 46px;
	}
}

@media (max-width: 480px) {
	.bx-language-switcher__current {
		display: none;
	}

	.bx-language-switcher__summary {
		padding-inline: 12px;
	}

	.bx-language-switcher__panel {
		position: fixed;
		top: calc(var(--bx-ls-admin-bar-height) + 76px);
		right: 12px;
		left: 12px;
		width: auto;
		max-height: calc(100dvh - var(--bx-ls-admin-bar-height) - 88px);
	}

	.bx-language-switcher__list {
		grid-template-columns: 1fr !important;
	}

	.bx-language-switcher__option {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bx-language-switcher__summary,
	.bx-language-switcher__chevron,
	.bx-language-switcher__option,
	.bx-language-switcher__panel {
		animation: none;
		transition: none;
	}
}
