/* Mildenberger Lautgebärde – interaktiver Gebärden-Explorer */

#lautgebaerde.lg-root {
	--lg-navy: #16234f;
	--lg-blue: #1c40d8;
	--lg-blue-dark: #1834b0;
	--lg-blue-soft: #eef1ff;
	--lg-yellow: #f6d873;
	--lg-yellow-soft: #fbe9a8;
	--lg-glow: #fdf1cf;
	--lg-cream: #faf6ec;
	--lg-ink: #3a4256;
	--lg-muted: #6b7280;
	--lg-border: #e6e8ef;
	--lg-card-shadow: 0 18px 50px rgba(20, 30, 60, 0.08);

	display: block !important;
	box-sizing: border-box;
	background: var(--lg-cream);
	border-radius: 26px;
	padding: 26px;
	max-width: 1160px;
	margin: 0 auto;
	color: var(--lg-ink);
	font-family: inherit;
}

#lautgebaerde.lg-root *,
#lautgebaerde.lg-root *::before,
#lautgebaerde.lg-root *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.lg-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin: 6px 8px 22px;
}

.lg-brand {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
}

.lg-brand__title {
	margin: 0;
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.1;
	font-weight: 800;
	color: var(--lg-navy);
	letter-spacing: -0.01em;
}

.lg-brand__subtitle {
	margin: 6px 0 0;
	font-size: 16px;
	color: var(--lg-muted);
}

/* ---------- Suchfeld ---------- */
.lg-search {
	position: relative;
	flex: 0 1 380px;
	min-width: 240px;
}

.lg-search__icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: var(--lg-muted);
	pointer-events: none;
}

#lautgebaerde.lg-root .lg-search input {
	width: 100%;
	height: 56px;
	margin: 0;
	border: 1px solid var(--lg-border);
	border-radius: 16px;
	background: #fff;
	padding: 0 18px 0 50px;
	font-size: 17px;
	line-height: normal;
	color: var(--lg-navy);
	outline: none;
	box-shadow: 0 4px 14px rgba(20, 30, 60, 0.04);
	transition: border-color 0.15s, box-shadow 0.15s;
	font-family: inherit;
}

#lautgebaerde.lg-root .lg-search input::placeholder {
	color: #9aa1af;
}

#lautgebaerde.lg-root .lg-search input:focus {
	border-color: var(--lg-blue);
	box-shadow: 0 0 0 4px rgba(28, 64, 216, 0.12);
}

#lautgebaerde.lg-root .lg-search input.is-nomatch {
	border-color: #e0668a;
	box-shadow: 0 0 0 4px rgba(224, 102, 138, 0.12);
}

/* ---------- Karte ---------- */
.lg-card {
	display: flex;
	gap: 26px;
	background: #fff;
	border: 1px solid var(--lg-border);
	border-radius: 22px;
	box-shadow: var(--lg-card-shadow);
	padding: 24px;
}

/* ---------- Sidebar ---------- */
.lg-sidebar {
	flex: 0 0 288px;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.lg-sidebar__title {
	margin: 4px 4px 14px;
	font-size: 20px;
	font-weight: 800;
	color: var(--lg-navy);
}

#lautgebaerde.lg-root .lg-list {
	list-style: none;
	margin: 0;
	padding: 4px;
	overflow-y: auto;
	max-height: 560px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lg-list::-webkit-scrollbar {
	width: 8px;
}
.lg-list::-webkit-scrollbar-thumb {
	background: #d7dae4;
	border-radius: 999px;
}
.lg-list::-webkit-scrollbar-track {
	background: transparent;
}

/* Listensymbole des Themes entfernen */
#lautgebaerde.lg-root .lg-list > li {
	list-style: none;
	margin: 0;
	padding: 0;
	background: none;
	display: block;
}

#lautgebaerde.lg-root .lg-list > li::before,
#lautgebaerde.lg-root .lg-list > li::marker {
	content: none;
	display: none;
}

