/*
 * Detailseite einer Unterkunft (unterkunft.php, Vorlage objektseite.html aus Webflow):
 * Bildergalerie, gruppierte Ausstattung, ähnliche Unterkünfte.
 * Eigene Datei, da work-n-home-2026-redesign.css aus dem Webflow-Export kommt.
 */

#buchung-pruefen {
	scroll-margin-top: 24px;
}

.code-embed-2 {
	margin-bottom: 40px !important;
}

/* ---------- Bildergalerie ---------- */

.wnh-gallery {
	display: block;
	min-width: 0;
}

.wnh-gallery-stage {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background-color: #f4ece3;
}

.wnh-gallery-track {
	display: flex;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	/* keine max-height: sie würde über das Seitenverhältnis die Breite verkleinern */
	aspect-ratio: 3 / 2;
}

.wnh-gallery-track::-webkit-scrollbar {
	display: none;
}

.wnh-gallery-track:focus-visible {
	outline: 3px solid #f7a51a;
	outline-offset: -3px;
}

.wnh-gallery-slide {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	cursor: zoom-in;
}

.wnh-gallery-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wnh-gallery-arrow {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .92);
	color: #17212b;
	box-shadow: 0 6px 18px rgba(23, 33, 43, .18);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color .2s, transform .2s;
}

.wnh-gallery-arrow:hover {
	background-color: #f7a51a;
}

.wnh-gallery-arrow:focus-visible {
	outline: 3px solid #183247;
	outline-offset: 2px;
}

.wnh-gallery-arrow--prev {
	left: 14px;
}

.wnh-gallery-arrow--next {
	right: 14px;
}

.wnh-gallery-counter {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 3px 10px;
	border-radius: 999px;
	background-color: rgba(23, 33, 43, .72);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
	pointer-events: none;
}

.wnh-gallery-thumbs {
	display: flex;
	gap: 12px;
	margin-top: 14px;
	padding-bottom: 4px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.wnh-gallery-thumb {
	position: relative;
	flex: 0 0 calc((100% - 48px) / 5);
	aspect-ratio: 3 / 2;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 9px;
	background-color: #f4ece3;
	opacity: .6;
	cursor: pointer;
	scroll-snap-align: start;
	transition: opacity .2s;
}

.wnh-gallery-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wnh-gallery-thumb:hover,
.wnh-gallery-thumb.is-active {
	opacity: 1;
}

.wnh-gallery-thumb.is-active::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 3px solid #f7a51a;
	border-radius: 9px;
}

.wnh-gallery-thumb:focus-visible {
	outline: 3px solid #183247;
	outline-offset: 2px;
}

@media screen and (max-width: 767px) {
	.wnh-gallery-arrow {
		width: 38px;
		height: 38px;
	}

	.wnh-gallery-arrow--prev {
		left: 8px;
	}

	.wnh-gallery-arrow--next {
		right: 8px;
	}

	.wnh-gallery-thumbs {
		gap: 8px;
		margin-top: 10px;
	}

	.wnh-gallery-thumb {
		flex-basis: calc((100% - 24px) / 4);
	}
}

/* ---------- Ausstattung (gruppiert) ---------- */

.ausstattung-gruppe {
	margin-top: 28px;
}

.ausstattung-gruppe:first-child {
	margin-top: 24px;
}

/* Gruppentitel: kleine Versalien in Orange mit auslaufender Linie */
.ausstattung-gruppe-titel {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 12px;
	color: #c47c00;
	font-family: Figtree, sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.ausstattung-gruppe-titel::after {
	content: "";
	flex: 1;
	height: 1px;
	background-color: #eddcc8;
}

.ausstattung-gruppe .list-ausstattung-left {
	margin-top: 0;
	margin-bottom: 0;
}

.list-item-ausstattung {
	min-width: 0;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.wnh-amenity-icon .ausstattung-icon {
	width: 20px;
	height: 20px;
	fill: currentColor;
	color: currentColor;
}

/* ---------- Grundriss / Beschreibung ---------- */

/* Nur einer der beiden Blöcke vorhanden: volle Breite */
.objektseite-grid.wnh-objekt-grid-single,
.wnh-objekt-info-grid.wnh-objekt-grid-single {
	grid-template-columns: minmax(0, 1fr);
}

/* ---------- Nachbarschaft / Verkehrsmittel als Kacheln ---------- */

/* Zweite Kachelreihe direkt unter Grundriss & Beschreibung. Abstand darüber wie über der
   Grundriss-Reihe: Ausstattung hat 36px margin-bottom (fällt mit 35px margin-top zusammen),
   Grundriss-Reihe sonst 38px margin-bottom */
.wnh-objekt-info-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
	align-items: stretch;
	margin-top: 0;
	margin-bottom: 38px;
}

.objektseite-grid:has(+ .wnh-objekt-info-grid) {
	margin-bottom: 36px;
}

/* Kacheln im Stil von "Über die Unterkunft" (.objekt-beschreibungstext) statt Abschnitten mit Trennlinie */
.wnh-objekt-info-grid .div-nachbarschaft,
.wnh-objekt-info-grid .div-verkehrsmittel {
	margin: 0;
	padding: 30px;
	border: 1px solid #f0e3d3;
	border-radius: 18px;
	background-color: #fff;
}

.wnh-objekt-info-grid .h2-objektbeschreibung {
	margin-top: 0;
}

.wnh-objekt-info-grid p:last-child {
	margin-bottom: 0;
}

@media screen and (max-width: 991px) {
	.wnh-objekt-info-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}
}

