/*
 * CityMarina — MotoPress-Hotel-Booking-Oberflächen im Token-System.
 *
 * Geltungsbereich: alles, was MPHB (Lite 6.1.0) im Front-End rendert —
 * Suchformular, Ergebnisliste, Klassenseite, Checkout, Bestätigungsseite,
 * Datepicker — plus die Bootsdaten-Sektion, die marina-core in den Checkout
 * hängt (#marina-boat-details).
 *
 * Regeln (wie style.css):
 *   - Werte kommen ausschließlich aus theme.json (--wp--preset--* /
 *     --wp--custom--*). Die einzige Ausnahme ist --cm-mphb-danger, siehe unten.
 *   - Kein !important. Diese Datei wird nach `mphb.min.css`, nach dessen
 *     Inline-Block und nach `style.css` geladen (Enqueue-Abhängigkeit auf
 *     `citymarina-style` in functions.php); bei gleicher Spezifität gewinnt
 *     damit die Quellreihenfolge. Wo das Plugin höher spezifiziert, ist die
 *     Selektorform der Plugin-Regel bewusst nachgebaut — nachgewiesene Fälle
 *     sind an Ort und Stelle kommentiert.
 *   - Breakpoints nur 991px und 767px (Audit), Rest fluid.
 *
 * Nicht abgedeckt: E-Mail-Templates (bleiben Default, eigene Styles im
 * Plugin, nicht overridebar) und der Admin-Bereich.
 */

:root {
	/*
	 * Fehlerrot. Die Palette in theme.json hat bewusst keine Fehlerfarbe —
	 * das Design-Audit kannte keine. Dieser Wert ist nicht neu erfunden: er
	 * kam mit dem Inline-CSS von mu-plugins/marina-core/booking.php
	 * (:user-invalid der Bootsfelder), das inzwischen hierher konsolidiert
	 * ist, und ist zugleich das Fehlerrot des WordPress-Backends. Kontrast auf Weiß
	 * 6,2:1 → AA für Fließtext. Wird nur für Feldfehler benutzt; die
	 * Meldungsblöcke selbst laufen im Notiz-Stil (Audit: `note`-Verlauf).
	 */
	--cm-mphb-danger: #b32d2e;
	--cm-mphb-danger-soft: #fdf3f3;
}

/* ---------------------------------------------------------------------------
 * 1. Wrapper — Breiten und Rhythmus
 * ------------------------------------------------------------------------- */

/*
 * Die Shortcode-Wrapper sitzen in `.entry-content` (contentSize 1120px).
 * Formulare bleiben schmaler: eine Spalte Formular auf 1120px liest sich
 * nicht. Ergebnisliste und Klassenseite dürfen die volle Inhaltsbreite haben.
 */
.mphb_sc_checkout-wrapper,
.mphb_sc_booking_confirmation {
	width: min(46rem, 100%);
	margin-inline: auto;
}

.mphb_sc_search_results-wrapper > *,
.mphb_sc_checkout-wrapper > * {
	min-width: 0;
}

/* ---------------------------------------------------------------------------
 * 2. Bedienelemente — Label, Feld, Pflichtfeld-Stern
 * ------------------------------------------------------------------------- */

/*
 * Die Feldoptik (46px, Box-Rechnung, Rahmen, Radius) steht vollständig in
 * style.css §7 und greift für alles innerhalb von `.wp-site-blocks`. Hier
 * kommt nur dazu, was MPHB an eigenem Markup mitbringt: Labels als Block,
 * Einheiten/Hinweise gedämpft, der Pflichtfeld-Stern als lesbares Zeichen
 * statt als gepunktetes abbr.
 *
 * Der Zeilenrhythmus ist überall derselbe und kommt aus einem Token:
 * Label → --control--label-gap → Feld → --control--label-gap → Hilfetext,
 * und --control--row-gap zur nächsten Zeile (das Raster-Gap weiter unten).
 * Vorher standen hier 0.5rem Labelabstand gegen 1rem Zeilenabstand — bei
 * 67px hohen Feldern (siehe style.css §7) rückte damit das Label der
 * nächsten Zeile optisch an die Unterkante des Feldes darüber.
 */
.mphb_sc_search-form label,
.mphb-booking-form label,
.mphb_sc_checkout-form label,
.mphb_sc_checkout-form .mphb-customer-details label,
#marina-boat-details label {
	display: block;
	margin-bottom: var(--wp--custom--control--label-gap);
	color: var(--wp--preset--color--navy-heading);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.3;
}

/* Die Zustimmungszeile ist eine Checkbox-Zeile: Label steht neben der Box. */
#marina-boat-details .marina-boat-field-consent label,
.mphb_sc_checkout-form .mphb-checkbox-label,
.mphb_sc_checkout-form .mphb-radio-label {
	display: inline;
	margin-bottom: 0;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 400;
	line-height: 1.5;
}

.mphb_sc_search-form abbr,
.mphb-booking-form abbr,
.mphb_sc_checkout-form abbr,
.mphb-required-fields-tip abbr,
#marina-boat-details abbr {
	border: 0;
	color: var(--wp--preset--color--accent-deep);
	cursor: help;
	font-weight: 800;
	text-decoration: none;
}

.mphb-required-fields-tip {
	margin: 0 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
}

.mphb-required-fields-tip small {
	font-size: inherit;
}

/*
 * Einheiten- und Hinweiszeilen der Bootsdaten (marina-core-Markup).
 * Die Hilfetexte selbst brauchen hier nichts mehr: `input + small` in
 * style.css §7 setzt Abstand, Größe und Farbe für jeden Feld-Hilfetext der
 * Site — der Hinweis klebt am Feld darüber, nicht an der nächsten Zeile.
 */
#marina-boat-details .marina-boat-unit {
	color: var(--wp--preset--color--muted-soft);
	font-weight: 400;
}

/* Das Ableseergebnis der Größenklasse unter den Bootsfeldern. */
#marina-boat-details .marina-band-readout {
	font-weight: 600;
}

/*
 * Sichtbarer Fokus auf allen MPHB-Feldern. Die globale Regel in style.css
 * (`:focus-visible`, 2px accent, offset 2px) gilt schon; hier kommt der
 * Rahmenwechsel dazu, damit das Feld selbst mitspricht und nicht nur der
 * Ring darum herum.
 */