/* Optik analog zum gebaerdenSlider (Theme "silben") */
#lautgebaerde.lg-root .lg-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 20px 10px 10px;
	border: 1px solid #d5dde8;
	border-radius: 16px;
	background: #fff;
	color: #1c5c96;
	cursor: pointer;
	text-align: left;
	width: 100%;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#lautgebaerde.lg-root .lg-item:hover {
	border-color: #1c5c96;
	box-shadow: 0 2px 8px rgba(28, 92, 150, 0.15);
}

#lautgebaerde.lg-root .lg-item.is-active,
#lautgebaerde.lg-root .lg-item.is-active:hover {
	border-color: #1c5c96;
	border-width: 2px;
	padding: 9px 19px 9px 9px;
	box-shadow: 0 2px 10px rgba(28, 92, 150, 0.18);
	background: #fff;
}

/* Aktiv: Häkchen-Badge oben rechts (wie gebaerdenSlider) */
.lg-item.is-active::after {
	content: "\2713";
	position: absolute;
	top: 6px;
	right: 6px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: #1c5c96;
	border-radius: 50%;
}

.lg-item__thumb {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	padding: 6px;
	border-radius: 10px;
	background: #f2f5f8;
	object-fit: cover;
}

.lg-item__label {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #1c5c96;
}

.lg-list__empty {
	padding: 22px 14px;
	color: var(--lg-muted);
	font-size: 15px;
	text-align: center;
}

/* ---------- Detail ---------- */
.lg-detail {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.lg-detail__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 8px;
}

.lg-counter {
	font-size: 16px;
	color: var(--lg-muted);
	font-weight: 500;
}

.lg-nav {
	display: flex;
	gap: 12px;
}

.lg-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 20px;
	border-radius: 14px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	border: 1px solid var(--lg-border);
	background: #fff;
	color: var(--lg-navy);
	transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.lg-btn svg {
	width: 20px;
	height: 20px;
}

.lg-btn:hover {
	background: #f4f5f9;
}

.lg-btn--primary {
	background: var(--lg-blue);
	border-color: var(--lg-blue);
	color: #fff;
}

.lg-btn--primary:hover {
	background: var(--lg-blue-dark);
	border-color: var(--lg-blue-dark);
}

.lg-btn:disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

.lg-detail__body {
	display: flex;
	gap: 26px;
	align-items: center;
	padding: 10px 0 6px;
	flex: 1 1 auto;
}