@media screen and (max-width: 479px) {
	.wnh-objekt-info-grid .div-nachbarschaft,
	.wnh-objekt-info-grid .div-verkehrsmittel {
		padding: 22px 20px;
	}
}

/* ---------- Ähnliche Unterkünfte ---------- */

.wnh-similar {
	margin-top: 24px;
	padding-top: 48px;
	border-top: 1px solid #f0e3d3;
}

.wnh-similar-lead {
	margin-bottom: 28px;
}

/* ---------- Buchungsmaske: Vorschau bis zum Laden (Zwei-Klick-Lösung) ---------- */

.wnh-booking-consent {
	position: relative;
	margin-bottom: 40px;
}

/* Während des Ladens: Formular unsichtbar hinter der Vorschau, bis das iFrame seine Höhe hat */
.wnh-booking-consent.is-loading [data-booking-target] {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	visibility: hidden;
}

/* Breite wie das iFrame (BookingToolIframe.js setzt max-width: 1000px) */
.wnh-booking-placeholder {
	position: relative;
	max-width: 1000px;
	overflow: hidden;
	container-type: inline-size;
}

/* Schmal wird das Formular sehr lang: Vorschau begrenzen und nach unten ausblenden */
@media screen and (max-width: 767px) {
	.wnh-booking-placeholder {
		max-height: 640px;
	}

	.wnh-booking-placeholder::after {
		content: "";
		position: absolute;
		right: 0;
		bottom: 0;
		left: 0;
		height: 120px;
		background: linear-gradient(rgba(255, 255, 255, 0), #fff);
		pointer-events: none;
	}
}

/* Vorschau im Aufbau des Smoobu-Formulars: Suchleiste, darunter Unterkunft und Kontaktformular */
.wnh-bf {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding: 15px;
	color: #8a8a8a;
	font-size: 15px;
	line-height: 1.3;
	filter: blur(1px);
	opacity: .7;
	user-select: none;
	pointer-events: none;
}

.wnh-bf-box {
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
}

.wnh-bf-search {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: end;
	gap: 30px;
	padding-top: 40px;
}

.wnh-bf-close {
	position: absolute;
	top: 17px;
	right: 16px;
	width: 14px;
	height: 14px;
	border: 1.5px solid #3b82c4;
	border-radius: 50%;
}

.wnh-bf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.wnh-bf-label {
	color: #8a8a8a;
}

.wnh-bf-input {
	display: flex;
	align-items: center;
	height: 38px;
	padding: 0 12px;
	overflow: hidden;
	border: 1px solid #ccc;
	border-radius: 4px;
	color: #333;
	white-space: nowrap;
}

.wnh-bf-input.is-placeholder {
	color: #aaa;
}

.wnh-bf-input.is-date {
	justify-content: space-between;
}

.wnh-bf-input.is-date::after {
	content: "";
	width: 12px;
	height: 12px;
	border: 1.5px solid #999;
	border-top-width: 3px;
	border-radius: 2px;
}

.wnh-bf-input.is-select {
	justify-content: space-between;
}

.wnh-bf-input.is-select::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-right: 1.5px solid #333;
	border-bottom: 1.5px solid #333;
	transform: rotate(45deg);
}

.wnh-bf-input.is-textarea {
	align-items: flex-start;
	height: 84px;
	padding-top: 10px;
}

.wnh-bf-submit,
.wnh-bf-book {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	border-radius: 4px;
	background-color: #f7a720;
	color: #fff;
}

.wnh-bf-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
	align-items: start;
	gap: 30px;
}

.wnh-bf-apartment img,
.wnh-bf-image {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	background-color: #eee;
}

.wnh-bf-name {
	margin: 18px 0 20px;
	color: #222;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
}

.wnh-bf-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
}

.wnh-bf-meta span {
	width: 14px;
	height: 10px;
	border: 1.5px solid #666;
	border-radius: 3px;
}

.wnh-bf-contact {
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.wnh-bf-heading {
	margin: 0 0 -20px;
	color: #222;
	font-size: 20px;
	font-weight: 600;
}

.wnh-bf-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px 30px;
}

.wnh-bf-terms {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
}