.mphb_sc_search-form :focus-visible,
.mphb-booking-form :focus-visible,
.mphb_sc_checkout-form :focus-visible,
.mphb_sc_search_results-wrapper :focus-visible,
.datepick-popup :focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.mphb_sc_search-form input:focus,
.mphb_sc_search-form select:focus,
.mphb-booking-form input:focus,
.mphb-booking-form select:focus,
.mphb_sc_checkout-form input:focus,
.mphb_sc_checkout-form select:focus,
.mphb_sc_checkout-form textarea:focus {
	border-color: var(--wp--preset--color--accent);
}

/* Fehlerzustand eines einzelnen Feldes — gilt für alle MPHB-Pflichtfelder
 * und für die Bootsfelder. Der Fokusring wechselt mit, sonst umrandete ein
 * rot markiertes Feld beim Tabben wieder in Akzentblau. */
.mphb_sc_checkout-form input:user-invalid,
.mphb_sc_checkout-form select:user-invalid,
.mphb_sc_checkout-form textarea:user-invalid,
#marina-boat-details input:user-invalid,
#marina-boat-details select:user-invalid {
	background-color: var(--cm-mphb-danger-soft);
	border-color: var(--cm-mphb-danger);
	outline-color: var(--cm-mphb-danger);
}

/* ---------------------------------------------------------------------------
 * 3. Buttons — MPHB-Schaltflächen auf die Theme-Rezeptur
 * ------------------------------------------------------------------------- */

/*
 * MPHB rendert Schaltflächen als `.button` bzw. `.mphb-button` und kann die
 * Klassen nicht überall über Templates setzen (Ergebnisliste, Checkout und
 * Buchungsformular kommen aus Views). Deshalb liegt die Button-Rezeptur hier
 * auf den MPHB-Klassen statt über `wp-element-button` im Markup — sonst sähen
 * nur die überschriebenen Templates richtig aus.
 */
.mphb_sc_search-form input[type="submit"],
.mphb-booking-form input[type="submit"],
.mphb_sc_checkout-form input[type="submit"],
.mphb_sc_search_results-wrapper .button,
.mphb_sc_search_results-wrapper .mphb-button,
.mphb_sc_booking_confirmation .button {
	display: inline-block;
	padding: 0.85rem 1.5rem;
	border: 0;
	border-radius: var(--wp--custom--radius--base);
	background: var(--wp--preset--gradient--button);
	box-shadow: var(--wp--custom--shadow--button);
	color: var(--wp--preset--color--surface);
	cursor: pointer;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition:
		transform var(--wp--custom--motion--duration) var(--wp--custom--motion--easing),
		box-shadow var(--wp--custom--motion--duration) var(--wp--custom--motion--easing),
		filter var(--wp--custom--motion--duration) var(--wp--custom--motion--easing);
}

.mphb_sc_search-form input[type="submit"]:hover,
.mphb_sc_search-form input[type="submit"]:focus-visible,
.mphb-booking-form input[type="submit"]:hover,
.mphb-booking-form input[type="submit"]:focus-visible,
.mphb_sc_checkout-form input[type="submit"]:hover,
.mphb_sc_checkout-form input[type="submit"]:focus-visible,
.mphb_sc_search_results-wrapper .button:hover,
.mphb_sc_search_results-wrapper .button:focus-visible,
.mphb_sc_search_results-wrapper .mphb-button:hover,
.mphb_sc_search_results-wrapper .mphb-button:focus-visible,
.mphb_sc_booking_confirmation .button:hover,
.mphb_sc_booking_confirmation .button:focus-visible {
	box-shadow: var(--wp--custom--shadow--button-hover);
	color: var(--wp--preset--color--surface);
	filter: brightness(var(--wp--custom--motion--brightness));
	transform: translateY(var(--wp--custom--motion--lift));
}

/* Zweitrangige Aktion: „Details ansehen" führt weg vom Buchen, darf also
 * nicht wie der Buchen-Knopf aussehen. */
.mphb_sc_search_results-wrapper .mphb-view-details-button {
	background: var(--wp--preset--color--surface);
	box-shadow: none;
	border: 1px solid var(--wp--preset--color--border-input);
	color: var(--wp--preset--color--accent-deep);
}

.mphb_sc_search_results-wrapper .mphb-view-details-button:hover,
.mphb_sc_search_results-wrapper .mphb-view-details-button:focus-visible {
	background: var(--wp--preset--color--nav-hover);
	box-shadow: none;
	color: var(--wp--preset--color--nav-hover-text);
}

/* Textlink-Aktionen bleiben Links. */
.mphb_sc_search_results-wrapper .mphb-remove-from-reservation {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
}

/* ---------------------------------------------------------------------------
 * 4. Suchformular — Zwei-Spalten-Raster, vollbreiter Submit
 * ------------------------------------------------------------------------- */

.cm-mphb-searchform {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--custom--control--row-gap) var(--wp--preset--spacing--30);
	align-items: end;
}

/*
 * Voreinstellung: alles läuft über die volle Breite. Nur das Datumspaar
 * teilt sich eine Zeile — Anreise und Abreise gehören zusammen, alles andere
 * (Personen an Bord, spätere Attribut-Selects, Hinweise, Submit) nicht.
 * Hidden-Inputs sind `display: none` und werden gar nicht erst zu
 * Rasterzellen.
 */
.cm-mphb-searchform > * {
	grid-column: 1 / -1;
	margin: 0;
}

.cm-mphb-searchform > .mphb_sc_search-check-in-date,
.cm-mphb-searchform > .mphb_sc_search-check-out-date {
	grid-column: span 1;
}

.cm-mphb-searchform__submit input[type="submit"] {
	width: 100%;
	min-height: var(--wp--custom--control--submit-height);
}

/* ---------------------------------------------------------------------------
 * 5. Ergebnisliste — Klassenraster aus Karten
 * ------------------------------------------------------------------------- */

/*
 * Die Ergebnisse liegen flach im Wrapper (Infozeile, Empfehlung, Warenkorb,
 * dann n Klassen). Das Raster fasst nur die Klassenkarten; alles andere
 * spannt über die volle Breite. `auto-fit` mit `min(100%, 26rem)` ergibt auf
 * 1120px zwei Spalten und fällt unterhalb selbsttätig auf eine zurück —
 * ohne dass es dafür einen dritten Breakpoint bräuchte.
 */
