/**
 * GTranslate — compact header pill; open language list must stay visible.
 * Free widget DOM: .gt_switcher > .gt_selected + .gt_option (not .gt_languages).
 */

/* Kill floating corner widget only (not the inline header switcher). */
#gt_float_wrapper,
body > .gt_float_switcher,
body > div.gt_float_switcher {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
}

/* Header row must not clip the open list */
.rsl-header,
.rsl-header .elementor-section,
.rsl-header .elementor-container,
.rsl-header .elementor-widget-wrap,
.rsl-header .elementor-element,
.rsl-header .elementor-widget-container,
.rsl-header-inner,
.rsl-header-actions {
	overflow: visible !important;
}

.rsl-header-inner {
	align-items: center !important;
	height: var(--rsl-header-h, 72px);
	min-height: var(--rsl-header-h, 72px);
	max-height: var(--rsl-header-h, 72px);
}

.rsl-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	align-self: center;
	height: 28px;
	max-height: 28px;
	position: relative;
	z-index: 90;
}

.rsl-header-actions .rsl-gtranslate--header {
	position: relative;
	z-index: 100;
	flex: 0 0 auto;
	width: 110px;
	min-width: 96px;
	max-width: 140px;
	height: 28px !important;
	max-height: none !important;
	overflow: visible !important;
	align-self: center;
}

.rsl-gtranslate {
	display: inline-flex !important;
	align-items: center;
	position: relative;
	z-index: 80;
	line-height: 1;
	visibility: visible !important;
	opacity: 1 !important;
}

.rsl-gtranslate__fallback {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: #fff;
	color: #172293;
	font-weight: 700;
	font-size: 11px;
	border: 1px solid rgba(23, 34, 147, 0.2);
}

/* Closed shell stays compact; overflow must remain visible for .gt_option */
.rsl-gtranslate--header .gtranslate_wrapper,
.rsl-gtranslate--header .gt_container,
.rsl-gtranslate--header .gt_switcher,
.rsl-gtranslate--header .gt_float_switcher {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: 28px !important;
	min-height: 28px !important;
	max-height: none !important;
	overflow: visible !important;
	border-radius: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	font-family: inherit !important;
}

.rsl-gtranslate .gt_selected,
.rsl-gtranslate .gt-selected,
.rsl-gtranslate select,
.rsl-gtranslate .gt_selector {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 6px !important;
	width: 100% !important;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
	padding: 0 9px !important;
	margin: 0 !important;
	border-radius: 999px !important;
	border: 1px solid rgba(23, 34, 147, 0.22) !important;
	background: #ffffff !important;
	color: #172293 !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.03em;
	line-height: 1 !important;
	cursor: pointer;
	box-sizing: border-box !important;
	overflow: hidden !important;
	white-space: nowrap !important;
	text-decoration: none !important;
	box-shadow: 0 1px 6px rgba(15, 23, 68, 0.12) !important;
	appearance: none;
	-webkit-appearance: none;
	position: relative !important;
	z-index: 2;
}

.rsl-gtranslate .gt_selected a,
.rsl-gtranslate .gt-selected a {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	color: #172293 !important;
	text-decoration: none !important;
}

.rsl-gtranslate img {
	width: 14px !important;
	height: 14px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	flex: 0 0 14px;
}

/*
 * Open language list (.gt_option on Free dropdown).
 * Keep under the pill (absolute) — never clipped by the 28px shell.
 */
.rsl-gtranslate--header .gt_option,
.rsl-gtranslate--header .gt_languages,
.rsl-gtranslate--header .gt_switcher .gt_option,
.rsl-gtranslate--header .gt_float_switcher .gt_languages {
	position: absolute !important;
	top: calc(100% + 6px) !important;
	right: 0 !important;
	left: auto !important;
	bottom: auto !important;
	width: min(220px, 78vw) !important;
	min-width: 160px !important;
	max-height: min(280px, 50vh) !important;
	height: auto !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	border-radius: 10px !important;
	border: 1px solid rgba(23, 34, 147, 0.12) !important;
	background: #ffffff !important;
	box-shadow: 0 10px 24px rgba(15, 23, 68, 0.16) !important;
	padding: 4px !important;
	z-index: 100000 !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
	transform: none !important;
}

