/* Widget „Pool-Übersicht“ – Gestaltung nach Mockup „Unsere Vielfalt“.
   Farben, Abstände und Schrift über Elementor (CSS-Variablen) anpassbar. */

.lf-pool-grid {
	--lf-card-bg: #00263e;
	--lf-card-text: #fff;
	--lf-card-icon: #6e9a87;
	--lf-card-radius: 14px;
	--lf-accent: #6e9a87;
	--lf-accent-text: #fff;
	--lf-heading: #00263e;
	--lf-panel-bg: rgba(238, 244, 241, 0.94);
	--lf-gap: 56px;
	position: relative;
	color: var(--lf-heading);
}

.lf-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lf-icon {
	display: block;
	width: 100%;
	height: 100%;
}

.lf-pool-grid__heading {
	margin: 0 0 24px;
	color: var(--lf-heading);
}

/* ---------- Werkzeuge ---------- */

.lf-pool-grid__tools {
	display: flex;
	gap: 24px;
	align-items: center;
	margin-bottom: 48px;
}

.lf-pool-grid__filter-toggle {
	position: relative;
	flex: none;
	width: 56px;
	height: 56px;
	padding: 15px;
	border: 0;
	border-radius: 50%;
	background: var(--lf-accent);
	color: var(--lf-accent-text);
	cursor: pointer;
}

.lf-pool-grid__filter-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--lf-heading);
	color: #fff;
	font-size: 12px;
	line-height: 20px;
}

.lf-pool-grid__search {
	display: flex;
	flex: 1;
	gap: 12px;
	align-items: center;
	max-width: 712px;
	margin-left: auto;
	padding: 0 20px;
	border: 1.5px solid var(--lf-accent);
	border-radius: 999px;
	color: var(--lf-accent);
}

.lf-pool-grid__search .lf-icon {
	flex: none;
	width: 26px;
	height: 26px;
}

.lf-pool-grid__search input {
	flex: 1;
	min-width: 0;
	height: 52px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--lf-heading);
	font: inherit;
	font-size: 18px;
	outline: none;
}

.lf-pool-grid__search input::placeholder {
	color: var(--lf-accent);
	font-style: italic;
}

.lf-pool-grid__search:focus-within {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lf-accent) 25%, transparent);
}

/* Hello-Theme legt um fokussierte Felder einen weißen Schatten und einen
   schwarzen Umriss – der überdeckt hier den Rahmen. Fokus zeigt das Feld
   selbst (Ring oben), die Schieber zeigen ihn am Griff. */
.lf-pool-grid .lf-pool-grid__search input:is(:focus, :focus-visible),
.lf-pool-grid .lf-range input[type="range"]:is(:focus, :focus-visible) {
	border: 0;
	box-shadow: none;
	outline: none;
}

.lf-range input[type="range"]:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 4px rgba(0, 38, 62, 0.25);
}

/* ---------- Karten ---------- */

.lf-pool-grid__body {
	position: relative;
	min-height: 200px;
}

.lf-pool-grid__cards {
	--lf-columns: 3;
	display: grid;
	grid-template-columns: repeat(var(--lf-columns), minmax(0, 1fr));
	gap: var(--lf-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.lf-pool-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 24px 24px 36px;
	border-radius: var(--lf-card-radius);
	background: var(--lf-card-bg);
	color: var(--lf-card-text);
}

.lf-pool-card[hidden] {
	display: none;
}

.lf-pool-card__head {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	min-height: 40px;
}

.lf-pool-card__title {
	margin: 0;
	padding-top: 8px;
	color: var(--lf-card-text);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
}

.lf-pool-card__title a {
	color: inherit;
	text-decoration: none;
}

.lf-pool-card__actions {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	display: grid;
	gap: 24px;
}

.lf-pool-card__wish,
.lf-pool-card__icon {
	display: block;
	width: 40px;
	height: 40px;
	padding: 4px;
	border: 0;
	background: none;
	color: var(--lf-card-icon);
	cursor: pointer;
}

.lf-pool-card__wish:hover,
.lf-pool-card__icon:hover,
.lf-pool-card__wish:focus-visible,
.lf-pool-card__icon:focus-visible {
	color: var(--lf-card-text);
}

.lf-heart-fill {
	fill: transparent;
	transition: fill 0.15s;
}

.lf-pool-card__wish.is-active .lf-heart-fill {
	fill: currentColor;
}

.lf-pool-card__image {
	--lf-image-height: 440px;
	flex: none;
	height: var(--lf-image-height);
	/* Rechts Platz für die Symbole (Herz, Telefon, Mail), links gleich viel –
	   so steht der Pool in der Mitte der Karte. */
	margin: 12px 56px 32px;
}

/* Ebenen (leer, Wasser) liegen deckungsgleich übereinander. */
.lf-pool-card__image {
	display: grid;
	place-items: center;
}

.lf-pool-card__layer {
	display: flex;
	grid-area: 1 / 1;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--lf-image-height);
	overflow: hidden;
}