.mphb_sc_search_results-wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
	gap: var(--wp--preset--spacing--50);
	align-items: start;
}

.mphb_sc_search_results-wrapper > *:not(.mphb-room-type) {
	grid-column: 1 / -1;
}

/*
 * Plugin-Regel (assets/css/mphb.css:352):
 * `.mphb_sc_search_results-wrapper .mphb-room-type:not(:first-of-type)`
 * setzt `margin-top: 4em`. Im Raster erzeugt das versetzte Karten.
 * Selektorform 1:1 nachgebaut (gleiche Spezifität), unsere Datei lädt
 * später — kein !important nötig.
 */
.mphb_sc_search_results-wrapper .mphb-room-type:not(:first-of-type) {
	margin-top: 0;
}

.mphb_sc_search_results-info {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--s);
}

/* Die Karte. Klasse kommt aus dem Override
 * hotel-booking/shortcodes/search-results/room-content.php. */
.cm-mphb-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--wp--preset--gradient--panel);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--base);
	box-shadow: var(--wp--custom--shadow--card);
}

.cm-mphb-card__media img {
	display: block;
	width: 100%;
	height: auto;
}

.cm-mphb-card__media p {
	margin: 0;
}

.cm-mphb-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--50);
}

.cm-mphb-card__body > * {
	margin: 0;
}

/* Titel: H2 und der Link darin tragen im Plugin dieselbe Klasse. */
.cm-mphb-card h2.mphb-room-type-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--m);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.2;
}

.cm-mphb-card a.mphb-room-type-title {
	color: var(--wp--preset--color--navy-heading);
	text-decoration: none;
}

.cm-mphb-card a.mphb-room-type-title:hover,
.cm-mphb-card a.mphb-room-type-title:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/*
 * Nur der Auszug. `the_excerpt()` liefert einen klassenlosen <p>; alle
 * anderen Absätze der Karte (Preis, Buttons, Verfügbarkeit) tragen
 * MPHB-Klassen und bringen ihre eigene Behandlung mit — ein pauschales
 * `.cm-mphb-card p` wäre spezifischer als die und würde sie überschreiben.
 */
.cm-mphb-card__body > p:not([class]) {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.6;
}

/* Attribute (LüA-/Kapazitätsangaben) als Beschriftung-Wert-Zeilen. */
.mphb-room-type-details-title,
.mphb-details-title {
	margin: 0;
	color: var(--wp--preset--color--muted-soft);
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.mphb-loop-room-type-attributes,
.mphb-single-room-type-attributes {
	margin: 0;
	padding: 0;
	list-style: none;
	font-feature-settings: "tnum" 1;
	font-variant-numeric: tabular-nums;
}

.mphb-loop-room-type-attributes > li,
.mphb-single-room-type-attributes > li {
	display: flex;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border-cell);
	font-size: var(--wp--preset--font-size--s);
}

.mphb-loop-room-type-attributes > li:last-child,
.mphb-single-room-type-attributes > li:last-child {
	border-bottom: 0;
}

.mphb-attribute-title {
	color: var(--wp--preset--color--muted);
}

.mphb-attribute-value {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-align: right;
}

/* Preis. Tabularziffern, damit die Karten spaltenweise vergleichbar sind. */
.mphb-regular-price,
.mphb-price,
.mphb-total-price,
.mphb-price-breakdown,
.mphb-recommendation-total,
.mphb-cart-total-price {
	font-feature-settings: "tnum" 1;
	font-variant-numeric: tabular-nums;
}

.mphb-regular-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem;
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--s);
}

.mphb-regular-price > strong {
	width: 100%;
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.mphb-regular-price .mphb-price {
	color: var(--wp--preset--color--accent-deep);
	font-size: var(--wp--preset--font-size--l);
	font-weight: 700;
	line-height: 1.1;
}

.mphb-regular-price .mphb-currency {
	font-size: 0.7em;
	font-weight: 700;
}

.mphb-price-period {
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
}

/* Aktionen am Kartenfuß: Buchen bleibt unten bündig, egal wie lang der
 * Beschreibungstext einer Klasse ist. */
.cm-mphb-card .mphb-view-details-button-wrapper,
.cm-mphb-card .mphb-reserve-room-section {
	margin: 0;
}

.cm-mphb-card .mphb-reserve-room-section {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--border-cell);
}

.cm-mphb-card .mphb-view-details-button,
.cm-mphb-card .mphb-book-button,
.cm-mphb-card .mphb-confirm-reservation {
	width: 100%;
	min-height: var(--wp--custom--control--submit-height);
}

.mphb-rooms-quantity-wrapper {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin: 0 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
}

.mphb-rooms-quantity-wrapper .mphb-rooms-quantity {
	width: auto;
	min-width: 4.5rem;
}

.mphb-rooms-reservation-message-wrapper {
	margin-bottom: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--xs);
}

.mphb-rooms-reservation-message {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* Empfehlung und Warenkorb — zwei Panels über dem Klassenraster. */
.mphb-recommendation-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--l);
}

.mphb-recommendation,
.mphb-reservation-cart {
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--gradient--panel);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--base);
	box-shadow: var(--wp--custom--shadow--card);
}

.mphb-recommendation-details-list {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 0;
	list-style: none;
}

.mphb-recommendation-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border-cell);
	font-size: var(--wp--preset--font-size--s);
}

/* Beide Schreibweisen: das Plugin schreibt die Klasse an einer Stelle
 * „mphb-recommedation-item-subtotal" (Tippfehler in 6.1.0). */
.mphb-recommendation-item-subtotal,
.mphb-recommedation-item-subtotal {
	order: 3;
	margin-left: auto;
	color: var(--wp--preset--color--accent-deep);
	font-weight: 700;
}

.mphb-recommendation-item-guests {
	flex-basis: 100%;
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
}

.mphb-recommendation-total,
.mphb-cart-total-price {
	display: flex;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	margin: 0 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--navy-heading);
	font-size: var(--wp--preset--font-size--m);
	font-weight: 700;
}

.mphb-empty-cart-message,
.mphb-cart-message {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--s);
}

/* Der Warenkorb rechnet in 6.1.0 mit Floats; im Raster ergibt Flex ein
 * verlässlicheres Bild als float + Clearfix. */
.mphb_sc_search_results-wrapper .mphb-reservation-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	margin-bottom: 0;
}