.wnh-bf-terms span {
	flex: none;
	width: 12px;
	height: 12px;
	border: 1px solid #999;
	border-radius: 2px;
}

.wnh-bf-book {
	align-self: flex-end;
	padding: 0 18px;
}

/* Schmal wie das Smoobu-Formular: alles untereinander */
@container (max-width: 767px) {
	.wnh-bf-search {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wnh-bf-search .wnh-bf-field:nth-of-type(3),
	.wnh-bf-submit {
		grid-column: 1 / -1;
	}

	.wnh-bf-main {
		grid-template-columns: minmax(0, 1fr);
	}

	.wnh-bf-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Hinweis mit Button über der Vorschau */
.wnh-booking-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background-color: rgba(250, 241, 237, .35);
}

.wnh-booking-notice {
	max-width: 540px;
	padding: 28px 30px;
	border-radius: 16px;
	background-color: #fff;
	box-shadow: 0 12px 40px rgba(51, 51, 51, .14);
	text-align: center;
}

.wnh-booking-icon {
	display: block;
	margin: 0 auto 10px;
	color: #f7a720;
}

.wnh-booking-title {
	margin-bottom: 8px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: #000;
}

.wnh-booking-text {
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.6;
}

.wnh-booking-text a,
.wnh-booking-always a {
	color: inherit;
	text-decoration: underline;
}

.wnh-booking-always {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #8a8a8a;
}

.wnh-booking-always a {
	white-space: nowrap;
}

.wnh-booking-button[disabled] {
	cursor: progress;
	opacity: .7;
}

/* Mit gespeicherter Zustimmung (.is-auto) lädt das Formular ohne Klick: statt des Hinweises nur eine Ladeanzeige */
.wnh-booking-autoload {
	display: none;
	margin: 0;
	padding: 10px 18px;
	border-radius: 999px;
	background-color: #fff;
	box-shadow: 0 6px 24px rgba(51, 51, 51, .12);
	font-size: 14px;
	line-height: 1.4;
	color: #333;
}

.wnh-booking-consent.is-auto .wnh-booking-autoload {
	display: block;
}

.wnh-booking-consent.is-auto .wnh-booking-notice {
	display: none;
}

/* Lade-Indikator im Button bzw. in der Ladeanzeige, solange das Formular lädt */
.wnh-booking-spinner {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: .5em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: -.15em;
	animation: wnh-booking-spin .8s linear infinite;
}

@keyframes wnh-booking-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wnh-booking-spinner {
		animation-duration: 2.4s;
	}
}

@media screen and (max-width: 479px) {
	.wnh-booking-overlay {
		padding: 14px;
	}

	.wnh-booking-notice {
		padding: 22px 20px;
	}
}

/* ---------- Belegungskalender (Nachbau des Smoobu-Widgets, Werte aus dessen Stylesheet) ---------- */

.wnh-occupancy {
	position: relative;
	max-width: 1000px;
	padding: 20px 0;
	border-radius: 10px;
	background: #f9f9f9;
	color: #616262;
	font: 300 16px/1.5em 'Lato', sans-serif;
}

.wnh-occ-months {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wnh-occ-month {
	min-width: 0;
	padding: 0 calc(20px + 3%) 0 20px;
	text-align: center;
}

.wnh-occ-month[hidden] {
	display: none;
}

.wnh-occ-month + .wnh-occ-month {
	padding: 0 20px 0 calc(20px + 3%);
}

.wnh-occ-title {
	margin: .25em 0;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25em;
	text-transform: uppercase;
	color: #000;
}

.wnh-occ-weekdays,
.wnh-occ-days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.wnh-occ-weekdays span,
.wnh-occ-day {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	box-sizing: border-box;
}

.wnh-occ-weekdays {
	font-weight: 600;
	text-transform: uppercase;
}

.wnh-occ-days {
	color: #7c8a95;
}

.wnh-occ-day.is-booked {
	background-color: #ffbfbf;
}

.wnh-occ-day.is-arrival {
	background: linear-gradient(to right bottom, #f9f9f9 50%, #ffbfbf 50%);
}

.wnh-occ-day.is-departure {
	background: linear-gradient(to right bottom, #ffbfbf 50%, #f9f9f9 50%);
}

.wnh-occ-day.is-today {
	border: 2px solid #2de4e5;
}

.wnh-occ-nav {
	position: absolute;
	top: 45px;
	z-index: 1;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	line-height: 0;
	cursor: pointer;
}

.wnh-occ-nav[hidden] {
	display: none;
}

.wnh-occ-prev {
	left: 14px;
}

.wnh-occ-next {
	right: 14px;
}

/* Schmal (wie Smoobu bis 500 px Breite): ein Monat */
.wnh-occupancy.is-small .wnh-occ-months {
	grid-template-columns: minmax(0, 1fr);
}

.wnh-occupancy.is-small .wnh-occ-month {
	padding: 0 20px;
}
