.lang-popup-wrapper {
	position: relative;
}

.lang-popup-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	cursor: pointer;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	user-select: none;
	text-align: inherit;
	text-decoration: none;
}

a.lang-popup-trigger--direct {
	cursor: pointer;
}

a.lang-popup-trigger--direct:hover,
a.lang-popup-trigger--direct:focus-visible {
	opacity: 0.9;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Wiele języków: linki w jednym rzędzie (bez popupu) */
.lang-popup-wrapper--inline {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.5rem;
}

.lang-popup__item--inline {
	display: inline;
	padding: 0;
	margin: 0;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}

.lang-popup__item--inline:hover,
.lang-popup__item--inline:focus-visible {
	opacity: 0.9;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.lang-popup-inline-sep {
	opacity: 0.85;
	font-weight: 400;
	user-select: none;
}

.lang-flag {
	width: 22px;
	height: 16px;
	object-fit: cover;
	border-radius: 2px;
	display: block;
}

.lang-arrow {
	color: #fff;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.lang-popup-trigger.active .lang-arrow {
	transform: rotate(180deg);
}

/* Zachowane na wypadek starszych szablonów / custom */
.lang-popup {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	min-width: 120px;
	overflow: hidden;
	z-index: 9999;
}

.lang-popup.open {
	display: block;
}

.lang-popup__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
	transition: background 0.2s;
}

.lang-popup__item:hover {
	background: #f5f5f5;
}