.mphb_sc_search_results-wrapper .mphb-reservation-cart .mphb-reservation-details {
	float: none;
}

.mphb_sc_search_results-wrapper .mphb-reservation-cart .mphb-confirm-reservation {
	float: none;
}

.mphb-clear {
	display: none;
}

/* ---------------------------------------------------------------------------
 * 6. Klassenseite — Details, Kalender, Buchungsformular
 * ------------------------------------------------------------------------- */

.mphb-calendar-title,
.mphb-reservation-form-title {
	margin-top: var(--wp--preset--spacing--60);
	font-size: var(--wp--preset--font-size--l);
}

.mphb-booking-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--custom--control--row-gap) var(--wp--preset--spacing--30);
	align-items: end;
	max-width: 34rem;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--gradient--panel);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--base);
	box-shadow: var(--wp--custom--shadow--card);
}

.mphb-booking-form > * {
	grid-column: 1 / -1;
	margin: 0;
}

.mphb-booking-form > .mphb-check-in-date-wrapper,
.mphb-booking-form > .mphb-check-out-date-wrapper {
	grid-column: span 1;
}

.mphb-booking-form .mphb-reserve-btn {
	width: 100%;
	min-height: var(--wp--custom--control--submit-height);
}

/*
 * Das Buchungsformular auf der Klassenseite bringt `<br>` zwischen Label und
 * Feld mit (Plugin-View, kein Template → nicht überschreibbar). Das Label ist
 * hier bereits `display: block`, das <br> erzeugt also nur eine Leerzeile.
 */
.mphb-booking-form label + br {
	display: none;
}

/* ---------------------------------------------------------------------------
 * 7. Datepicker — Popup und Inline-Kalender
 * ------------------------------------------------------------------------- */

/*
 * ERZEUGTE STRUKTUR — abgelesen an der Markup-Erzeugung, nicht geraten:
 * vendors/kbwood/datepick/jquery.datepick.js, `defaultRenderer` (Z. 58–85),
 * `_update()` (Z. 1331–1341, hängt die Hülle an <body>), `_generateContent()`
 * (Z. 1900–2015, setzt `datepick-multi` und die `pickerClass`),
 * `_generateMonth()` (Z. 2037–2110) und `_generateMonthSelection()`
 * (Z. 2137–2224). Die Popup-Klasse kommt aus assets/js/public/mphb.js
 * (Z. 3411/3492/3544/3628: `pickerClass: 'mphb-datepick-popup …'`).
 *
 *   div.datepick-popup                        Hülle am <body>, position:absolute
 *     div.datepick.datepick-multi.mphb-datepick-popup.mphb-check-in-datepick
 *       div.datepick-nav
 *         a.datepick-cmd.datepick-cmd-prev|-today|-next
 *       div.datepick-month-row                eine je Monatszeile
 *         div.datepick-month.first
 *           div.datepick-month-header
 *             select.datepick-month-year      Monat (nur im ersten Monat)
 *             select.datepick-month-year      Jahr
 *           table
 *             thead>tr>th>span.datepick-dow-N
 *             tbody>tr>td>a|span.dp<ts>.mphb-date-cell…
 *         div.datepick-month.last
 *       div.datepick-ctrl                     nur im Popup
 *         a.datepick-cmd.datepick-cmd-clear|-close
 *       div.datepick-clear-fix
 *
 * Zustandsklassen am Tag: `datepick-today`, `datepick-highlight`,
 * `datepick-selected`, `datepick-other-month`, `datepick-weekend` (Vendor)
 * plus `mphb-past-date`, `mphb-booked-date`, `mphb-selectable-date`,
 * `mphb-unselectable-date`, `mphb-check-in-date`, `mphb-earlier-min-date`,
 * `mphb-later-max-date` (mphb.js, `getCalendarDateAttributesFromAvailability`).
 *
 * BEFUND: die Vorgängerfassung setzte `.datepick-month` auf
 * `float:none; width:auto`, um die Float-Vorlage loszuwerden — und nahm dem
 * Monatsblock damit seine Breite (`.datepick-month { float:left; width:15em }`,
 * jquery.datepick.css). Die Hülle ist `position:absolute` ohne Breite, also
 * Shrink-to-fit gegen den Viewport: die zwei Monate stapelten sich
 * seitenbreit übereinander, jede Zelle wurde ein Siebtel der Fensterbreite.
 * Deshalb steht die Geometrie jetzt ausdrücklich hier: Monatszeile als
 * Flex-Reihe, Monat mit fester Breite (--wp--custom--datepick--month),
 * Zelle mit fester Höhe (--wp--custom--datepick--cell).
 */

/*
 * Der Inline-Kalender der Klassenseite ist über CSS-Variablen thematisierbar
 * (Plugin definiert sie auf `.mphb-calendar`). Damit ist die Belegungsampel
 * ohne einen einzigen Override auf Token-Farben umgestellt.
 */
.mphb-calendar {
	--mphb-available-date-bg: var(--wp--preset--color--nav-hover);
	--mphb-available-date-color: var(--wp--preset--color--ink);
	--mphb-not-available-date-bg: var(--wp--preset--color--surface-zebra);
	--mphb-not-available-date-color: var(--wp--preset--color--muted-soft);
	--mphb-booked-date-bg: var(--wp--preset--color--surface-zebra);
	--mphb-booked-date-color: var(--wp--preset--color--muted-soft);
	--mphb-out-of-season-date-bg: var(--wp--preset--color--surface-zebra);
	--mphb-out-of-season-date-color: var(--wp--preset--color--muted-soft);
	--mphb-selected-date-bg: var(--wp--preset--color--accent);
	--mphb-selected-date-color: var(--wp--preset--color--surface);
	--mphb-unselectable-date-color: var(--wp--preset--color--muted-soft);
}

/*
 * Grundform beider Kalender. Die Vorgabe kommt aus
 * vendors/kbwood/datepick/jquery.datepick.css (schwarz/rot, 0.25em Radius);
 * jede Regel hier hat mindestens die Spezifität ihrer Vorlage.
 */
.datepick.mphb-datepick-popup,
.mphb-calendar .datepick {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--base);
	box-shadow: var(--wp--custom--shadow--card);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--s);
	font-feature-settings: "tnum" 1;
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
}