.lf-pool-card__layer img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Querformatige Draufsicht hochkant: Bild drehen; seine Länge entspricht dann
   der Höhe der Ebene. Die Wasser-Maske liegt auf der ungedrehten Ebene, die
   Füllung läuft also immer von unten nach oben. */
.lf-pool-card__image.is-rotated .lf-pool-card__layer img {
	flex: none;
	width: var(--lf-image-height);
	max-width: none;
	height: auto;
	max-height: none;
	transform: rotate(90deg);
}

/* Draufsichten aus dem 3D-Modell sind eng zugeschnitten: gemäßigter Maßstab je
   Pool (--lf-scale aus den Pool-Längen), mit etwas Rand. */
.lf-pool-card__image.is-scaled .lf-pool-card__layer img {
	max-width: calc(92% * var(--lf-scale, 1));
	max-height: calc(92% * var(--lf-scale, 1));
}

.lf-pool-card__image.is-scaled.is-rotated .lf-pool-card__layer img {
	width: calc(var(--lf-image-height) * 0.92 * var(--lf-scale, 1));
	max-width: none;
	max-height: none;
}

/* ---------- Hover: Pool füllt sich von unten nach oben ---------- */

@property --lf-fill {
	syntax: "<percentage>";
	inherits: false;
	initial-value: 0%;
}