.lg-figure {
	flex: 0 0 44%;
	max-width: 360px;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.lg-figure::before {
	content: "";
	position: absolute;
	inset: 8%;
	border-radius: 50%;
	background: radial-gradient(circle, var(--lg-glow) 0%, rgba(253, 241, 207, 0) 70%);
}

.lg-figure img {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.lg-info {
	flex: 1 1 auto;
	min-width: 0;
}

.lg-info__head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 18px;
}

.lg-badge {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 16px;
	background: var(--lg-yellow);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: var(--lg-navy);
	line-height: 1;
}

.lg-badge[data-len="1"] { font-size: 38px; }
.lg-badge[data-len="2"] { font-size: 28px; }
.lg-badge[data-len="3"] { font-size: 21px; }

.lg-info__title {
	margin: 0;
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 800;
	color: var(--lg-navy);
	line-height: 1.1;
}

.lg-desc {
	font-size: 17px;
	line-height: 1.55;
	color: var(--lg-ink);
	margin: 0 0 14px;
}

.lg-desc .et_pb_text_inner {
	margin: 0;
	padding: 0;
}

.lg-desc p {
	margin: 0 0 10px;
}

.lg-desc p:last-child {
	margin-bottom: 0;
}

/* ---------- Audioplayer ---------- */
.lg-audio {
	margin-top: 8px;
	padding-top: 20px;
	border-top: 1px solid var(--lg-border);
	display: flex;
	align-items: center;
	gap: 18px;
}

.lg-audio__play {
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: none;
	background: var(--lg-blue);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px rgba(28, 64, 216, 0.28);
	transition: background 0.12s, transform 0.08s;
}

.lg-audio__play:hover {
	background: var(--lg-blue-dark);
}
.lg-audio__play:active {
	transform: scale(0.96);
}
.lg-audio__play svg {
	width: 24px;
	height: 24px;
}

.lg-audio__body {
	flex: 1 1 auto;
	min-width: 0;
}

.lg-audio__label {
	font-size: 17px;
	font-weight: 700;
	color: var(--lg-navy);
	margin-bottom: 8px;
}

.lg-audio__controls {
	display: flex;
	align-items: center;
	gap: 14px;
}

.lg-audio__time {
	font-size: 14px;
	color: var(--lg-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.lg-progress {
	flex: 1 1 auto;
	height: 6px;
	border-radius: 999px;
	background: #e4e7f0;
	position: relative;
	cursor: pointer;
}

.lg-progress__fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	border-radius: 999px;
	background: var(--lg-blue);
}

.lg-progress__fill::after {
	content: "";
	position: absolute;
	right: -6px;
	top: 50%;
	transform: translateY(-50%);
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: var(--lg-blue);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.lg-iconbtn {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border: none;
	background: transparent;
	color: var(--lg-muted);
	cursor: pointer;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lg-iconbtn:hover {
	background: #f0f1f6;
	color: var(--lg-navy);
}

.lg-iconbtn svg {
	width: 22px;
	height: 22px;
}

.lg-menu-wrap {
	position: relative;
	flex: 0 0 auto;
}

.lg-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	background: #fff;
	border: 1px solid var(--lg-border);
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(20, 30, 60, 0.14);
	padding: 6px;
	display: none;
	z-index: 5;
	min-width: 150px;
}

.lg-menu.is-open {
	display: block;
}

.lg-menu__row {
	font-size: 13px;
	font-weight: 600;
	color: var(--lg-muted);
	padding: 4px 10px 2px;
}

.lg-menu button {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: none;
	background: transparent;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--lg-navy);
	cursor: pointer;
	font-family: inherit;
}

.lg-menu button:hover {
	background: #f4f5f9;
}

.lg-menu button.is-active {
	color: var(--lg-blue);
	font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.lg-card {
		flex-direction: column;
	}
	.lg-sidebar {
		flex-basis: auto;
	}
	#lautgebaerde.lg-root .lg-list {
		max-height: 300px;
	}
	.lg-detail__body {
		flex-direction: column;
		align-items: stretch;
	}
	.lg-figure {
		flex-basis: auto;
		max-width: 260px;
		margin: 0 auto;
	}
}

@media (max-width: 620px) {
	#lautgebaerde.lg-root {
		padding: 16px;
		border-radius: 18px;
	}
	.lg-card {
		padding: 16px;
		gap: 18px;
	}
	/* Auswahlliste: nur max. 3 Elemente sichtbar (Item 82px + 10px Gap + 8px Padding) */
	#lautgebaerde.lg-root .lg-list {
		max-height: 274px;
	}
	.lg-header {
		margin: 4px 2px 16px;
		gap: 14px;
	}
	.lg-search {
		flex-basis: 100%;
	}
	.lg-brand__subtitle {
		font-size: 15px;
	}

	/* Navigation: Buttons teilen sich die volle Breite */
	.lg-detail__top {
		flex-wrap: wrap;
		gap: 12px;
	}
	.lg-nav {
		flex: 1 1 100%;
	}
	.lg-nav .lg-btn {
		flex: 1 1 0;
		justify-content: center;
		padding: 0 12px;
	}

	.lg-info__head {
		gap: 12px;
		margin-bottom: 14px;
	}
	.lg-badge {
		width: 54px;
		height: 54px;
	}

	/* Audioplayer: Fortschrittsbalken bricht in eine zweite Reihe um */
	.lg-audio {
		gap: 14px;
		padding-top: 16px;
	}
	.lg-audio__play {
		width: 50px;
		height: 50px;
	}
	.lg-audio__controls {
		flex-wrap: wrap;
		row-gap: 12px;
	}
	.lg-audio__time {
		order: 0;
	}
	.lg-mute {
		margin-left: auto;
	}
	.lg-progress {
		order: 1;
		flex: 1 1 100%;
	}
}