/*
 * Die Hülle liegt am <body> und muss über allem stehen: der Sticky-Header
 * trägt z-index 100, das Überlappungs-Grid 2 (style.css). Die Vorlage setzt
 * 1000 auf derselben Klasse — gleiche Spezifität, spätere Quelle gewinnt.
 */
.datepick-popup {
	z-index: 1200;
}

/* Das Popup ist so breit wie seine Monate — nie so breit wie die Seite. */
.datepick.mphb-datepick-popup {
	width: max-content;
	max-width: calc(100vw - 2rem);
	overflow: hidden;
	padding: 0;
	box-shadow: var(--wp--custom--shadow--floating);
}

/* Kopfleiste mit Vor/Zurück. Vorlage: `.datepick-nav` bg #000, floats. */
.mphb-datepick-popup .datepick-nav,
.mphb-calendar .datepick-nav {
	display: flex;
	float: none;
	width: auto;
	align-items: center;
	justify-content: space-between;
	background-color: var(--wp--preset--color--table-head);
	color: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
}

.mphb-datepick-popup .datepick-cmd,
.mphb-calendar .datepick-cmd {
	flex: 0 0 auto;
	float: none;
	width: auto;
	padding: 0.55rem 0.8rem;
	color: var(--wp--preset--color--surface);
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}

.mphb-datepick-popup .datepick-cmd:hover,
.mphb-calendar .datepick-cmd:hover {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
}

.mphb-datepick-popup a.datepick-cmd.datepick-disabled,
.mphb-calendar a.datepick-cmd.datepick-disabled {
	color: var(--wp--preset--color--border-input);
	cursor: default;
}

.mphb-datepick-popup a.datepick-cmd.datepick-disabled:hover,
.mphb-calendar a.datepick-cmd.datepick-disabled:hover {
	background-color: transparent;
	color: var(--wp--preset--color--border-input);
}

/* Fußleiste (Auswahl anzeigen / löschen). Vorlage: bg #600, Hover #f08080. */
.mphb-datepick-popup .datepick-ctrl,
.mphb-calendar .datepick-ctrl {
	display: flex;
	float: none;
	width: auto;
	align-items: center;
	justify-content: space-between;
	background-color: var(--wp--preset--color--surface-zebra);
	border-top: 1px solid var(--wp--preset--color--border-cell);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
}

.mphb-datepick-popup .datepick-ctrl .datepick-cmd,
.mphb-calendar .datepick-ctrl .datepick-cmd {
	color: var(--wp--preset--color--accent);
}

.mphb-datepick-popup .datepick-ctrl .datepick-cmd:hover,
.mphb-calendar .datepick-ctrl .datepick-cmd:hover {
	background-color: var(--wp--preset--color--nav-hover);
	color: var(--wp--preset--color--nav-hover-text);
}

/*
 * Monatszeile: Flex statt Float. Die Vorlage stellt die Monate nebeneinander,
 * indem sie sie floatet und ihnen 15em gibt; wer den Float entfernt, muss die
 * Reihe selbst bauen — sonst stapeln sich die Monate.
 */
.mphb-datepick-popup .datepick-month-row,
.mphb-calendar .datepick-month-row {
	display: flex;
	flex-wrap: nowrap;
	clear: none;
}

.mphb-datepick-popup .datepick-month,
.mphb-calendar .datepick-month {
	float: none;
	border: 0;
	text-align: center;
}

/* Popup: feste Monatsbreite, zwei Monate ≈ 672px — passt auf jeden Laptop. */
.mphb-datepick-popup .datepick-month {
	flex: 0 0 var(--wp--custom--datepick--month);
	width: var(--wp--custom--datepick--month);
	max-width: 100%;
}

/* Inline-Kalender: die Monate teilen sich die Breite ihres Containers. */
.mphb-calendar .datepick-month {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
}

/* Zwei Monate trennt eine Haarlinie, kein Rahmen um jeden Block. */
.mphb-datepick-popup .datepick-month + .datepick-month,
.mphb-calendar .datepick-month + .datepick-month {
	border-left: 1px solid var(--wp--preset--color--border-cell);
}

/*
 * Monatskopf. Im ERSTEN Monat stehen hier zwei <select> (Monat und Jahr,
 * `_generateMonthSelection()`); ohne feste Zeilenhöhe schneidet der
 * overflow:hidden des Popups sie an.
 */
.mphb-datepick-popup .datepick-month-header,
.mphb-calendar .datepick-month-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: var(--wp--custom--datepick--cell);
	padding: 0.4rem 0.5rem;
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--navy-heading);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--s);
	font-weight: 700;
	text-align: center;
}

/*
 * Monat/Jahr sind echte <select>. `display` und `width` erzwingt das Plugin
 * per !important (assets/css/mphb.min.css) — alles andere ist frei, und die
 * globale Feldhöhe aus style.css gilt hier ohnehin nicht: das Popup hängt am
 * <body>, also außerhalb von .wp-site-blocks.
 */
.mphb-datepick-popup .datepick-month-header select,
.mphb-calendar .datepick-month-header select {
	max-width: 48%;
	height: auto;
	padding: 0.15rem 0.35rem;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border-input);
	border-radius: 0.25rem;
	color: var(--wp--preset--color--navy-heading);
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
}

.mphb-datepick-popup .datepick-month table,
.mphb-calendar .datepick-month table {
	width: 100%;
	margin: 0;
	table-layout: fixed;
	border-collapse: collapse;
}

.mphb-datepick-popup .datepick-month th,
.mphb-datepick-popup .datepick-month th a,
.mphb-calendar .datepick-month th,
.mphb-calendar .datepick-month th a {
	padding: 0.4rem 0;
	background-color: var(--wp--preset--color--surface);
	border: 0;
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	text-decoration: none;
}

.mphb-datepick-popup .datepick-month thead,
.mphb-calendar .datepick-month thead {
	border-bottom: 1px solid var(--wp--preset--color--border-cell);
}

.mphb-datepick-popup .datepick-month td,
.mphb-calendar .datepick-month td {
	padding: 0;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border-cell);
}

/* Kompakte Zelle: eine feste Höhe, der Inhalt sitzt mittig darin. */
.mphb-datepick-popup .datepick-month td {
	height: var(--wp--custom--datepick--cell);
}

.mphb-datepick-popup .datepick-month td a,
.mphb-datepick-popup .datepick-month td span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: calc(var(--wp--custom--datepick--cell) - 2px);
	padding: 0;
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

