/* GTranslate header — clean chip + floating dropdown (must not expand nav height). */

#header [data-row],
#header [data-row] > .ct-container,
#header [data-items],
#header .ct-header-text {
	overflow: visible !important;
}

#header .ct-header-text:has(.vv-header-lang),
#header .ct-header-text:has(.gtranslate_wrapper) {
	position: relative;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	align-self: center;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	min-height: 0;
	max-height: none;
	overflow: visible !important;
}

#header .vv-header-lang,
#header .vv-header-lang .gtranslate_wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	line-height: 1;
}

/* Switcher: fixed trigger height; menu pops out absolutely. */
#header .vv-header-lang .gt_switcher,
#header .ct-header-text .gtranslate_wrapper .gt_switcher {
	position: relative !important;
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow: visible !important;
	vertical-align: middle;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.2;
	color: rgba(15, 42, 32, 0.88);
}

/* Trigger: one outer pill on .gt_selected only; inner <a> must stay borderless. */
#header .vv-header-lang .gt_switcher,
#header .vv-header-lang .gt_switcher .gt_selected,
#header .vv-header-lang .gt_selected a,
#header .vv-header-lang .gt_switcher .gt_selected a {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
}

#header .vv-header-lang .gt_switcher .gt_selected {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	min-width: 112px;
	padding: 0 12px 0 10px !important;
	border: 1px solid rgba(15, 42, 32, 0.12) !important;
	border-radius: 999px !important;
	background: #fff !important;
	box-shadow: 0 1px 2px rgba(15, 42, 32, 0.04);
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background 0.2s ease,
		transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

#header .vv-header-lang .gt_switcher .gt_selected:active {
	transform: scale(0.985);
}

#header .vv-header-lang .gt_switcher .gt_selected::after {
	content: "";
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	margin-left: 2px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='none' stroke='%230f2a20' stroke-opacity='0.45' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E") no-repeat center / contain;
	pointer-events: none;
	transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

#header .vv-header-lang .gt_switcher.vv-lang-open .gt_selected::after,
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_selected::after {
	transform: rotate(180deg);
}

#header .vv-header-lang .gt_switcher.vv-lang-open .gt_selected,
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_selected {
	border-color: rgba(15, 42, 32, 0.22) !important;
	box-shadow: 0 4px 14px rgba(15, 42, 32, 0.1);
	background: #fcfcfb !important;
}

#header .vv-header-lang .gt_switcher .gt_selected:hover {
	border-color: rgba(15, 42, 32, 0.2) !important;
	box-shadow: 0 2px 8px rgba(15, 42, 32, 0.08);
	background: #fcfcfb !important;
}

#header .vv-header-lang .gt_selected a,
#header .vv-header-lang .gt_switcher .gt_selected a,
#header .vv-header-lang .gt_switcher > a,
#header .vv-header-lang .gt_switcher .gt_current_lang,
#header .vv-header-lang .gt_switcher .gt_current_lang a {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
	color: inherit !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	white-space: nowrap !important;
	cursor: pointer;
}

#header .vv-header-lang #selected_lang_name,
#header .vv-header-lang .l_name {
	float: none !important;
	display: inline !important;
	margin: 0 !important;
	padding: 0 !important;
	white-space: nowrap !important;
}

#header .vv-header-lang img {
	width: 20px !important;
	height: 20px !important;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 !important;
	flex: 0 0 auto;
	transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

#header .vv-header-lang .gt_switcher img {
	max-width: 20px !important;
	max-height: 20px !important;
}

/* Dropdown panel — fade + slide; never expand header height. */
#header .vv-header-lang .gt_option,
#header .vv-header-lang .gt_switcher .gt_option {
	position: absolute !important;
	top: calc(100% + 8px) !important;
	left: 0 !important;
	right: auto !important;
	width: max-content !important;
	min-width: 100% !important;
	box-sizing: border-box !important;
	height: auto !important;
	max-height: min(70vh, 320px) !important;
	margin: 0 !important;
	padding: 6px !important;
	overflow: auto !important;
	overflow-x: hidden !important;
	border: 1px solid rgba(15, 42, 32, 0.1) !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: 0 10px 28px rgba(15, 42, 32, 0.12), 0 2px 6px rgba(15, 42, 32, 0.06) !important;
	z-index: 200;
	display: block !important;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-8px) scale(0.97);
	transform-origin: top center;
	pointer-events: none;
	transition:
		opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		visibility 0s linear 0.22s,
		box-shadow 0.22s ease;
}

#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option,
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option {
	visibility: visible;
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
	transition:
		opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		visibility 0s;
}

#header .vv-header-lang .gt_option a,
#header .vv-header-lang .gt_option > div,
#header .vv-header-lang .gt_option .gt_list_language {
	display: flex !important;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0 !important;
	padding: 8px 10px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	color: rgba(15, 42, 32, 0.9) !important;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background 0.16s ease,
		transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
		color 0.16s ease;
}

