/**
 * Hoptrans header language switcher (Vorto Gama look).
 * Scoped to Salient header / mobile header only.
 *
 * Toggle matches Salient rounded CTA / SUSISIEKIME pill (200px / full capsule).
 * Dropdown panel keeps a light radius.
 */

/* Safety: never show GTranslate float widget once header switcher is active */
.gt_float_switcher,
.gt_float_switcher *,
#gt_float_wrapper {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Unpublished translations: keep DE/PL out of any leftover GTranslate chrome. */
.gtranslate_wrapper a[data-gt-lang="de"],
.gtranslate_wrapper a[data-gt-lang="pl"],
.gt_switcher a[data-gt-lang="de"],
.gt_switcher a[data-gt-lang="pl"],
.hoptrans-lang-switcher__opt[data-lang="de"],
.hoptrans-lang-switcher__opt[data-lang="pl"] {
	display: none !important;
}

/* Hide Google website translator banner/gadget chrome (not the browser extension). */
.skiptranslate > iframe.goog-te-banner-frame,
body > .skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-gadget {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Header nav stays LT until visitor explicitly picks EN in the switcher. */
#header-outer,
#header-outer nav,
#header-outer .sf-menu,
#header-outer .sf-menu a,
#header-outer .menu-title-text,
#header-outer .nectar-text-reveal-button__text {
	translate: no;
}

.hoptrans-gtranslate-native--singleton {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
}

/* Right cluster: [compact lang] [green CTA]. CTA stays last.
   GTranslate proxy can reinsert the CTA into ul.sf-menu; JS moves it back.
   Flex order is a belt-and-suspenders once it is inside ul.buttons.
   Salient zeros ul.buttons margin (0.35em lost); NEWS then sits flush on the pill. */
#header-outer #top nav > ul.buttons,
#header-outer #top nav > ul.sf-menu.buttons,
#header-outer nav > ul.buttons {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
	margin-left: 18px !important;
}

/* Last main-nav label (NAUJIENOS / NEWS) needs the same side padding as siblings. */
#header-outer nav > ul.sf-menu:not(.buttons) > li:last-child > a {
	padding-right: 10px;
}

#header-outer nav > ul.buttons > li.hoptrans-gtranslate-header-li,
#header-outer .hoptrans-gtranslate-header-li {
	list-style: none;
	margin: 0;
	margin-left: 4px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	order: 1;
}

#header-outer nav > ul.buttons > li.button_solid_color,
#header-outer nav > ul.buttons > li[class*="button_"],
#header-outer nav > ul.buttons > li.hoptrans-header-cta {
	flex: 0 0 auto;
	margin-left: 0;
	order: 2;
}

#header-outer .hoptrans-gtranslate-header-wrap,
.nectar-mobile-only.mobile-header .hoptrans-gtranslate-mobile-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

/* Hide native GTranslate UI but keep it in DOM for language actions */
.hoptrans-gtranslate-native,
.hoptrans-gtranslate-native .gtranslate_wrapper,
.hoptrans-gtranslate-native .gt_switcher,
.hoptrans-gtranslate-native .gt_selected,
.hoptrans-gtranslate-native .gt_option {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	max-width: 1px !important;
	max-height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	opacity: 0 !important;
	pointer-events: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

.hoptrans-lang-switcher {
	position: relative;
}

#header-outer .hoptrans-lang-switcher__toggle,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__toggle {
	min-width: 52px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid rgba(28, 46, 32, 0.18);
	border-radius: 200px !important;
	background: #fff;
	color: #1c2e20;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(28, 46, 32, 0.08);
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}

#header-outer .hoptrans-lang-switcher__toggle:hover,
#header-outer .hoptrans-lang-switcher__toggle:focus,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__toggle:hover,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__toggle:focus {
	background: #f5f7f5;
	outline: none;
}

.hoptrans-lang-switcher__current {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.hoptrans-lang-switcher__arrow {
	font-size: 11px;
	opacity: 0.7;
}

.hoptrans-lang-switcher.is-open .hoptrans-lang-switcher__arrow {
	transform: rotate(180deg);
}

#header-outer .hoptrans-lang-switcher__menu,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 62px;
	border: 1px solid rgba(28, 46, 32, 0.14);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(28, 46, 32, 0.12);
	overflow: hidden;
	z-index: 9999;
}

#header-outer .hoptrans-lang-switcher__opt,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__opt {
	width: 100%;
	border: 0;
	border-radius: 0 !important;
	border-top: 1px solid rgba(28, 46, 32, 0.06);
	background: #fff;
	padding: 8px 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-align: center;
	cursor: pointer;
	color: #1c2e20;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	font-family: inherit;
}

#header-outer .hoptrans-lang-switcher__opt:first-child,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__opt:first-child {
	border-top: 0;
}

#header-outer .hoptrans-lang-switcher__opt:hover,
#header-outer .hoptrans-lang-switcher__opt:focus,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__opt:hover,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__opt:focus {
	background: #f3f5f3;
	outline: none;
}

#header-outer .hoptrans-lang-switcher__opt.is-active,
.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__opt.is-active {
	background: #e3ede3;
	color: #1a5e2a;
}

.nectar-mobile-only.mobile-header .hoptrans-gtranslate-mobile-wrap {
	padding: 0;
	margin: 0 10px 0 0;
	justify-content: flex-end;
	align-self: center;
}

/* Compact desktop / iPad landscape: keep NEWS↔pill gap, but don't shove CTA off. */
@media (max-width: 1100px) {
	#header-outer #top nav > ul.buttons,
	#header-outer #top nav > ul.sf-menu.buttons,
	#header-outer nav > ul.buttons {
		margin-left: 12px !important;
	}
}

/* Keep usable tap target beside burger on small screens */
@media (max-width: 999px) {
	.nectar-mobile-only.mobile-header .hoptrans-lang-switcher__toggle {
		min-width: 52px;
		height: 32px;
	}

	#slide-out-widget-area .off-canvas-menu-container > .inner > ul.menu {
		display: flex;
		flex-direction: column;
	}

	#slide-out-widget-area .off-canvas-menu-container > .inner > ul.menu > li.button_solid_color {
		order: 99;
		margin-top: 0.75em;
	}
}
