/**
 * CLAADSS language switcher
 */

.claadss-lang {
	position: relative;
	z-index: 100020;
	flex: 0 0 auto;
}
.claadss-lang__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-size: 0.8rem;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
	transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.claadss-lang__btn:hover,
.claadss-lang.is-open .claadss-lang__btn {
	background: linear-gradient(135deg, #eef2ff, #fdf2f8);
	border-color: #c7d2fe;
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
}
.claadss-lang__btn .fa-globe {
	color: #4f46e5;
	font-size: 0.95rem;
}
.claadss-lang__code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	padding: 2px 6px;
	border-radius: 6px;
	background: linear-gradient(135deg, #6366f1, #a855f7);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0.04em;
}
.claadss-lang__cur {
	max-width: 90px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.claadss-lang__caret {
	font-size: 0.65rem;
	opacity: 0.55;
	transition: transform 0.15s ease;
}
.claadss-lang.is-open .claadss-lang__caret {
	transform: rotate(180deg);
}

.claadss-lang__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 260px;
	max-height: min(70vh, 420px);
	overflow-y: auto;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
	z-index: 100030;
}
.claadss-lang__menu[hidden] {
	display: none !important;
}
.claadss-lang__item {
	margin: 0;
	padding: 0;
}
.claadss-lang__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: #0f172a;
	transition: background 0.12s ease;
}
.claadss-lang__opt:hover {
	background: #f1f5f9;
}
.claadss-lang__item.is-active .claadss-lang__opt {
	background: linear-gradient(90deg, #eef2ff, #fdf2f8);
}
.claadss-lang__opt-code {
	flex: 0 0 auto;
	width: 32px;
	height: 28px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.68rem;
	font-weight: 900;
	color: #4338ca;
	background: #e0e7ff;
}
.claadss-lang__opt-name {
	flex: 1 1 auto;
	font-weight: 800;
	font-size: 0.9rem;
}
.claadss-lang__opt-en {
	flex: 0 0 auto;
	font-size: 0.72rem;
	font-weight: 600;
	color: #94a3b8;
}

/* Mobile menu placement */
.cm-dir-nav-mobile .claadss-lang {
	margin: 8px 12px 12px;
}
.cm-dir-nav-mobile .claadss-lang__btn {
	width: 100%;
	justify-content: flex-start;
	min-height: 48px;
	border-radius: 14px;
}
.cm-dir-nav-mobile .claadss-lang__menu {
	position: static;
	max-height: none;
	box-shadow: none;
	border: 1px solid #e2e8f0;
	margin-top: 8px;
}

/*
 * Keep GT host in DOM so select.goog-te-combo exists and can be driven by JS.
 * Do NOT use display:none on #google_translate_element (breaks some GT builds).
 * Clip off-screen instead. Do not blanket-hide .skiptranslate on the host.
 */
.claadss-gt-el,
#google_translate_element {
	position: absolute !important;
	left: -9999px !important;
	top: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	z-index: -1 !important;
	pointer-events: none !important;
}
/* Allow the select to exist for programmatic changes */
#google_translate_element select.goog-te-combo,
select.goog-te-combo {
	min-width: 1px !important;
	min-height: 1px !important;
}

/* Hide only the top banner / tooltip chrome — not the element host */
.goog-te-banner-frame,
.goog-te-balloon-frame,
iframe.goog-te-banner-frame,
body > .skiptranslate,
.goog-te-spinner-pos,
.goog-tooltip,
.goog-tooltip:hover,
#goog-gt-tt,
.goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-l4eHX-hSRGPd {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	max-height: 0 !important;
}

/* Body top offset from GT banner */
html.translated-ltr,
html.translated-rtl,
body {
	top: 0 !important;
	position: static !important;
}
.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

/* RTL languages */
body.claadss-lang-rtl .king-header {
	direction: rtl;
}
body.claadss-lang-rtl .claadss-lang__menu {
	right: auto;
	left: 0;
}

@media (max-width: 782px) {
	.claadss-lang__cur {
		display: none;
	}
	.claadss-lang__btn {
		padding: 0 10px;
		min-width: 40px;
		justify-content: center;
	}
}