/*
 * Der Inline-Kalender trägt im Tag zusätzlich den Tagespreis
 * (.mphb-date-cell__price, mphb.min.css) — dort bleibt es beim Blocksatz der
 * Vorlage, nur mit Token-Farben und etwas mehr Luft.
 */
.mphb-calendar .datepick-month a,
.mphb-calendar .datepick-month span {
	padding: 0.4rem 0.15rem;
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.mphb-datepick-popup .datepick-month td .datepick-other-month,
.mphb-calendar .datepick-month td .datepick-other-month {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--border-input);
}

.mphb-datepick-popup .datepick-month td .datepick-weekend,
.mphb-calendar .datepick-month td .datepick-weekend {
	background-color: var(--wp--preset--color--surface-zebra);
}

/*
 * Zustände des Popups. Selektorform der Plugin-Regeln
 * (assets/css/mphb.css:273-317) nachgebaut, damit gleiche Spezifität +
 * spätere Quelle greifen — ohne !important.
 */
.mphb-datepick-popup .datepick-month td a.datepick-today {
	background-color: var(--wp--preset--color--surface);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--note-edge);
	font-weight: 700;
}

.mphb-datepick-popup .datepick-month td a.datepick-highlight,
.mphb-datepick-popup .datepick-month td a.datepick-selected {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
}

.mphb-datepick-popup .datepick-month td span.mphb-check-in-date {
	background-color: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--surface);
}

.mphb-datepick-popup .datepick-month td .mphb-check-in-date {
	background-color: var(--wp--preset--color--nav-hover);
}

.mphb-datepick-popup .datepick-month td .mphb-booked-date:not(.mphb-selectable-date),
.mphb-datepick-popup .datepick-month td .mphb-earlier-min-date,
.mphb-datepick-popup .datepick-month td .mphb-later-max-date {
	background-color: var(--wp--preset--color--surface-zebra);
	color: var(--wp--preset--color--muted-soft);
	opacity: 1; /* Vorlage dimmt auf .5 — als Farbe ist der Kontrast prüfbar (AA). */
}

.mphb-datepick-popup .datepick-month td .mphb-past-date,
.mphb-datepick-popup .datepick-month td .mphb-earlier-check-in-date {
	background-color: var(--wp--preset--color--surface-zebra);
	color: var(--wp--preset--color--border-input);
	opacity: 1; /* Vorlage dimmt auf .15 — unlesbar, aber auch nicht anwählbar. */
}

/* ---------------------------------------------------------------------------
 * 8. Checkout — Sektionen, Kundenblock, Bootsdaten, Summe
 * ------------------------------------------------------------------------- */

.mphb_sc_checkout-form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

/* Plugin-Regel (mphb.css:357) setzt 4em zwischen den Sektionen; das Gap oben
 * übernimmt den Rhythmus. Selektorform nachgebaut. */
.mphb_sc_checkout-form > .mphb-checkout-section:not(:first-of-type) {
	margin-top: 0;
}

.mphb-checkout-section {
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--gradient--panel);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--base);
	box-shadow: var(--wp--custom--shadow--card);
}

.mphb-booking-details-title,
.mphb-customer-details-title,
.mphb-price-breakdown-title,
.mphb-gateway-chooser-title,
.marina-boat-details-title,
.mphb-coupon-code-title,
.mphb-services-details-title,
.mphb-room-rate-chooser-title {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--m);
}

/*
 * Buchungsdaten: Anreise/Abreise als Kennzahlenzeilen.
 * Bewusst auf das Checkout-Formular begrenzt — `.mphb-check-in-date` ist im
 * Datepicker auch die Klasse einer Kalenderzelle.
 */
.mphb_sc_checkout-form .mphb-check-in-date,
.mphb_sc_checkout-form .mphb-check-out-date {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--s);
	font-feature-settings: "tnum" 1;
	font-variant-numeric: tabular-nums;
}

.mphb_sc_checkout-form .mphb-check-in-date strong,
.mphb_sc_checkout-form .mphb-check-out-date strong {
	color: var(--wp--preset--color--ink);
}

.mphb-room-details {
	margin-top: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--border-cell);
}

.mphb-room-number {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--base);
}

.mphb-checkout-section .mphb-room-type-title {
	margin: 0 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--s);
}

/* Kundenblock: zweispaltiges Feldraster. Name/Nachname und Mail/Telefon
 * gehören paarweise zusammen; Land, Adresse und Notiz brauchen die Breite. */
#mphb-customer-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--custom--control--row-gap) var(--wp--preset--spacing--30);
	align-items: start;
}

#mphb-customer-details > * {
	grid-column: 1 / -1;
	margin: 0;
}

#mphb-customer-details > .mphb-customer-name,
#mphb-customer-details > .mphb-customer-last-name,
#mphb-customer-details > .mphb-customer-email,
#mphb-customer-details > .mphb-customer-phone,
#mphb-customer-details > .mphb-customer-city,
#mphb-customer-details > .mphb-customer-state,
#mphb-customer-details > .mphb-customer-zip {
	grid-column: span 1;
}

/*
 * Der Kundenblock kommt aus einer View (checkout-view.php), nicht aus einem
 * Template — die `<br>` zwischen Label und Feld sind also nicht per Override
 * zu entfernen. Da die Labels hier `display: block` sind, ist das <br> nur
 * eine Leerzeile im Rasterfeld.
 */
#mphb-customer-details label + br,
#marina-boat-details label + br {
	display: none;
}

/*
 * Bootsdaten (marina-core rendert die Sektion; die Gestalt steht seit der
 * Konsolidierung ausschließlich hier — marina-core/booking.php bringt kein
 * eigenes Inline-CSS mehr mit).
 *
 * `margin: 0` auf den Rasterzellen ist nicht kosmetisch: die Felder sind
 * <p>-Elemente und bekämen sonst die 1em-Absatzränder des Browsers dazu.
 * Im Kundenblock darüber sind sie längst genullt — dadurch liefen die
 * beiden Blöcke des Checkouts in unterschiedlichem Rhythmus.
 */
#marina-boat-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--custom--control--row-gap) var(--wp--preset--spacing--30);
	align-items: start;
}

#marina-boat-details > * {
	grid-column: 1 / -1;
	margin: 0;
}