.rsl-gtranslate .gt_option a,
.rsl-gtranslate .gt_languages a,
.rsl-gtranslate .gt_option .nturl,
.rsl-gtranslate .gt_languages .glink {
	display: flex !important;
	align-items: center !important;
	gap: 7px !important;
	width: 100% !important;
	min-height: 34px !important;
	padding: 6px 8px !important;
	margin: 0 !important;
	border-radius: 7px !important;
	background: transparent !important;
	color: #172293 !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	box-sizing: border-box !important;
}

.rsl-gtranslate .gt_option a:hover,
.rsl-gtranslate .gt_languages a:hover {
	background: rgba(23, 34, 147, 0.08) !important;
}

.rsl-gtranslate .gtranslate_wrapper > a.glink {
	display: inline-flex !important;
	width: auto !important;
	min-height: 28px !important;
	padding: 3px 7px !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #172293 !important;
	border: 1px solid rgba(23, 34, 147, 0.15) !important;
}

/* Footer */
.rsl-gtranslate--footer {
	display: block !important;
	width: 100%;
	max-width: 240px;
	position: relative;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	z-index: 20;
}

.rsl-gtranslate--footer .gtranslate_wrapper,
.rsl-gtranslate--footer .gt_switcher,
.rsl-gtranslate--footer .gt_float_switcher {
	height: 40px !important;
	max-height: none !important;
	position: relative !important;
	overflow: visible !important;
}

.rsl-gtranslate--footer .gt_selected,
.rsl-gtranslate--footer .gt-selected,
.rsl-gtranslate--footer select {
	width: 100% !important;
	height: 40px !important;
	min-height: 40px !important;
	max-height: 40px !important;
	border-radius: 10px !important;
	font-size: 12px !important;
}

.rsl-gtranslate--footer .gt_option,
.rsl-gtranslate--footer .gt_languages {
	position: absolute !important;
	top: calc(100% + 8px) !important;
	left: 0 !important;
	right: auto !important;
	width: 100% !important;
	z-index: 1000 !important;
	background: #fff !important;
	border-radius: 10px !important;
	box-shadow: 0 10px 24px rgba(15, 23, 68, 0.16) !important;
	max-height: min(260px, 45vh) !important;
	overflow-y: auto !important;
}

/* Mobile drawer — list can expand inside the drawer */
.rsl-gtranslate--mobile {
	display: block !important;
	width: 100%;
	margin: 0 0 18px;
	padding: 12px;
	border-radius: 12px;
	background: #f4f5fb;
	border: 1px solid rgba(23, 34, 147, 0.12);
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

.rsl-gtranslate--mobile::before {
	content: "Language";
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #172293;
	opacity: 0.7;
	margin-bottom: 8px;
}

.rsl-gtranslate--mobile .gtranslate_wrapper,
.rsl-gtranslate--mobile .gt_switcher,
.rsl-gtranslate--mobile .gt_float_switcher {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	position: relative !important;
}

.rsl-gtranslate--mobile .gt_selected,
.rsl-gtranslate--mobile .gt-selected,
.rsl-gtranslate--mobile select {
	width: 100% !important;
	height: 42px !important;
	min-height: 42px !important;
	max-height: 42px !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	font-size: 12px !important;
}

.rsl-gtranslate--mobile .gt_option,
.rsl-gtranslate--mobile .gt_languages {
	position: static !important;
	width: 100% !important;
	max-height: 220px !important;
	margin-top: 8px !important;
	box-shadow: none !important;
}

@media (max-width: 640px) {
	.rsl-header-actions .rsl-gtranslate--header {
		width: 92px;
		min-width: 84px;
		max-width: 110px;
	}
}