#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option a,
#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option > div,
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option a,
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option > div {
	animation: vv-lang-item-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option a:nth-child(1),
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option a:nth-child(1) { animation-delay: 0.02s; }
#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option a:nth-child(2),
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option a:nth-child(2) { animation-delay: 0.04s; }
#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option a:nth-child(3),
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option a:nth-child(3) { animation-delay: 0.06s; }
#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option a:nth-child(4),
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option a:nth-child(4) { animation-delay: 0.08s; }
#header .vv-header-lang .gt_switcher.vv-lang-open .gt_option a:nth-child(5),
#header .vv-header-lang .gt_switcher:has(.gt_selected a.open) .gt_option a:nth-child(5) { animation-delay: 0.1s; }

@keyframes vv-lang-item-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#header .vv-header-lang .gt_option a:hover,
#header .vv-header-lang .gt_option > div:hover {
	background: rgba(15, 42, 32, 0.06) !important;
	transform: translateX(2px);
}

#header .vv-header-lang .gt_option a:hover img,
#header .vv-header-lang .gt_option > div:hover img {
	transform: scale(1.08);
}

#header .vv-header-lang .gt_option a:active,
#header .vv-header-lang .gt_option > div:active {
	transform: scale(0.98);
}

/* Plugin float widget off when header shortcode is used. */
.gt_float_switcher,
.gt_float_switcher_notranslate,
#glt-translate-trigger,
#glt-toolbar {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	#header .vv-header-lang .gt_switcher .gt_selected,
	#header .vv-header-lang .gt_switcher .gt_selected::after,
	#header .vv-header-lang .gt_option,
	#header .vv-header-lang .gt_option a,
	#header .vv-header-lang .gt_option > div,
	#header .vv-header-lang img {
		transition: none !important;
		animation: none !important;
		transform: none !important;
	}
}

@media (max-width: 689px) {
	#header .vv-header-lang:not(.vv-header-lang--mobile) .gt_switcher .gt_selected {
		padding: 0 8px 0 7px !important;
	}

	#header .vv-header-lang:not(.vv-header-lang--mobile) .gt_option {
		min-width: 150px;
	}
}

/* Mobile: flag circle beside hamburger (Blocksy mobile row often has no [gtranslate] slot). */
@media (max-width: 999.98px) {
	#header [data-device="desktop"] .vv-header-lang {
		display: none !important;
	}

	#header .vv-mobile-lang-mount {
		position: relative;
		z-index: 100051;
		display: inline-flex;
		align-items: center;
		align-self: center;
		flex: 0 0 auto;
		margin: 0 0 0 2px;
	}

	#header .vv-mobile-lang-slot {
		display: inline-flex;
		align-items: center;
	}

	#header .vv-header-lang--mobile .gt_switcher,
	#header .vv-header-lang--mobile .gt_switcher .gt_selected {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: auto !important;
		flex: 0 0 auto !important;
	}

	#header .vv-header-lang--mobile .gt_switcher .gt_selected {
		display: inline-flex !important;
		align-items: center !important;
		min-height: 32px !important;
		height: 32px !important;
		padding: 0 7px 0 6px !important;
		gap: 0 !important;
		border-radius: 999px !important;
		overflow: visible !important;
		border-width: 1px !important;
		box-shadow: 0 1px 2px rgba(15, 42, 32, 0.06);
	}

	/* Mobile: no chevron — flag + language name only. */
	#header .vv-header-lang--mobile .gt_selected::after,
	#header .vv-header-lang--mobile .gt_switcher .gt_selected::after,
	#header .vv-header-lang--mobile .gt_switcher.vv-lang-open .gt_selected::after,
	#header .vv-header-lang--mobile .gt_switcher:has(.gt_selected a.open) .gt_selected::after {
		content: none !important;
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		background: none !important;
	}

	#header .vv-header-lang--mobile .gt_selected a::before,
	#header .vv-header-lang--mobile .gt_selected a::after,
	#header .vv-header-lang--mobile .gt_switcher .gt_selected a::before,
	#header .vv-header-lang--mobile .gt_switcher .gt_selected a::after {
		content: none !important;
		display: none !important;
	}

	#header .vv-header-lang--mobile .gt_selected a,
	#header .vv-header-lang--mobile .gt_switcher .gt_selected a {
		box-sizing: border-box !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: auto !important;
		min-height: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		gap: 5px !important;
		overflow: visible !important;
		border-radius: 0 !important;
		flex: 1 1 auto !important;
		background-image: none !important;
	}

	#header .vv-header-lang--mobile .gt_selected #selected_lang_name,
	#header .vv-header-lang--mobile .gt_selected .l_name,
	#header .vv-header-lang--mobile .gt_selected a span,
	#header .vv-header-lang--mobile .gt_selected a font {
		display: inline !important;
		width: auto !important;
		height: auto !important;
		overflow: visible !important;
		opacity: 1 !important;
		position: static !important;
		pointer-events: auto !important;
		font-size: 12px !important;
		font-weight: 500 !important;
		line-height: 1 !important;
		color: rgba(15, 42, 32, 0.88) !important;
		white-space: nowrap !important;
	}

	#header .vv-header-lang--mobile .gt_switcher img {
		display: block !important;
		width: 20px !important;
		height: 20px !important;
		min-width: 20px !important;
		min-height: 20px !important;
		max-width: 20px !important;
		max-height: 20px !important;
		margin: 0 !important;
		padding: 0 !important;
		flex: 0 0 20px !important;
		object-fit: cover !important;
		object-position: center center !important;
		border-radius: 50% !important;
	}

	#header .vv-header-lang--mobile .gt_option {
		left: 0 !important;
		min-width: 168px;
	}
}

@media (min-width: 1000px) {
	#vv-mobile-lang-slot,
	#header .vv-mobile-lang-mount {
		display: none !important;
	}
}