.lf-pool-card__layer.is-water {
	--lf-fill: 0%;
	/* Weiche Wasserlinie: unterhalb der Füllhöhe sichtbar, darüber ausgeblendet. */
	-webkit-mask-image: linear-gradient(to top, #000 var(--lf-fill), transparent calc(var(--lf-fill) + 6%));
	mask-image: linear-gradient(to top, #000 var(--lf-fill), transparent calc(var(--lf-fill) + 6%));
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	transition: --lf-fill var(--lf-fill-duration, 1.4s) cubic-bezier(0.3, 0.1, 0.25, 1);
	pointer-events: none;
}

.lf-pool-card:hover .lf-pool-card__layer.is-water,
.lf-pool-card:focus-within .lf-pool-card__layer.is-water,
.lf-pool-card.is-filled .lf-pool-card__layer.is-water {
	--lf-fill: 106%;
}

/* Ohne gefülltes Bild: Draufsicht wasserblau einfärben (Form aus dem Bild). */
.lf-pool-card__image.is-tinted .lf-pool-card__layer.is-water img {
	visibility: hidden;
}

.lf-pool-card__image.is-tinted .lf-pool-card__layer.is-water::after {
	position: absolute;
	inset: 0;
	content: "";
}

.lf-pool-card__image.is-tinted .lf-pool-card__layer.is-water {
	position: relative;
}

.lf-pool-card__image.is-tinted .lf-pool-card__layer.is-water img {
	visibility: visible;
	filter: sepia(1) hue-rotate(160deg) saturate(2.4) brightness(0.72);
	opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
	.lf-pool-card__layer.is-water {
		transition: none;
	}
}

.lf-pool-card__buttons {
	display: grid;
	gap: 22px;
	justify-items: center;
}

.lf-pool-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 210px);
	min-height: 56px;
	padding: 0 20px;
	border: 1.5px solid var(--lf-accent);
	border-radius: 999px;
	color: var(--lf-card-text);
	font-size: 18px;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

.lf-pool-card__button.is-primary {
	background: var(--lf-accent);
	color: var(--lf-accent-text);
}

.lf-pool-card__button.is-secondary:hover,
.lf-pool-card__button.is-secondary:focus-visible {
	background: var(--lf-accent);
	color: var(--lf-accent-text);
}

.lf-pool-card__button.is-primary:hover,
.lf-pool-card__button.is-primary:focus-visible {
	filter: brightness(1.08);
}

.lf-pool-grid__empty {
	margin: 32px 0;
	text-align: center;
}

/* ---------- Filter ---------- */

.lf-pool-grid__body:has(> .lf-pool-filter:not([hidden])) {
	position: static;
}

/* Offen liegt das Panel über Überschrift und Karten (wie ein Vorhang von
   links): Fläche bis an den linken Fensterrand, Inhalte bündig mit der
   Spalte. --lf-panel-lift verlängert die Fläche nach oben bis zur Menüleiste. */
.lf-pool-filter {
	--lf-panel-lift: 0px;
	position: absolute;
	top: calc(-1 * var(--lf-panel-lift));
	left: 0;
	z-index: 5;
	display: grid;
	align-content: start;
	width: min(100%, 640px);
	min-height: calc(100% + var(--lf-panel-lift));
	padding: var(--lf-panel-lift) 40px 40px 0;
	background: var(--lf-panel-bg);
	box-shadow: 40px 0 40px -30px rgba(238, 244, 241, 0.9);
	backdrop-filter: blur(2px);
}

.lf-pool-filter::before {
	position: absolute;
	top: 0;
	right: 100%;
	bottom: 0;
	width: 100vw;
	background: var(--lf-panel-bg);
	backdrop-filter: blur(2px);
	content: "";
}

.lf-pool-filter[hidden] {
	display: none;
}

/* Ein- und Ausblenden: Vorhang gleitet von links herein, Inhalte folgen
   leicht versetzt; beim Schließen zügiger hinaus. */
.lf-pool-filter {
	opacity: 0;
	transform: translateX(-48px);
	transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 1, 1);
}

