/* Custom dropdown */
.cwp-lang-switcher,
.elementor-widget-cubewp_language_switcher {
	overflow: visible !important;
}

.cwp-lang-dd {
	position: relative;
	display: inline-block;
	min-width: 160px;
	width: 100%;
}

.cwp-lang-dd__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
	color: inherit;
	text-align: start;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.cwp-lang-dd--rtl .cwp-lang-dd__toggle,
.cwp-lang-dd--rtl .cwp-lang-dd__item {
	text-align: right;
}

.cwp-lang-dd--rtl .cwp-lang-dd__menu {
	left: auto;
	right: 0;
}

.cwp-lang-dd--no-arrow .cwp-lang-dd__arrow {
	display: none !important;
}

.cwp-lang-dd__toggle:hover,
.cwp-lang-dd.is-open .cwp-lang-dd__toggle {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.cwp-lang-dd__label {
	flex: 1;
	font-weight: 500;
}

.cwp-lang-dd__arrow {
	flex-shrink: 0;
	transition: transform 0.2s ease, color 0.2s ease;
}

.cwp-lang-dd__arrow--default {
	display: block;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid currentColor;
	opacity: 0.85;
}

.cwp-lang-dd__arrow--icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	color: inherit;
}

.cwp-lang-dd__arrow--icon svg,
.cwp-lang-dd__arrow--icon i {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.cwp-lang-dd.is-open:not(.cwp-lang-dd--no-arrow-rotate) .cwp-lang-dd__arrow--default,
.cwp-lang-dd.is-open:not(.cwp-lang-dd--no-arrow-rotate) .cwp-lang-dd__arrow--icon {
	transform: rotate(180deg);
}

.cwp-lang-dd--rtl .cwp-lang-dd__item {
	flex-direction: row-reverse;
	justify-content: flex-end;
}

.cwp-lang-dd__flag,
.cwp-lang-switcher__flag,
.cwp-lang-flag-img {
	display: block;
	width: 24px;
	height: 18px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.cwp-lang-dd__menu {
	position: absolute;
	z-index: 9999;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 280px;
	overflow-y: auto;
	display: none;
}

.cwp-lang-dd.is-open .cwp-lang-dd__menu {
	display: block;
}

.cwp-lang-dd__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 14px;
	border: none;
	background: transparent;
	color: inherit;
	text-decoration: none;
	text-align: left;
	font: inherit;
	cursor: pointer;
	transition: background 0.15s;
	box-sizing: border-box;
}

.cwp-lang-dd__item:hover,
.cwp-lang-dd__item:focus {
	background: #f0f6fc;
	color: inherit;
}

.cwp-lang-dd__item.is-active {
	background: #f6f7f7;
	font-weight: 600;
}

.cwp-lang-dd__item-label {
	flex: 1;
}

/* List layout */
.cwp-lang-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cwp-lang-switcher__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.cwp-lang-switcher__item.is-active .cwp-lang-switcher__link {
	font-weight: 700;
	text-decoration: underline;
}

.cwp-lang-switcher__placeholder {
	color: #646970;
	font-style: italic;
}