#marina-boat-details > .marina-boat-field-boat_length,
#marina-boat-details > .marina-boat-field-boat_beam,
#marina-boat-details > .marina-boat-field-boat_draft,
#marina-boat-details > .marina-boat-field-boat_type,
#marina-boat-details > .marina-boat-field-boat_registration,
#marina-boat-details > .marina-boat-field-home_port {
	grid-column: span 1;
}

/* Zustimmungszeile: Kästchen und Text auf einer Linie, über volle Breite,
 * optisch als eigener Block abgesetzt. */
#marina-boat-details .marina-boat-field-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--gradient--note);
	border-left: 3px solid var(--wp--preset--color--note-edge);
	border-radius: var(--wp--custom--radius--base);
}

#marina-boat-details .marina-boat-field-consent input[type="checkbox"] {
	width: 1.15rem;
	height: 1.15rem;
	min-height: 0;
	margin-top: 0.15rem;
	flex: none;
	accent-color: var(--wp--preset--color--accent);
}

/* Preisaufschlüsselung — Tabellenbehandlung wie im Theme (Audit §6). */
.mphb-room-price-breakdown-wrapper {
	overflow-x: auto;
}

.mphb-price-breakdown {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--s);
}

.mphb-price-breakdown th,
.mphb-price-breakdown td {
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--wp--preset--color--border-cell);
	text-align: left;
	vertical-align: top;
}

.mphb-price-breakdown .mphb-table-price-column {
	text-align: right;
	white-space: nowrap;
}

/*
 * Bewusst kein Zebra: die Detailzeilen der Aufschlüsselung werden per
 * `mphb-hide` ein- und ausgeklappt. `nth-child` zählt versteckte Zeilen mit,
 * das Muster spränge beim Aufklappen. Die Zellrahmen tragen die Gliederung.
 */
.mphb-price-breakdown .mphb-price-breakdown-group > td {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--navy-heading);
	font-weight: 700;
}

.mphb-price-breakdown .mphb-price-breakdown-rate {
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
}

.mphb-price-breakdown .mphb-price-breakdown-accommodation {
	color: var(--wp--preset--color--navy-heading);
	text-decoration: none;
}

.mphb-price-breakdown tfoot th {
	background-color: var(--wp--preset--color--table-head);
	border-color: var(--wp--preset--color--table-head);
	color: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--base);
}

/* Gesamtsumme unter dem Formular. */
.mphb-total-price {
	margin: 0;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--gradient--note);
	border-left: 3px solid var(--wp--preset--color--note-edge);
	border-radius: var(--wp--custom--radius--base);
	color: var(--wp--preset--color--navy-heading);
	font-size: var(--wp--preset--font-size--m);
	font-weight: 700;
}

.mphb-total-price output {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
}

.mphb-total-price .mphb-total-price-field,
.mphb-total-price .mphb-deposit-amount-field {
	color: var(--wp--preset--color--accent-deep);
}

.mphb-payment-fee {
	color: var(--wp--preset--color--muted-soft);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
}

.mphb_sc_checkout-submit-wrapper {
	margin: 0;
}

.mphb_sc_checkout-submit-wrapper input[type="submit"] {
	width: 100%;
	min-height: var(--wp--custom--control--submit-height);
}

/* AGB, Gutschein, Zahlarten — im Lite-Betrieb teils abgeschaltet, aber die
 * Sektionen existieren im Markup, sobald sie eingeschaltet werden. */
.mphb-gateways-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mphb-gateways-list > li {
	margin-top: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--30);
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border-input);
	border-radius: var(--wp--custom--radius--base);
}

.mphb-gateway-description {
	margin: var(--wp--preset--spacing--20) 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
}

.mphb-terms-and-conditions-accept,
.mphb-customer-create-account {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-size: var(--wp--preset--font-size--s);
}

.mphb-coupon-code-wrapper .mphb-apply-coupon-code-button {
	margin-top: var(--wp--preset--spacing--20);
}

.mphb-coupon-message {
	margin: var(--wp--preset--spacing--20) 0 0;
	font-size: var(--wp--preset--font-size--s);
}

/* ---------------------------------------------------------------------------
 * 9. Meldungen — Fehler, Hinweise, Bestätigung (Notiz-Stil)
 * ------------------------------------------------------------------------- */

/*
 * Alle Rückmeldungen tragen dieselbe Flächenbehandlung: Notiz-Verlauf mit
 * farbiger Kante links (Audit: `note`-Verlauf + `note-edge`). Das ist die
 * Optik, die auf dieser Site „lies das, bevor du weitermachst" bedeutet.
 * Rot bleibt den einzelnen Feldern vorbehalten — ein rotes Panel für ein
 * falsch getipptes Datum wäre lauter als der Fehler.
 */
.mphb-errors-wrapper,
.mphb-data-incorrect,
.mphb-booking-confirmation-messages {
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--gradient--note);
	border-left: 3px solid var(--wp--preset--color--note-edge);
	border-radius: var(--wp--custom--radius--base);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--s);
}

/* Fehlerblöcke tragen zusätzlich die Warnkante. */
.mphb-errors-wrapper,
.mphb-data-incorrect {
	border-left-color: var(--cm-mphb-danger);
}

.cm-mphb-errors__title {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--navy-heading);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
}

.cm-mphb-errors__list {
	margin: 0;
	padding-left: 1.2rem;
}

.cm-mphb-errors__list > li {
	margin-bottom: 0.2rem;
}

/*
 * \MPHB\Views\GlobalView::prependBr hängt jeder Meldung ein <br/> voran
 * (Filter mphb_sc_search_results_error). Der Filter bleibt aktiv — Fremdcode
 * hängt daran —, das <br> am Listenanfang wird nur ausgeblendet.
 */
.cm-mphb-errors__list > li > br:first-child,
.mphb-data-incorrect > br:first-child {
	display: none;
}

.cm-mphb-errors__hint {
	margin: var(--wp--preset--spacing--30) 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
}

/* Die Checkout-Meldung „Dates invalid" (Plugin-View, kein Template). */
.mphb-data-incorrect {
	color: var(--wp--preset--color--ink);
}

/* Der Live-Fehlerblock im Checkout wird per JS eingeblendet; solange er
 * `mphb-hide` trägt, ist er unsichtbar (Plugin-Regel mit !important). */
.mphb_sc_checkout-form .mphb-errors-wrapper {
	margin-bottom: 0;
}

