/**
 * Sprachauswahl-Overlay + Sprachumschalter (Apple-Style, CI-Farben).
 *
 * Main  #db2978 | Text #181818 | Weiß #ffffff | Akzent #3a86b5
 */

.mdc-lang {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #181818;
}

.mdc-lang[hidden] {
	display: none;
}

.mdc-lang__scrim {
	position: absolute;
	inset: 0;
	background: rgba(24, 24, 24, 0.42);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	backdrop-filter: saturate(140%) blur(14px);
	animation: mdc-lang-fade 0.32s ease both;
}

.mdc-lang__card {
	position: relative;
	width: 100%;
	max-width: 420px;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #ffffff;
	border-radius: 26px;
	padding: 32px 26px 26px;
	text-align: center;
	box-shadow: 0 30px 70px rgba(24, 24, 24, 0.28), 0 2px 6px rgba(24, 24, 24, 0.08);
	animation: mdc-lang-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Logo */
.mdc-lang__logo {
	display: block;
	max-width: 190px;
	max-height: 64px;
	width: auto;
	height: auto;
	margin: 0 auto 20px;
	object-fit: contain;
}

@keyframes mdc-lang-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes mdc-lang-pop {
	from { opacity: 0; transform: translateY(18px) scale(0.96); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mdc-lang__scrim,
	.mdc-lang__card { animation: none; }
}

.mdc-lang__globe {
	width: 62px;
	height: 62px;
	margin: 0 auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 20px;
	color: #ffffff;
	background: linear-gradient(135deg, #db2978 0%, #b81f63 100%);
	box-shadow: 0 10px 24px rgba(219, 41, 120, 0.34);
}

.mdc-lang__title {
	margin: 0 0 6px;
	font-size: 23px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #181818;
}

.mdc-lang__sub {
	margin: 0 0 20px;
	font-size: 14px;
	color: #6b6b6b;
}

/* --- Dropdown ------------------------------------------------------- */

.mdc-lang__select {
	position: relative;
	width: 100%;
	max-width: 320px;
	margin: 0 auto 20px;
}

.mdc-lang__trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 44px 14px 18px;
	border: 1.5px solid #e2e2e8;
	border-radius: 16px;
	background: #ffffff;
	color: #181818;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(24, 24, 24, 0.06);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mdc-lang__trigger:hover {
	border-color: #d0d0d8;
	box-shadow: 0 6px 18px rgba(24, 24, 24, 0.09);
}

.mdc-lang__trigger:focus-visible {
	outline: 3px solid rgba(58, 134, 181, 0.5);
	outline-offset: 2px;
}

.mdc-lang__select.is-open .mdc-lang__trigger {
	border-color: #db2978;
	box-shadow: 0 6px 18px rgba(219, 41, 120, 0.16);
}

.mdc-lang__value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 0;
}

.mdc-lang__caret {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #8a8a90;
	transition: transform 0.22s ease;
	pointer-events: none;
}

.mdc-lang__select.is-open .mdc-lang__caret {
	transform: translateY(-50%) rotate(180deg);
}

.mdc-lang__menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 5;
	max-height: 300px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px;
	background: #ffffff;
	border: 1px solid #eaeaee;
	border-radius: 18px;
	box-shadow: 0 20px 46px rgba(24, 24, 24, 0.18);
	animation: mdc-lang-menu 0.2s ease both;
}

.mdc-lang__menu[hidden] {
	display: none;
}

@keyframes mdc-lang-menu {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}

/* Zeile mittig, Inhalt darin linksbündig – daher der innere Wrapper. */
.mdc-lang__option {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 100%;
	padding: 11px 34px;
	border: 0 !important;
	border-radius: 12px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #181818;
	cursor: pointer;
	text-align: left;
	line-height: 1.3;
	-webkit-appearance: none;
	appearance: none;
	transition: background 0.15s ease;
}

.mdc-lang__option > .mdc-lang__flag,
.mdc-lang__option > .mdc-lang__names {
	flex: 0 0 auto;
}

.mdc-lang__option > .mdc-lang__flag {
	margin-right: 12px;
}

.mdc-lang__option:hover {
	background: #f5f5f7 !important;
}

