/**
 * Drivvo-style language switcher: flag + name trigger, searchable panel.
 */

.cr-lang-switcher,
.elementor-widget-shortcode .cr-lang-switcher,
.elementor-shortcode .cr-lang-switcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	line-height: 1;
	color: inherit;
	width: auto;
	flex-shrink: 0;
}

.elementor-widget-shortcode:has(.cr-lang-switcher),
.elementor-element:has(.cr-lang-switcher),
.elementor-widget-shortcode .elementor-widget-container:has(.cr-lang-switcher) {
	overflow: visible;
	width: auto;
}

.elementor-location-header,
.header-wrapper {
	position: relative;
	z-index: 10040;
}

.cr-lang-switcher-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	margin: 0;
	padding: 0.15em 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: inherit;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
}

.cr-lang-switcher-toggle:focus {
	outline: none;
}

.cr-lang-switcher-toggle:focus-visible {
	outline: 1px dotted currentColor;
	outline-offset: 3px;
}

.cr-lang-switcher-flag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	flex-shrink: 0;
	width: 18px;
	height: 12px;
	overflow: hidden;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	line-height: 0;
}

.cr-lang-switcher-flag svg {
	display: block;
	width: 18px;
	height: 12px;
	flex-shrink: 0;
}

.cr-lang-switcher-flag-fallback {
	display: block;
	width: 18px;
	height: 12px;
	font-size: 8px;
	font-weight: 600;
	line-height: 12px;
	text-align: center;
	background: #eee;
	color: #333;
}

.cr-lang-switcher-current {
	font-weight: 500;
}

.cr-lang-switcher-chevron {
	flex-shrink: 0;
	opacity: 0.7;
	transition: transform 0.15s ease;
}

.cr-lang-switcher.is-open .cr-lang-switcher-chevron {
	transform: rotate(180deg);
}

.cr-lang-switcher-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	left: auto;
	z-index: 10050;
	box-sizing: border-box;
	width: 240px;
	padding: 10px;
	border-radius: 10px;
	background: #fff;
	color: #181818;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.06);
	pointer-events: auto;
}

.cr-lang-switcher-panel[hidden] {
	display: none !important;
}

.cr-lang-switcher-panel.is-fixed {
	position: fixed;
	margin: 0;
	z-index: 2147483000;
}

.cr-lang-switcher-search {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 6px;
}

.cr-lang-switcher-search-icon {
	position: absolute;
	top: 50%;
	left: 10px;
	z-index: 1;
	display: flex;
	width: 12px;
	height: 12px;
	color: #888;
	pointer-events: none;
	transform: translateY(-50%);
}

.cr-lang-switcher-search-icon svg {
	display: block;
	width: 12px;
	height: 12px;
}

.cr-lang-switcher-search-input {
	box-sizing: border-box;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 8px 10px 8px 32px !important;
	border: 0;
	border-radius: 8px;
	background: #f3f3f3;
	color: #181818;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 12px;
	-webkit-appearance: none;
	appearance: none;
}

.cr-lang-switcher-search-input::placeholder {
	color: #888;
	font-size: 14px;
	line-height: 12px;
}

.cr-lang-switcher-search-input:focus {
	outline: none;
	background: #ececec;
}

.cr-lang-switcher-list {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 220px;
	overflow: auto;
}

.cr-lang-switcher-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cr-lang-switcher-item[hidden] {
	display: none !important;
}

.cr-lang-switcher-link {
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 8px 10px;
	border-radius: 8px;
	color: #181818 !important;
	text-decoration: none !important;
	font-size: 14px;
	line-height: 1;
}

.cr-lang-switcher-link:hover,
.cr-lang-switcher-link:focus {
	background: #f3f3f3;
	color: #181818 !important;
}

.cr-lang-switcher-link.is-current {
	background: #eef4ff;
	font-weight: 600;
}

.cr-lang-switcher-name {
	display: inline-flex;
	align-items: center;
	line-height: 12px;
}

.cr-lang-switcher-empty {
	margin: 8px 4px 4px;
	padding: 0;
	color: #888;
	font-size: 13px;
}

.cr-lang-switcher-empty[hidden] {
	display: none !important;
}

.connect-block .cr-lang-switcher,
.mobile-header-wrapper .cr-lang-switcher,
.header-wrapper .cr-lang-switcher,
.elementor-location-header .cr-lang-switcher {
	flex-shrink: 0;
}
