/* =====================================================================
   Ferienlotse: Bewertungen im neuen Stil, Gäste-Liebling,
   Vollbild-Ansichten auf dem Handy (Stand 2026-11)
   ===================================================================== */

.fl-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* ---------- Note: "★ 4,6 · 15 Bewertungen" ---------- */
.fl-rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font: 500 15px/1.3 var(--beon-font-family);
	color: var(--beon-primary-text-color);
	white-space: nowrap;
}
.fl-rating .fl-icon--star { width: 15px; height: 15px; flex-shrink: 0; }
.fl-rating-value { font-weight: 700; }
.fl-rating--m { font-size: 18px; }
.fl-rating--m .fl-icon--star { width: 20px; height: 20px; }
.fl-rating--heading { font: inherit; gap: 8px; }
.fl-rating--heading .fl-icon--star { width: 0.95em; height: 0.95em; }
.fl-rating--heading .fl-rating-value { font-weight: 700; }

a.fl-rating-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: inherit;
	text-decoration: none;
}
a.fl-rating-link .fl-rating-count { text-decoration: underline; text-underline-offset: 3px; }

/* Kopfzeile der Detailseite */
.unit-top-row .rating-wrapper,
.mobile-unit-top-row .rating-wrapper { align-items: center; flex-wrap: wrap; }
.mobile-unit-top-row .rating-wrapper { margin-bottom: 20px; }

/* Karten: Footer */
.info-footer .rating-wrapper { align-items: center; }

/* ---------- Badge "Gäste-Liebling" ---------- */
.fl-badge-liebling,
.image-wrapper .liebling-highlight-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background-color: var(--beon-yellow-light, #FFEFD1);
	color: #8A5A00; /* dunkles Gelbbraun: 5,2:1 Kontrast auf Hellgelb */
	white-space: nowrap;
	cursor: default;
}
.fl-badge-liebling {
	padding: 6px 11px 6px 8px;
	border-radius: var(--beon-border-radius-small);
	font: 700 var(--beon-font-size-small)/1.2 var(--beon-font-family);
}
.image-wrapper .liebling-highlight-wrapper {
	padding: 6px 10px 6px 8px;
	border-radius: var(--beon-listing-img-marker-border-radius);
	box-shadow: var(--beon-listing-img-marker-shadow);
	font: var(--beon-listing-img-marker-font);
}
.fl-badge-liebling .fl-icon--award,
.image-wrapper .liebling-highlight-wrapper .fl-icon--award { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- Gäste-Liebling-Hervorhebung im Bewertungsbereich ---------- */
#bewertungen { scroll-margin-top: 120px; }

.fl-liebling {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 8px 0 32px;
	color: var(--beon-primary-text-color);
}
.fl-liebling-score { display: flex; align-items: center; gap: 8px; }
.fl-grass { width: 56px; height: 84px; flex-shrink: 0; color: var(--beon-primary-text-color); }
.fl-liebling-number { font: 700 72px/1 var(--beon-font-family); letter-spacing: -1px; }
.fl-liebling-title { margin-top: 10px; font: 400 36px/1.2 var(--beon-font-family-highlight); }
.fl-liebling-text {
	max-width: 420px;
	margin: 8px 0 0;
	font: 500 17px/26px var(--beon-font-family);
	color: var(--beon-search-p-text-color, #435E74);
}
.fl-liebling-count { margin-top: 14px; font: 700 15px var(--beon-font-family); }

/* ---------- Unterkategorien ---------- */
.fl-cats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 48px;
	row-gap: 18px;
	padding: 24px 0 28px;
	color: var(--beon-primary-text-color);
}
.fl-liebling + .fl-cats { border-top: 1px solid var(--beon-border-color); }
.fl-cat { display: flex; align-items: center; gap: 12px; }
.fl-cat .fl-icon { width: 22px; height: 22px; flex-shrink: 0; }
.fl-cat-label { width: 128px; font: 500 16px var(--beon-font-family); }
.fl-cat-bar { flex: 1; height: 4px; border-radius: 2px; background: #E2E8ED; overflow: hidden; }
.fl-cat-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--beon-primary-text-color); }
.fl-cat-value { width: 30px; text-align: right; font: 700 16px var(--beon-font-family); }