.mdc-lang__option:focus-visible {
	outline: 3px solid rgba(58, 134, 181, 0.5);
	outline-offset: -2px;
}

.mdc-lang__option.is-selected {
	background: rgba(219, 41, 120, 0.06);
}

.mdc-lang__flag {
	flex: 0 0 auto;
	width: 24px;
	height: 16px;
	border-radius: 3px;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgba(24, 24, 24, 0.08);
}

.mdc-lang__flag--none {
	display: block;
	background: #ececf0;
}

/*
 * Feste Textbreite: dadurch stehen alle Flaggen und alle Sprachnamen
 * exakt untereinander, während der ganze Block mittig sitzt.
 */
.mdc-lang__names {
	width: 170px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.3;
	text-align: left;
}

.mdc-lang__native {
	font-size: 15.5px;
	font-weight: 600;
	color: #181818;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mdc-lang__latin {
	font-size: 12.5px;
	color: #8a8a90;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Häkchen sitzt absolut rechts, damit der Text mittig bleibt. */
.mdc-lang__option {
	position: relative;
}

.mdc-lang__check {
	position: absolute;
	right: 10px;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: #ffffff;
	background: #db2978;
	opacity: 0;
	transform: translateY(-50%) scale(0.6);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.mdc-lang__option.is-selected .mdc-lang__check {
	opacity: 1;
	transform: translateY(-50%);
}

.mdc-lang__cta {
	flex: 0 0 auto;
	width: 100%;
	max-width: 320px;
	padding: 15px 20px;
	border: 0;
	border-radius: 980px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(135deg, #db2978 0%, #c32268 100%);
	box-shadow: 0 10px 24px rgba(219, 41, 120, 0.32);
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.mdc-lang__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(219, 41, 120, 0.38);
}

.mdc-lang__cta:active {
	transform: scale(0.985);
}

.mdc-lang__cta:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
}

/* Scrollen der Seite sperren, solange der Dialog offen ist. */
body.mdc-lang-open {
	overflow: hidden;
}

/* --------------------------------------------------------------------- */
/* Sprachumschalter [mdc_language_switcher]                                */
/* --------------------------------------------------------------------- */

.mdc-langsw {
	position: relative;
	display: inline-block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mdc-langsw__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 1.5px solid #e2e2e8 !important;
	border-radius: 980px !important;
	background: #ffffff !important;
	color: #181818;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: 0 2px 8px rgba(24, 24, 24, 0.06);
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.mdc-langsw__btn:hover {
	border-color: #d0d0d8 !important;
	box-shadow: 0 6px 16px rgba(24, 24, 24, 0.1);
	transform: translateY(-1px);
}

.mdc-langsw__btn[aria-expanded="true"] {
	border-color: #db2978 !important;
	box-shadow: 0 6px 18px rgba(219, 41, 120, 0.16);
}

.mdc-langsw__btn[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.mdc-langsw__btn svg {
	transition: transform 0.22s ease;
	color: #8a8a90;
}

.mdc-langsw__btn img {
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(24, 24, 24, 0.08);
}

.mdc-langsw__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 99999;
	max-height: 320px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px;
	background: #ffffff;
	border: 1px solid #eaeaee;
	border-radius: 18px;
	box-shadow: 0 20px 46px rgba(24, 24, 24, 0.18);
	animation: mdc-lang-menu 0.2s ease both;
}

.mdc-langsw__menu[hidden] {
	display: none;
}

/* Gleiche Logik wie im Dialog: Zeile mittig, Inhalt linksbündig. */
.mdc-langsw__link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 12px;
	border-radius: 12px;
	color: #181818;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.mdc-langsw__link img,
.mdc-langsw__link .mdc-lang__flag {
	flex: 0 0 auto;
	margin-right: 12px;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(24, 24, 24, 0.08);
}

.mdc-langsw__link span {
	flex: 0 0 auto;
	width: 150px;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mdc-langsw__link:hover {
	background: #f5f5f7;
	color: #181818;
}

.mdc-langsw__link.is-current {
	color: #db2978;
	background: rgba(219, 41, 120, 0.06);
}

@media (max-width: 480px) {
	.mdc-lang__card {
		padding: 26px 18px 18px;
		border-radius: 22px;
	}
	.mdc-lang__title { font-size: 21px; }
}