/* Bestätigungsseite: Wrapper trägt die Fläche, die Zeilen den Zustand. */
.mphb-booking-confirmation-messages {
	border-left-color: var(--wp--preset--color--note-edge);
}

.cm-mphb-confirmation {
	margin: 0;
	font-size: var(--wp--preset--font-size--base);
}

.cm-mphb-confirmation + .cm-mphb-confirmation,
.cm-mphb-confirmation + .cm-mphb-confirmation__hint,
.cm-mphb-confirmation__hint + .cm-mphb-confirmation__action,
.cm-mphb-confirmation + .cm-mphb-confirmation__action {
	margin-top: var(--wp--preset--spacing--30);
}

.cm-mphb-confirmation--ok {
	color: var(--wp--preset--color--navy-heading);
	font-weight: 700;
}

.cm-mphb-confirmation--info {
	color: var(--wp--preset--color--muted);
}

.cm-mphb-confirmation--warn {
	color: var(--wp--preset--color--navy-heading);
	font-weight: 700;
}

.cm-mphb-confirmation__hint {
	margin-bottom: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--s);
}

.cm-mphb-confirmation__action {
	margin-bottom: 0;
}

/* Buchungs- und Zahlungsdetails auf der Bestätigungsseite. */
.mphb-booking-details-section {
	margin-top: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--gradient--panel);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--base);
	box-shadow: var(--wp--custom--shadow--card);
}

.mphb-booking-details {
	margin: 0;
	padding: 0;
	list-style: none;
	font-feature-settings: "tnum" 1;
	font-variant-numeric: tabular-nums;
}

.mphb-booking-details > li {
	display: flex;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	padding: 0.45rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border-cell);
	font-size: var(--wp--preset--font-size--s);
}

.mphb-booking-details > li:last-child {
	border-bottom: 0;
}

.mphb-booking-details .label {
	color: var(--wp--preset--color--muted);
}

.mphb-booking-details .value {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-align: right;
}

/* ---------------------------------------------------------------------------
 * 10. Breakpoints — nur 991px und 767px
 * ------------------------------------------------------------------------- */

@media (max-width: 991px) {
	.mphb-booking-form {
		max-width: none;
	}
}

@media (max-width: 767px) {
	.cm-mphb-searchform,
	.mphb-booking-form,
	#mphb-customer-details,
	#marina-boat-details {
		grid-template-columns: minmax(0, 1fr);
	}

	.cm-mphb-searchform > .mphb_sc_search-check-in-date,
	.cm-mphb-searchform > .mphb_sc_search-check-out-date,
	.mphb-booking-form > .mphb-check-in-date-wrapper,
	.mphb-booking-form > .mphb-check-out-date-wrapper,
	#mphb-customer-details > .mphb-customer-name,
	#mphb-customer-details > .mphb-customer-last-name,
	#mphb-customer-details > .mphb-customer-email,
	#mphb-customer-details > .mphb-customer-phone,
	#mphb-customer-details > .mphb-customer-city,
	#mphb-customer-details > .mphb-customer-state,
	#mphb-customer-details > .mphb-customer-zip,
	#marina-boat-details > .marina-boat-field-boat_length,
	#marina-boat-details > .marina-boat-field-boat_beam,
	#marina-boat-details > .marina-boat-field-boat_draft,
	#marina-boat-details > .marina-boat-field-boat_type,
	#marina-boat-details > .marina-boat-field-boat_registration,
	#marina-boat-details > .marina-boat-field-home_port {
		grid-column: 1 / -1;
	}

	/* Tabellen scrollen horizontal, innen mindestens 620px (Audit §5). */
	.mphb-room-price-breakdown-wrapper .mphb-price-breakdown {
		min-width: 620px;
	}

	.mphb-checkout-section {
		padding: var(--wp--preset--spacing--40);
	}

	.cm-mphb-card__body {
		padding: var(--wp--preset--spacing--40);
	}

	/*
	 * Datepicker auf dem Handy: ein Monat. Zwei Monate nebeneinander passen
	 * nicht, untereinander wird das Popup höher als der Bildschirm. Die
	 * Klassen `first`/`last` vergibt der Renderer selbst, sobald mehr als ein
	 * Monat gezeigt wird (jquery.datepick.js, `_generateContent()` Z. 1941-1947);
	 * „vor>" blättert weiterhin monatsweise, es bleibt also alles erreichbar.
	 */
	.mphb-datepick-popup .datepick-month.first ~ .datepick-month {
		display: none;
	}

	/* Schmaler als 21rem darf der eine Monat werden — table-layout:fixed
	 * verteilt die Restbreite gleichmäßig auf die sieben Spalten. */
	.mphb-datepick-popup .datepick-month {
		flex: 0 1 var(--wp--custom--datepick--month);
		min-width: 0;
	}
}

/* ---------------------------------------------------------------------------
 * 11. prefers-reduced-motion
 * ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.mphb_sc_search-form input[type="submit"],
	.mphb-booking-form input[type="submit"],
	.mphb_sc_checkout-form input[type="submit"],
	.mphb_sc_search_results-wrapper .button,
	.mphb_sc_search_results-wrapper .mphb-button,
	.mphb_sc_booking_confirmation .button {
		transition: none;
	}

	.mphb_sc_search-form input[type="submit"]:hover,
	.mphb_sc_search-form input[type="submit"]:focus-visible,
	.mphb-booking-form input[type="submit"]:hover,
	.mphb-booking-form input[type="submit"]:focus-visible,
	.mphb_sc_checkout-form input[type="submit"]:hover,
	.mphb_sc_checkout-form input[type="submit"]:focus-visible,
	.mphb_sc_search_results-wrapper .button:hover,
	.mphb_sc_search_results-wrapper .button:focus-visible,
	.mphb_sc_search_results-wrapper .mphb-button:hover,
	.mphb_sc_search_results-wrapper .mphb-button:focus-visible,
	.mphb_sc_booking_confirmation .button:hover,
	.mphb_sc_booking_confirmation .button:focus-visible {
		filter: none;
		transform: none;
	}
}

/* Pool-Einzelseite: Kapazitaets-Attribute sind technische Obergrenzen des
 * Pools (12 Personen), keine Gastinformation — ausblenden. */
.mphb-room-type-adults-capacity,
.mphb-room-type-children-capacity,
.mphb-room-type-total-capacity {
	display: none;
}
