/**
 * Click language switcher. Trigger keeps the header circle; the list opens on click.
 */

.stw-lang-switcher-item {
	position: relative;
}

.stw-lang {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding-inline: 8px;
	z-index: 2;
}

.stw-lang[open] {
	z-index: 40;
}

.stw-lang__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 38px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.stw-lang__toggle::-webkit-details-marker {
	display: none;
}

.stw-lang__toggle::marker {
	content: '';
}

.stw-lang__toggle:hover,
.stw-lang[open] > .stw-lang__toggle {
	color: #86BE3D;
}

.stw-lang__toggle:focus {
	outline: none;
}

.stw-lang__toggle:focus-visible {
	outline: 2px solid #86BE3D;
	outline-offset: 2px;
}

.stw-lang__code {
	display: block;
}

/* Closed list stays shut even if the theme opens nested menus on hover. */
.stw-lang:not([open]) > .stw-lang__menu {
	display: none !important;
}

.stw-lang[open] > .stw-lang__menu {
	display: flex !important;
	flex-direction: column;
	gap: 2px;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 188px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff !important;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
	z-index: 50;
}

.stw-lang__item {
	display: block;
	margin: 0;
	padding: 0;
}

.stw-lang-switcher-item .stw-lang__menu a.stw-lang__option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 8px 10px !important;
	border-radius: 8px;
	color: #1c1c1c !important;
	background: transparent !important;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
}

.stw-lang-switcher-item .stw-lang__menu a.stw-lang__option:hover,
.stw-lang-switcher-item .stw-lang__menu a.stw-lang__option:focus-visible {
	color: #1c1c1c !important;
	background: #f3f4f6 !important;
	outline: none;
}

.stw-lang-switcher-item .stw-lang__menu a.stw-lang__option.is-current {
	background: rgba(134, 190, 61, 0.16) !important;
}

.stw-lang-switcher-item .stw-lang__menu a.stw-lang__option.is-current:hover,
.stw-lang-switcher-item .stw-lang__menu a.stw-lang__option.is-current:focus-visible {
	background: rgba(134, 190, 61, 0.24) !important;
}

.stw-lang__flag {
	flex: none;
	width: 18px;
	height: 12px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.stw-lang__flag--code {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 16px;
	background: #f3f4f6;
	color: #1c1c1c;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.02em;
	box-shadow: none;
}

.stw-lang__name {
	flex: 1;
	min-width: 0;
}

.stw-lang__check {
	display: flex;
	flex: none;
	margin-left: auto;
	color: #86BE3D;
}

@media (prefers-reduced-motion: no-preference) {
	.stw-lang[open] > .stw-lang__menu {
		animation: stw-lang-in 0.14s ease;
	}
}

@keyframes stw-lang-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 767px) {
	.stw-lang[open] > .stw-lang__menu {
		right: auto;
		left: 0;
	}
}

/* Only the language list, inside the mobile dropdown, stays in the flow. */
.elementor-nav-menu--dropdown .stw-lang[open] > .stw-lang__menu {
	position: static;
	width: auto;
	min-width: 0;
	margin-top: 8px;
	right: auto;
	left: auto;
}
