/*!
 * LingoRhythm Sprachwahl – Umschaltlinsen
 * Nur im WooCommerce-Bereich geladen.
 */

/* -------------------------------------------------------------------------
 * 1. Polylang-Switcher im Shop ausblenden
 *    (Floating Switcher von language-switcher-for-divi-polylang + Polylang)
 * ---------------------------------------------------------------------- */
.lsdp-language-switcher,
.lsdp-floating-switcher,
.lsdp-language-switcher-inner,
.pll-switcher,
.pll-language-switcher,
.pll-floating-switcher,
#polylang_switcher,
.widget_polylang,
.polylang-switcher {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * 2. Die Linsen
 * ---------------------------------------------------------------------- */
.lr-lenses {
	--lr-paper: var(--tw-color-paper, #fffbf4);
	--lr-creme: var(--tw-color-creme, #f5ead8);
	--lr-sand: var(--tw-color-sand, #eadfcb);
	--lr-terra: var(--tw-color-terra, #c67139);
	--lr-terra-t: var(--tw-color-terra-t, #9c5126);
	--lr-olive-tint: var(--tw-color-olive-tint, #ecefe2);
	--lr-olive-d: var(--tw-color-olive-d, #5c6b43);
	--lr-soft: var(--tw-color-soft, #6b625b);
	--lr-muted: var(--tw-color-muted, #766c64);

	margin: 22px 0 18px;
	padding: 16px 18px 14px;
	border: 1px solid var(--lr-sand);
	border-radius: 20px;
	background: var(--lr-paper);
	background: linear-gradient(180deg, var(--lr-paper) 0%, var(--lr-creme) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.55),
		0 10px 24px -22px rgba(90, 60, 20, 0.6);
	font-family: inherit;
	color: var(--lr-soft);
}

.lr-lenses *,
.lr-lenses *::before,
.lr-lenses *::after {
	box-sizing: border-box;
}

.lr-lenses__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.lr-lenses__label {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lr-muted);
	line-height: 1.2;
}

.lr-lenses__hint {
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1;
	color: var(--lr-olive-d);
	background: var(--lr-olive-tint);
	padding: 5px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.lr-lenses__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
	gap: 8px;
}

.lr-lens {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	padding: 10px 4px 9px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: transparent;
	color: inherit;
	text-decoration: none;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.lr-lens:hover,
.lr-lens:focus {
	text-decoration: none;
	color: inherit;
}

.lr-lens:focus-visible {
	outline: 3px solid var(--lr-terra);
	outline-offset: 2px;
}

.lr-lens.is-active {
	background: var(--lr-paper);
	border-color: var(--lr-sand);
	box-shadow: 0 6px 16px -14px rgba(120, 70, 30, 0.7);
}

.lr-lens__glass {
	position: relative;
	display: block;
	width: 54px;
	height: 54px;
	flex: none;
	padding: 3px;
	border-radius: 50%;
	background: linear-gradient(160deg, #fffefb, #f1e6d3);
	box-shadow:
		0 1px 2px rgba(80, 50, 20, 0.18),
		inset 0 0 0 1px rgba(120, 90, 50, 0.1);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lr-lens__glass img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

/* weicher Glasreflex */
.lr-lens__glass::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(120% 100% at 30% 16%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%);
}

/* Aktiv-Ring + Häkchen */
.lr-lens.is-active .lr-lens__glass {
	box-shadow:
		0 0 0 3px var(--lr-terra),
		0 8px 16px -8px rgba(156, 81, 38, 0.55);
	transform: translateY(-1px);
}

.lr-lens.is-active .lr-lens__glass::before {
	content: "";
	position: absolute;
	top: -7px;
	right: -7px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var(--lr-terra-t);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9' fill='none'%3E%3Cpath d='M1 4.4 4.2 7.6 11 1' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 11px 9px;
	box-shadow: 0 0 0 3px var(--lr-paper);
	z-index: 2;
}

.lr-lens__name {
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--lr-soft);
	text-align: center;
}

.lr-lens.is-active .lr-lens__name {
	color: var(--lr-terra-t);
}

.lr-lenses__foot {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--lr-muted);
}

.lr-lenses__foot svg {
	flex: none;
	margin-top: 1px;
	opacity: 0.75;
}

/* -------------------------------------------------------------------------
 * 3. Feineinstellung
 * ---------------------------------------------------------------------- */
@media (hover: hover) {
	.lr-lens:hover {
		background: var(--lr-paper);
		border-color: var(--lr-sand);
		transform: translateY(-1px);
	}

	.lr-lens.is-active:hover {
		transform: translateY(-1px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lr-lens,
	.lr-lens__glass {
		transition: none;
	}
}

@media (max-width: 480px) {
	.lr-lenses {
		margin: 18px 0 14px;
		padding: 14px 12px 12px;
		border-radius: 16px;
	}

	.lr-lenses__row {
		grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
		gap: 6px;
	}

	.lr-lens {
		padding: 8px 2px 7px;
	}

	.lr-lens__glass {
		width: 48px;
		height: 48px;
	}

	.lr-lens__name {
		font-size: 11.5px;
	}

	.lr-lenses__foot {
		font-size: 11.5px;
	}
}

/* Nachtmodus: die Theme-Variablen wechseln, nur der Glas-Grund braucht Hilfe. */
[data-theme="night"] .lr-lenses {
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.06),
		0 10px 24px -22px rgba(0, 0, 0, 0.8);
}

[data-theme="night"] .lr-lens__glass {
	background: linear-gradient(160deg, #3a332e, #2b2521);
}