/* ---------- Bewertungskarten ---------- */
.fl-reviews { color: var(--beon-primary-text-color); }
.fl-reviews--grid {
	position: relative; /* hält unsichtbare Screenreader-Texte im Wisch-Container */
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 56px;
	row-gap: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--beon-border-color);
}
.fl-review { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fl-review-head { display: flex; align-items: center; gap: 12px; }
.fl-avatar {
	display: block;
	width: 48px; height: 48px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
}
.fl-avatar svg { display: block; width: 100%; height: 100%; }
.fl-review-who { min-width: 0; }
.fl-review-name { font: 700 16px/22px var(--beon-font-family); }
.fl-review-city { font: 500 14px/20px var(--beon-font-family); color: var(--beon-search-p-text-color, #435E74); }
.fl-review-meta { display: flex; align-items: center; gap: 6px; font: 500 14px/20px var(--beon-font-family); }
.fl-review-meta .fl-icon--star { width: 14px; height: 14px; }
.fl-review-meta strong { font-weight: 700; }
.fl-review-date { color: var(--beon-search-p-text-color, #435E74); }
.fl-review-text { margin: 0; font: 400 16px/25px var(--beon-font-family); overflow-wrap: anywhere; }
.fl-review-text.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	overflow: hidden;
}
.fl-review-text.is-clamped.is-expanded { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.fl-review-actions { display: flex; flex-wrap: wrap; gap: 20px; }
.fl-review-actions:empty { display: none; }
button.fl-linkbtn.fl-linkbtn {
	border-radius: 0;
	line-height: 1.3;
	text-transform: none;
	box-shadow: none;
	min-height: 32px;
	padding: 6px 0;
	border: 0;
	background: none;
	font: 700 15px var(--beon-font-family);
	color: var(--beon-primary-text-color);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
button.fl-linkbtn.fl-linkbtn:hover, button.fl-linkbtn.fl-linkbtn:focus { background: none; color: var(--beon-primary-text-color); border: 0; box-shadow: none; }
button.fl-linkbtn.fl-linkbtn[hidden] { display: none; }
button.fl-linkbtn.fl-linkbtn--muted, button.fl-linkbtn.fl-linkbtn--muted:hover, button.fl-linkbtn.fl-linkbtn--muted:focus { font-weight: 500; color: var(--beon-search-p-text-color, #435E74); }
.fl-review-answer {
	padding: 14px 16px;
	border: 1px solid var(--beon-border-color);
	border-radius: var(--beon-border-radius-small);
	background: #fff;
	font: 400 15px/23px var(--beon-font-family);
	animation: flFade .15s ease-out;
}
.fl-review-answer[hidden] { display: none; }
.fl-review-answer-title { margin-bottom: 4px; font-weight: 700; }

/* Liste im Popup */
.fl-reviews--list .fl-review { padding: 22px 0; border-bottom: 1px solid var(--beon-border-color); }
.fl-reviews--list .fl-review:last-child { border-bottom: 0; }

/* Zweitrangiger Button im Stil von "Weitere Bewertungen zeigen" */
.fl-reviews-more { margin-top: 36px; }
button.fl-btn-secondary.fl-btn-secondary {
	line-height: 1;
	text-transform: none;
	box-shadow: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 22px;
	border: var(--beon-unit-section-button-border);
	border-radius: var(--beon-unit-section-button-border-radius);
	background-color: #fff;
	color: var(--beon-primary-text-color);
	font: 700 16px var(--beon-font-family);
	cursor: pointer;
	transition: background-color .12s ease, transform .08s ease;
}
button.fl-btn-secondary.fl-btn-secondary:hover, button.fl-btn-secondary.fl-btn-secondary:focus { border: var(--beon-unit-section-button-border); background-color: #F4F6F8; color: var(--beon-primary-text-color); }
button.fl-btn-secondary.fl-btn-secondary:active { transform: scale(.98); }
.fl-btn-secondary .fl-icon { width: 18px; height: 18px; }

/* ---------- Popup "Alle Bewertungen" (Desktop) ---------- */
@media only screen and (min-width: 1201px) {
	#beon-unit-reviews .beon-unit-popup-content { width: 680px; max-width: 80vw; min-width: 0; }
}
.beon-unit-popup #reviews-popup-close {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	top: -42px;
	right: calc(-1 * (100% + 10px));
	width: 32px;
	height: 32px;
	padding: 10px;
	z-index: 2;
	cursor: pointer;
	border: var(--beon-popup-close-border);
	border-radius: var(--beon-popup-close-border-radius);
	box-shadow: var(--beon-popup-close-shadow);
	background-color: var(--beon-popup-close-bg-color);
}
.beon-unit-popup #reviews-popup-close img { filter: var(--beon-popup-close-icon-filter); }
.beon-unit-popup [id$="-popup-close"]:focus-visible { outline: 2px solid var(--beon-primary-text-color); outline-offset: 2px; }

/* "Schließen" am Ende jeder Vollbild-Ansicht (nur Handy, siehe unten) */
button.fl-popup-endclose.fl-popup-endclose { display: none; }

@keyframes flFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes flSheetIn { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* =====================================================================
   Tablet und Handy (gleiche Grenze wie das Theme: 1200px)
   ===================================================================== */
@media only screen and (max-width: 1200px) {

	/* Bewertungsbereich standardmäßig aufgeklappt */
	body.single-unit .unit-wrap-ratings .wrap-ratings-content { display: block; }

	/* ----- Vollbild statt Popup ----- */
	body.single-unit #beon-unit-popup-overlay { z-index: 100000; }

	body.single-unit .beon-unit-popup {
		position: fixed;
		top: 0; right: 0; bottom: 0; left: 0;
		width: auto;
		height: 100vh;
		height: 100dvh;
		max-width: none;
		margin: 0;
		padding: 0;
		transform: none;
		border: 0;
		border-radius: 0;
		background-color: #fff;
		overflow: hidden;
		z-index: 100001;
		animation: flSheetIn .18s cubic-bezier(.2, .8, .2, 1);
	}

	/* Kopfleiste: Titel links, Schließen rechts, unter Notch/Statusleiste geschützt */
	body.single-unit .beon-unit-popup .beon-unit-popup-headline {
		box-sizing: border-box;
		min-height: calc(68px + env(safe-area-inset-top));
		margin: 0;
		padding: calc(12px + env(safe-area-inset-top)) calc(76px + env(safe-area-inset-right)) 12px calc(20px + env(safe-area-inset-left));
		border-bottom: 1px solid var(--beon-border-color);
		font: 700 19px/1.3 var(--beon-font-family);
	}
	body.single-unit .beon-unit-popup hr.beon-unit-popup-hr { display: none; }

	body.single-unit .beon-unit-popup #description-popup-close,
	body.single-unit .beon-unit-popup #properties-popup-close,
	body.single-unit .beon-unit-popup #map-popup-close,
	body.single-unit .beon-unit-popup #location-popup-close,
	body.single-unit .beon-unit-popup #reviews-popup-close {
		position: absolute;
		top: calc(10px + env(safe-area-inset-top));
		right: calc(12px + env(safe-area-inset-right));
		left: auto;
		box-sizing: border-box;
		width: 48px;
		height: 48px;
		padding: 0;
		border: 1px solid var(--beon-border-color);
		border-radius: 50%;
		background-color: #fff;
		box-shadow: none;
		z-index: 3;
	}
	body.single-unit .beon-unit-popup [id$="-popup-close"] img { width: 16px; height: 16px; }
	body.single-unit .beon-unit-popup [id$="-popup-close"]:active { background-color: #E2E8ED; }

	/* Inhalt nutzt die volle Höhe und scrollt für sich */
	body.single-unit .beon-unit-popup .beon-unit-popup-content {
		position: absolute;
		top: calc(68px + env(safe-area-inset-top));
		right: 0; bottom: 0; left: 0;
		box-sizing: border-box;
		width: auto;
		min-width: 0;
		max-width: none;
		max-height: none;
		margin: 0;
		padding: 16px calc(20px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	body.single-unit button.fl-popup-endclose.fl-popup-endclose { display: flex; width: 100%; margin-top: 28px; }

	/* Seite dahinter scrollt nicht mit */
	html.fl-popup-open,
	html.fl-popup-open body { overflow: hidden; }
}

/* =====================================================================
   Handy
   ===================================================================== */
@media only screen and (max-width: 767px) {
	.fl-liebling { padding-bottom: 20px; }
	.fl-liebling-number { font-size: 52px; }
	.fl-grass { width: 38px; height: 57px; }
	.fl-liebling-title { margin-top: 6px; font-size: 28px; }
	.fl-liebling-text { font-size: 15px; line-height: 22px; }

	.fl-cats { grid-template-columns: 1fr; row-gap: 12px; padding: 18px 0; }
	.fl-cat .fl-icon { display: none; }
	.fl-cat-label { width: 124px; font-size: 15px; }
	.fl-cat-value { font-size: 15px; }

	/* Bewertungen wischbar nebeneinander */
	.fl-reviews--grid {
		display: flex;
		align-items: flex-start;
		gap: 12px;
		margin: 0 -20px;
		padding: 20px 20px 4px;
		border-top: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 20px;
		scrollbar-width: none;
	}
	.fl-reviews--grid::-webkit-scrollbar { display: none; }
	.fl-reviews--grid .fl-review {
		flex: 0 0 min(290px, 82vw);
		box-sizing: border-box;
		padding: 18px;
		border: 1px solid var(--beon-border-color);
		border-radius: var(--beon-border-radius-small);
		background-color: #fff;
		scroll-snap-align: start;
	}
	.fl-reviews--grid .fl-avatar { width: 44px; height: 44px; }
	.fl-reviews--grid .fl-review-text { font-size: 15px; line-height: 22px; }

	.fl-reviews-more { margin-top: 20px; }
	.fl-reviews-more button.fl-btn-secondary.fl-btn-secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	body.single-unit .beon-unit-popup,
	.fl-review-answer { animation: none; }
	button.fl-btn-secondary.fl-btn-secondary { transition: none; }
}
