/* SW Booking – Frontend */
.swb {
	--swb-primary: #a8834f;
	--swb-button: #222;
	--swb-text: #1d1d1d;
	--swb-muted: #6b6b6b;
	--swb-border: #e6e2dc;
	--swb-bg: #fff;
	--swb-soft: #f7f5f1;
	--swb-busy: #f3d9d4;
	color: var(--swb-text);
	font: inherit;
	box-sizing: border-box;
	container-type: inline-size;
	container-name: swb;
}
.swb *, .swb *::before, .swb *::after { box-sizing: border-box; }

/* ---------- Buchungsleiste ---------- */
.swb-bar {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr minmax(200px, 0.9fr);
	align-items: center;
	gap: 0;
	background: var(--swb-bg);
	padding: 28px 32px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
	margin: 0 0 32px;
}
.swb-bar__field {
	position: relative;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 8px 24px 8px 8px;
	cursor: pointer;
	min-width: 0;
	outline: none;
}
.swb-bar__field:focus-visible { box-shadow: inset 0 0 0 2px var(--swb-primary); }
.swb-bar__icon { color: var(--swb-primary); flex: 0 0 34px; display: inline-flex; justify-content: center; }
.swb-bar__text { display: flex; flex-direction: column; min-width: 0; }
.swb-bar__label { font-size: 1.35rem; line-height: 1.2; margin-bottom: 6px; white-space: nowrap; word-break: normal; overflow-wrap: normal; hyphens: none; }
.swb-bar__value { font-size: 1rem; color: var(--swb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swb-bar--error .swb-bar__field--date .swb-bar__value { color: #b3261e; }
.swb-bar__picker {
	position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0;
}
.swb-bar__submit,
.swb-btn {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--swb-button); color: #fff; border: 0; border-radius: 0;
	font: inherit; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	padding: 18px 28px; cursor: pointer; transition: background .2s, opacity .2s;
	text-decoration: none;
}
.swb-bar__submit { align-self: stretch; font-size: 1.05rem; min-height: 80px; }
.swb-bar__submit:hover, .swb-btn:hover { background: var(--swb-primary); color: #fff; }
.swb-btn[disabled] { opacity: .6; cursor: wait; }
.swb-btn--ghost { background: transparent; color: var(--swb-text); border: 1px solid var(--swb-border); }
.swb-btn--ghost:hover { background: var(--swb-soft); color: var(--swb-text); }

/* Gäste-Popover */
.swb-guests {
	position: absolute; top: calc(100% + 14px); left: 0; z-index: 50;
	width: 280px; background: #fff; padding: 16px 18px; cursor: default;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .15); border: 1px solid var(--swb-border);
}
.swb-guests__row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.swb-stepper { display: inline-flex; align-items: center; gap: 10px; }
.swb-stepper button {
	width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--swb-border);
	background: #fff; color: var(--swb-text); font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.swb-stepper button:hover { border-color: var(--swb-primary); color: var(--swb-primary); }
.swb-stepper output { min-width: 18px; text-align: center; font-weight: 600; }
.swb-guests__done {
	width: 100%; margin-top: 10px; padding: 10px; border: 0; cursor: pointer;
	background: var(--swb-button); color: #fff; font: inherit; font-weight: 600;
}

/* Flatpickr im Look der Seite */
.flatpickr-calendar { border-radius: 0; box-shadow: 0 12px 40px rgba(0, 0, 0, .15); font-family: inherit; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange,
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover {
	background: var(--swb-primary, #a8834f); border-color: var(--swb-primary, #a8834f); color: #fff;
}
.flatpickr-day.inRange { background: #f3ece2; border-color: #f3ece2; box-shadow: -5px 0 0 #f3ece2, 5px 0 0 #f3ece2; }
.flatpickr-day.swb-busy, .flatpickr-day.swb-busy.flatpickr-disabled {
	background: var(--swb-busy, #f3d9d4); color: #a0938e; text-decoration: line-through; border-color: transparent;
}
.flatpickr-day.swb-busy.endRange, .flatpickr-day.swb-busy.selected { text-decoration: none; color: #fff; }
.flatpickr-day.today { border-color: var(--swb-primary, #a8834f); }

/* ---------- Ergebnisse ---------- */
.swb-results__head { margin: 0 0 18px; color: var(--swb-muted); }
.swb-results__head strong { color: var(--swb-text); }
.swb-loading { display: flex; align-items: center; gap: 12px; padding: 24px 0; color: var(--swb-muted); }
.swb-spinner {
	width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--swb-border); border-top-color: var(--swb-primary);
	animation: swb-spin .8s linear infinite;
}
@keyframes swb-spin { to { transform: rotate(360deg); } }
.swb-notice { padding: 14px 18px; background: var(--swb-soft); border-left: 3px solid var(--swb-primary); margin: 0 0 18px; }
.swb-notice--error { border-left-color: #b3261e; background: #fbeeec; }

.swb-room {
	display: grid; grid-template-columns: 260px 1fr 220px; gap: 24px;
	background: #fff; border: 1px solid var(--swb-border); padding: 18px; margin: 0 0 18px;
}
.swb-room--na { opacity: .6; }
.swb-room__img { background: var(--swb-soft); min-height: 170px; overflow: hidden; }
.swb-room__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swb-room__title { margin: 0 0 6px; font-size: 1.35rem; }
.swb-room__title a { color: inherit; text-decoration: none; }
.swb-room__facts { margin: 0 0 8px; color: var(--swb-muted); font-size: .95rem; }
.swb-room__desc { margin: 0 0 10px; font-size: .95rem; }
.swb-amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.swb-amenities li { font-size: .82rem; padding: 4px 10px; background: var(--swb-soft); border: 1px solid var(--swb-border); }
.swb-room__price { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; gap: 4px; border-left: 1px solid var(--swb-border); padding-left: 20px; }
.swb-room__total { font-size: 1.6rem; font-weight: 700; }
.swb-room__per { font-size: .85rem; color: var(--swb-muted); }
.swb-room__left { font-size: .85rem; color: #b3261e; font-weight: 600; }
.swb-room__price .swb-btn { margin-top: 10px; width: 100%; }
.swb-room__na { font-weight: 600; }
.swb-room__reason { font-size: .85rem; color: var(--swb-muted); }
.swb-taxnote { font-size: .85rem; color: var(--swb-muted); }

/* ---------- Checkout ---------- */
.swb-co { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.swb-co__summary { background: var(--swb-soft); padding: 22px; position: sticky; top: 20px; }
.swb-co__summary h3, .swb-co__form h3 { margin: 0 0 14px; font-size: 1.25rem; }
.swb-co__summary img { width: 100%; height: 160px; object-fit: cover; display: block; margin-bottom: 14px; }
.swb-co dl, .swb-done dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.swb-co dt, .swb-done dt { color: var(--swb-muted); font-size: .9rem; }
.swb-co dd, .swb-done dd { margin: 0; text-align: right; }
.swb-co__total { font-weight: 700; font-size: 1.2rem; }
.swb-co__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.swb-f { margin: 0 0 14px; display: flex; flex-direction: column; }
.swb-f--full { grid-column: 1 / -1; }
.swb-f label { font-size: .9rem; margin-bottom: 5px; }
.swb-f input, .swb-f textarea {
	width: 100%; border: 1px solid var(--swb-border); border-radius: 0; padding: 12px 14px; font: inherit; background: #fff; color: var(--swb-text);
}
.swb-f input:focus, .swb-f textarea:focus { outline: none; border-color: var(--swb-primary); box-shadow: 0 0 0 1px var(--swb-primary); }
.swb-req { color: #b3261e; }
.is-invalid input, .is-invalid textarea { border-color: #b3261e; }
.swb-check.is-invalid span { color: #b3261e; }
.swb-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 6px 0 10px; cursor: pointer; }
.swb-check input { margin-top: 4px; flex: 0 0 auto; }
.swb-terms { font-size: .9rem; color: var(--swb-muted); }
.swb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.swb-co__actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

.swb-done { text-align: center; max-width: 560px; margin: 0 auto; padding: 32px; background: var(--swb-soft); }
.swb-done__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--swb-primary); color: #fff; font-size: 32px; line-height: 64px; margin: 0 auto 16px; }
.swb-done dl { text-align: left; margin-top: 20px; }

/* ---------- Danach-CTA ---------- */
.swb-done__cta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--swb-border); }
.swb-done__cta p { font-weight: 600; margin: 0 0 12px; }

/* ---------- Zimmerübersicht [swb_rooms] ---------- */
.swb-rooms { display: grid; grid-template-columns: repeat(var(--swb-cols, 3), minmax(0, 1fr)); gap: 28px; }
.swb-rc { background: #fff; border: 1px solid var(--swb-border); display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.swb-rc:hover { box-shadow: 0 14px 40px rgba(0,0,0,.08); transform: translateY(-3px); }
.swb-rc__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--swb-soft); }
.swb-rc__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.swb-rc:hover .swb-rc__img img { transform: scale(1.04); }
.swb-rc__price { position: absolute; left: 0; bottom: 0; background: var(--swb-primary); color: #fff; font-weight: 700; padding: 8px 16px; }
.swb-rc__price small { font-weight: 400; opacity: .9; }
.swb-rc__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.swb-rc__title { margin: 0 0 6px; font-size: 1.4rem; }
.swb-rc__title a { color: inherit; text-decoration: none; }
.swb-rc__facts { color: var(--swb-muted); margin: 0 0 10px; font-size: .95rem; }
.swb-rc__desc { margin: 0 0 12px; font-size: .95rem; }
.swb-rc .swb-amenities { margin-bottom: 16px; }
.swb-rc__actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.swb-rc__actions .swb-btn { padding: 14px 20px; font-size: .9rem; }
.swb-rc__more { color: var(--swb-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@container swb (max-width: 1000px) { .swb-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container swb (max-width: 620px) { .swb-rooms { grid-template-columns: 1fr; } }

/* ---------- Verfügbarkeitskalender ---------- */
.swb-calendar { margin: 0 0 28px; }
.swb-calendar .flatpickr-calendar.inline { box-shadow: none; border: 1px solid var(--swb-border); }
.swb-calendar__legend { font-size: .85rem; color: var(--swb-muted); display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.swb-dot { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--swb-border); }
.swb-dot--free { background: #fff; }
.swb-dot--busy { background: var(--swb-busy); margin-left: 10px; }
.swb-room-facts { color: var(--swb-muted); }
.swb-room-info .swb-amenities { margin: 8px 0 24px; }

/* ---------- Responsive ---------- */
@container swb (max-width: 1000px) {
	.swb-bar { grid-template-columns: 1fr 1fr; padding: 20px; gap: 8px; }
	.swb-bar__submit { grid-column: 1 / -1; min-height: 60px; }
	.swb-room { grid-template-columns: 200px 1fr; }
	.swb-room__price { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--swb-border); padding-top: 14px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
	.swb-room__price .swb-btn { width: auto; margin-top: 0; }
	.swb-co { grid-template-columns: minmax(0, 1fr); }
	.swb-co__summary { position: static; }
}
@container swb (max-width: 620px) {
	.swb-bar { grid-template-columns: 1fr; padding: 14px; }
	.swb-bar__field { padding: 10px 6px; border-bottom: 1px solid var(--swb-border); }
	.swb-bar__label { font-size: 1.1rem; }
	.swb-guests { width: 100%; }
	.swb-room { grid-template-columns: 1fr; }
	.swb-co { grid-template-columns: 1fr; }
	.swb-co__summary { position: static; }
	.swb-co__grid { grid-template-columns: 1fr; }
	.swb-co__actions { flex-direction: column-reverse; }
	.swb-co__actions .swb-btn { width: 100%; }
}