.lf-pool-filter.is-open {
	opacity: 1;
	transform: none;
	transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lf-pool-filter__head,
.lf-pool-filter__list > * {
	opacity: 0;
	transform: translateX(-16px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.lf-pool-filter.is-open .lf-pool-filter__head,
.lf-pool-filter.is-open .lf-pool-filter__list > * {
	opacity: 1;
	transform: none;
	transition: opacity 0.4s ease var(--lf-delay, 0s), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) var(--lf-delay, 0s);
}

.lf-pool-filter.is-open .lf-pool-filter__head { --lf-delay: 0.05s; }
.lf-pool-filter.is-open .lf-pool-filter__list > :nth-child(1) { --lf-delay: 0.1s; }
.lf-pool-filter.is-open .lf-pool-filter__list > :nth-child(2) { --lf-delay: 0.15s; }
.lf-pool-filter.is-open .lf-pool-filter__list > :nth-child(3) { --lf-delay: 0.2s; }
.lf-pool-filter.is-open .lf-pool-filter__list > :nth-child(4) { --lf-delay: 0.25s; }
.lf-pool-filter.is-open .lf-pool-filter__list > :nth-child(n + 5) { --lf-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
	.lf-pool-filter,
	.lf-pool-filter.is-open,
	.lf-pool-filter__head,
	.lf-pool-filter__list > *,
	.lf-pool-filter.is-open .lf-pool-filter__head,
	.lf-pool-filter.is-open .lf-pool-filter__list > * {
		transform: none;
		transition: opacity 0.15s ease;
	}
}

/* Bleibt beim Scrollen der Seite im Bild; die Liste darunter scrollt in sich. */
.lf-pool-filter__inner {
	position: sticky;
	top: 16px;
	display: flex;
	flex-direction: column;
	gap: 40px;
	max-height: calc(100vh - 32px);
}

.lf-pool-filter__list {
	display: grid;
	flex: 1 1 auto;
	gap: 40px;
	align-content: start;
	min-height: 0;
	/* Rand für Fokusrahmen und Scrollleiste. */
	margin: -4px -24px 0 -4px;
	padding: 4px 24px 4px 4px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: var(--lf-accent) transparent;
	scrollbar-width: thin;
}

.lf-pool-filter__head {
	flex: none;
	display: flex;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
}

.lf-pool-filter__close {
	width: 56px;
	height: 56px;
	padding: 14px;
	border: 0;
	border-radius: 50%;
	background: var(--lf-accent);
	color: var(--lf-accent-text);
	cursor: pointer;
}

.lf-pool-filter__reset {
	min-height: 56px;
	padding: 0 34px;
	border: 1.5px solid var(--lf-accent);
	border-radius: 999px;
	background: transparent;
	color: var(--lf-heading);
	font: inherit;
	font-size: 16px;
	cursor: pointer;
}

.lf-pool-filter__group {
	margin: 0;
	padding: 0;
	border: 0;
}

.lf-pool-filter__title {
	margin-bottom: 20px;
	padding: 0;
	color: var(--lf-heading);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.1;
}

.lf-range__row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 20px;
	align-items: start;
	font-size: 16px;
}

.lf-range__bound {
	line-height: 20px;
}

.lf-range__track {
	--lf-from: 0%;
	--lf-to: 100%;
	position: relative;
	height: 56px;
}

/* Grundlinie und aktiver Bereich */
.lf-range__track::before,
.lf-range__fill {
	position: absolute;
	top: 8px;
	height: 4px;
	border-radius: 2px;
	content: "";
}

.lf-range__track::before {
	right: 0;
	left: 0;
	background: var(--lf-accent);
}

.lf-range__fill {
	right: calc(100% - var(--lf-to));
	left: var(--lf-from);
	background: var(--lf-heading);
}

.lf-range input[type="range"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 20px;
	margin: 0;
	background: none;
	pointer-events: none;
	appearance: none;
}

.lf-range input[type="range"]::-webkit-slider-thumb {
	width: 18px;
	height: 18px;
	border: 0;
	border-radius: 50%;
	background: var(--lf-heading);
	cursor: grab;
	pointer-events: auto;
	appearance: none;
}

.lf-range input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: 0;
	border-radius: 50%;
	background: var(--lf-heading);
	cursor: grab;
	pointer-events: auto;
}

.lf-range input[type="range"]:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 4px rgba(0, 38, 62, 0.25);
}

.lf-range__value {
	position: absolute;
	top: 30px;
	transform: translateX(-50%);
	white-space: nowrap;
}

.lf-range__value--from {
	left: var(--lf-from);
}

.lf-range__value--to {
	left: var(--lf-to);
}

.lf-pool-filter__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 28px;
}

.lf-pool-filter__chip input {
	position: absolute;
	opacity: 0;
}

.lf-pool-filter__chip span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 132px;
	min-height: 52px;
	padding: 0 20px;
	border: 1.5px solid var(--lf-accent);
	border-radius: 999px;
	color: var(--lf-heading);
	font-size: 17px;
	cursor: pointer;
}

.lf-pool-filter__chip input:checked + span {
	background: var(--lf-accent);
	color: var(--lf-accent-text);
}

.lf-pool-filter__chip input:focus-visible + span {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lf-accent) 40%, transparent);
}

/* Eigenschaften: Symbol mit Name, (i) für die Beschreibung. */

.lf-feature__filter {
	position: absolute;
	width: 0;
	height: 0;
}

.lf-pool-filter__features {
	display: grid;
	grid-template-columns: repeat(3, 120px);
	gap: 24px 48px;
	align-items: start;
}

.lf-feature {
	position: relative;
}

.lf-feature__pick {
	display: grid;
	gap: 8px;
	cursor: pointer;
}

.lf-feature__pick input {
	position: absolute;
	opacity: 0;
}

.lf-feature__icon {
	display: block;
	aspect-ratio: 1;
	border: 1.5px solid var(--lf-heading);
	background: #fff;
}

/* Symbole bringen ihren Rahmen selbst mit. */
.lf-feature__icon:has(img) {
	border: 0;
	background: none;
}

