/* EBA Übersetzer – Sprachumschalter */

.eba-switcher,
.eba-switcher * {
	box-sizing: border-box;
}

/* ---- Dropdown ---- */
.eba-switcher--dropdown {
	position: relative;
	display: inline-block;
	font-size: 15px;
	line-height: 1.2;
}

.eba-switcher__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #ffffff;
	color: #1f2933;
	border: 1px solid #d7dde3;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.eba-switcher__toggle:hover {
	border-color: #b7c0c9;
}

.eba-switcher__caret {
	font-size: 11px;
	opacity: .7;
	transition: transform .15s ease;
}

.eba-switcher--dropdown.is-open .eba-switcher__caret {
	transform: rotate(180deg);
}

.eba-switcher__menu {
	position: absolute;
	z-index: 99999;
	min-width: 100%;
	margin: 6px 0 0;
	padding: 6px;
	list-style: none;
	background: #ffffff;
	border: 1px solid #d7dde3;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .12s ease, transform .12s ease, visibility .12s;
}

.eba-switcher--dropdown.is-open .eba-switcher__menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Menü öffnet nach oben, wenn Umschalter unten sitzt */
.eba-floating--bottom-right .eba-switcher__menu,
.eba-floating--bottom-left .eba-switcher__menu {
	top: auto;
	bottom: 100%;
	margin: 0 0 6px;
}

.eba-switcher__menu li {
	margin: 0;
}

.eba-switcher__menu a,
.eba-switcher--inline a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 6px;
	text-decoration: none;
	color: #1f2933;
	white-space: nowrap;
}

.eba-switcher__menu a:hover {
	background: #f1f5f9;
}

.eba-switcher__menu .is-active a {
	font-weight: 600;
	background: #eef2ff;
}

.eba-flag {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	flex: 0 0 auto;
}

.eba-flag-svg {
	width: 22px;
	height: 15px;
	border-radius: 2px;
	display: block;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ---- Inline-Liste ---- */
.eba-switcher--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eba-switcher--inline .is-active a {
	font-weight: 600;
	background: #eef2ff;
}

/* ---- Schwebender Umschalter ---- */
.eba-floating {
	position: fixed;
	z-index: 99998;
}

.eba-floating--bottom-right { right: 18px; bottom: 18px; }
.eba-floating--bottom-left  { left: 18px;  bottom: 18px; }
.eba-floating--top-right    { right: 18px; top: 18px; }
.eba-floating--top-left     { left: 18px;  top: 18px; }

.eba-floating .eba-switcher__toggle {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* ---- Dark Mode ---- */
@media (prefers-color-scheme: dark) {
	.eba-switcher__toggle,
	.eba-switcher__menu {
		background: #1f2530;
		color: #e6ebf1;
		border-color: #3a4453;
	}
	.eba-switcher__menu a,
	.eba-switcher--inline a { color: #e6ebf1; }
	.eba-switcher__menu a:hover { background: #2a3340; }
	.eba-switcher__menu .is-active a,
	.eba-switcher--inline .is-active a { background: #2d3a5a; }
}