.lf-feature__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.lf-feature__name {
	padding-right: 30px;
	overflow-wrap: anywhere;
	color: var(--lf-heading);
	font-size: 17px;
	line-height: 26px;
}

.lf-feature__pick input:checked ~ .lf-feature__icon {
	border-color: var(--lf-accent);
}

.lf-feature__pick input:checked ~ .lf-feature__icon img {
	filter: var(--lf-tint);
}

.lf-feature__pick input:checked ~ .lf-feature__name {
	color: var(--lf-accent);
	font-weight: 700;
}

.lf-feature__pick input:focus-visible ~ .lf-feature__icon {
	outline: 2px solid var(--lf-heading);
	outline-offset: 3px;
}

.lf-pool-grid .lf-feature__info {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--lf-heading);
	cursor: pointer;
}

.lf-pool-grid .lf-feature__info:is(:hover, :focus, :active),
.lf-pool-grid .lf-feature__info[aria-expanded="true"] {
	background: none;
	color: var(--lf-accent);
}

.lf-feature__tip {
	position: absolute;
	top: calc(100% - 4px);
	left: -60px;
	z-index: 2;
	width: 200px;
	padding: 14px 18px 16px;
	background: var(--lf-card-bg);
	color: var(--lf-card-text);
	font-size: 15px;
	line-height: 1.4;
	box-shadow: 0 8px 24px rgba(0, 38, 62, 0.2);
}

.lf-feature__tip[hidden] {
	display: none;
}

.lf-feature__tip strong {
	display: block;
	margin-bottom: 6px;
	font-size: 17px;
}

.lf-feature__tip p {
	margin: 0;
}

.lf-feature:nth-child(3n + 1) .lf-feature__tip {
	left: 0;
}

.lf-feature:nth-child(3n) .lf-feature__tip {
	right: 0;
	left: auto;
}

/* ---------- Kleine Bildschirme ---------- */

/* Themes färben Buttons bei Hover/Fokus ein (Hello: Pink) – hier zurücksetzen. */
.lf-pool-grid .lf-pool-grid__filter-toggle:is(:hover, :focus, :active),
.lf-pool-grid .lf-pool-filter__close:is(:hover, :focus, :active) {
	background: var(--lf-accent);
	color: var(--lf-accent-text);
	filter: brightness(1.06);
}

.lf-pool-grid .lf-pool-filter__reset:is(:hover, :focus, :active) {
	background: var(--lf-accent);
	color: var(--lf-accent-text);
}

.lf-pool-grid .lf-pool-card__wish:is(:hover, :focus, :active) {
	background: none;
}

.lf-pool-grid button:focus-visible {
	outline: 2px solid var(--lf-heading);
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.lf-pool-card__image {
		--lf-image-height: 340px;
	}

	.lf-pool-grid__tools {
		gap: 12px;
		margin-bottom: 28px;
	}

	.lf-pool-grid__filter-toggle,
	.lf-pool-filter__close {
		width: 48px;
		height: 48px;
		padding: 12px;
	}

	.lf-pool-grid__search input {
		height: 46px;
		font-size: 16px;
	}

	.lf-pool-filter {
		position: fixed;
		inset: 0;
		width: auto;
		min-height: 0;
		padding: 20px;
		overflow-y: auto;
		background: #eef4f1;
		box-shadow: none;
		overflow: hidden;
		grid-template-rows: minmax(0, 1fr);
	}

	.lf-pool-filter__inner {
		position: static;
		gap: 28px;
		max-height: none;
	}

	.lf-pool-filter__list {
		gap: 28px;
	}

	.lf-pool-filter::before {
		display: none;
	}

	/* Handy: bildschirmfüllend von links hereinfahren. */
	.lf-pool-filter {
		opacity: 1;
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 1, 1);
	}

	.lf-pool-filter.is-open {
		transform: none;
		transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
	}

	.lf-pool-filter__title {
		font-size: 26px;
	}

	.lf-pool-filter__features {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px 16px;
	}

	.lf-pool-filter__chip span {
		min-width: 0;
		min-height: 46px;
		font-size: 16px;
	}

	.lf-pool-filter__chips {
		gap: 12px;
	}
}
