/*
 * Birkennest – Darstellung der Plugins im Theme-Stil.
 *
 * Gilt nur innerhalb der Theme-Container (.bn-booking, .bn-guestbook, .bn-form),
 * damit Admin-Seiten und andere Einbindungen unberührt bleiben.
 */

/* ------------------------------------------------------------------ */
/* Gemeinsame Formularfelder                                           */
/* ------------------------------------------------------------------ */
.bn-booking :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], select, textarea),
.bn-guestbook :is(input[type="text"], input[type="email"], input[type="url"], select, textarea),
.bn-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], select, textarea) {
	width: 100%;
	min-height: 46px;
	box-sizing: border-box;
	padding: 10px 12px;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: 2px;
	box-shadow: none;
	transition: border-color 0.15s;
}
.bn-booking textarea,
.bn-guestbook textarea,
.bn-form textarea {
	min-height: 130px;
	resize: vertical;
}
.bn-booking :is(input, select, textarea):focus,
.bn-guestbook :is(input, select, textarea):focus,
.bn-form :is(input, select, textarea):focus {
	outline: none;
	border-color: var(--wp--preset--color--contrast);
	box-shadow: 0 0 0 1px var(--wp--preset--color--contrast);
}
.bn-booking label,
.bn-guestbook .gwolle-gb-write .label label,
.bn-form .evf-field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.bn-booking label:has(input[type="checkbox"], input[type="radio"]),
.bn-guestbook label:has(input[type="checkbox"]),
.bn-form label:has(input[type="checkbox"]) {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.625rem;
	font-size: 0.9375rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--muted);
}
.bn-booking input[type="checkbox"],
.bn-guestbook input[type="checkbox"],
.bn-form input[type="checkbox"] {
	width: 20px;
	height: 20px;
	accent-color: var(--wp--preset--color--sea);
}

/* Gemeinsame Schaltflächen */
.bn-booking :is(.wpbc_button_primary, input[type="button"].wpbc_button, .wpbc_button_light),
.bn-guestbook :is(.gwolle-gb-write-button input, .gwolle_gb_submit.button, input.gwolle_gb_preview),
.bn-form :is(.evf-submit, button[type="submit"], input[type="submit"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 24px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
	background-image: none;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: 2px;
	box-shadow: none;
	text-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}
.bn-booking :is(.wpbc_button_primary, input[type="button"].wpbc_button, .wpbc_button_light):hover,
.bn-guestbook :is(.gwolle-gb-write-button input, .gwolle_gb_submit.button, input.gwolle_gb_preview):hover,
.bn-form :is(.evf-submit, button[type="submit"], input[type="submit"]):hover {
	color: var(--wp--preset--color--contrast);
	background: transparent;
}
.bn-booking :is(.wpbc_button_primary, input[type="button"].wpbc_button):focus-visible,
.bn-guestbook :is(.gwolle-gb-write-button input, .gwolle_gb_submit.button):focus-visible,
.bn-form :is(.evf-submit, button[type="submit"]):focus-visible {
	outline: 2px solid var(--wp--preset--color--sea);
	outline-offset: 3px;
}
/* Sekundäre Schaltflächen (Vorschau) */
.bn-guestbook input.gwolle_gb_preview {
	color: var(--wp--preset--color--contrast);
	background: transparent;
}
.bn-guestbook input.gwolle_gb_preview:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
}

/* ------------------------------------------------------------------ */
/* WP Booking Calendar                                                 */
/* ------------------------------------------------------------------ */
.bn-booking {
	/* Farbschema des Kalenders – überschreibt die Variablen des Plugin-Skins */
	--wpbc_cal-day-cell-border-radius: 2px;
	--wpbc_cal-day-cell-border-width: 0px;
	--wpbc_cal-day-bg-color-opacity: 100%;
	--wpbc_cal-selected-day-bg-color-opacity: 100%;
	--wpbc_cal-text-general-size: 15px;
	--wpbc_cal-text-header-size: 22px;
	--wpbc_cal-text-weekdays-size: 12px;
	--wpbc_cal-text-prev-next-links-size: 24px;
	--wpbc_cal-main-background-color: #ffffff;
	--wpbc_cal-header-text-color: #1E2322;
	--wpbc_cal-text-prev-next-links-color: #1E2322;
	--wpbc_cal-text-weekdays-color: #4F5A56;
	--wpbc_cal-unavailable-day-color: transparent;
	--wpbc_cal-unavailable-text-color: #A39C8F;
	--wpbc_cal-available-day-color: #F6F4EF;
	--wpbc_cal-available-text-color: #1E2322;
	--wpbc_cal-approved-day-color: #D9D1C2;
	--wpbc_cal-approved-text-color: #6B655C;
	--wpbc_cal-pending-day-color: #D9D1C2;
	--wpbc_cal-pending-text-color: #6B655C;
	--wpbc_cal-selected-day-color: #2C5566;
	--wpbc_cal-selected-text-color: #ffffff;
	--wpbc_cal-hover-day-color: #D6E3E8;
	--wpbc_cal-hover-text-color: #1E2322;
	--wpbc_cal-timespartly-day-color: #ECE5D8;
	--wpbc_cal-timespartly-text-color: #4F5A56;
	--wpbc_cal-day-cells-padding: 2px;
}
/* Wechseltage (halb belegt): gleiche Farben, kräftigere Dreiecke */
.bn-booking .datepick-inline td.datepick-days-cell:is(.check_in_time, .check_out_time) {
	--wpbc_cal-approved-day-color: #D9D1C2;
	--wpbc_cal-pending-day-color: #D9D1C2;
}

/*
 * Älterer Kalender-Stil ohne Farbvariablen (live: Skin „Premium Marine“).
 * Gleiche Farben wie oben, direkt auf die Tageszellen gesetzt.
 */
.bn-booking .datepick-inline .datepick td.date_available .wpbc-cell-box {
	background: #F6F4EF;
}
.bn-booking .datepick-inline .datepick td.date_available a {
	color: #1E2322;
	text-shadow: none;
}
.bn-booking .datepick-inline .datepick td:is(.date_approved, .date2approve) .wpbc-cell-box,
.bn-booking .block_hints :is(.date_approved, .date2approve) .wpbc-cell-box {
	background: #D9D1C2;
}
.bn-booking .datepick-inline .datepick td:is(.date_approved, .date2approve) :is(a, span),
.bn-booking .block_hints :is(.date_approved, .date2approve) :is(a, span) {
	color: #6B655C;
	text-shadow: none;
}
.bn-booking .block_hints .date_available .wpbc-cell-box {
	background: #F6F4EF;
	box-shadow: inset 0 0 0 1px #E2DCD0;
}
.bn-booking .block_hints .date_available :is(a, span) {
	color: #1E2322;
}
.bn-booking .datepick-inline div.datepick-one-month .datepick td.datepick-days-cell-over .wpbc-cell-box {
	background: #D6E3E8;
}
.bn-booking .datepick-inline div.datepick-one-month .datepick td.datepick-days-cell-over a {
	color: #1E2322;
}
.bn-booking .datepick-inline div.datepick-one-month .datepick td.datepick-current-day .wpbc-cell-box {
	background: #2C5566;
}
.bn-booking .datepick-inline div.datepick-one-month .datepick td.datepick-current-day a {
	color: #fff;
	text-shadow: none;
}
.bn-booking .datepick-inline .datepick-unselectable :is(a, span) {
	color: #A39C8F;
}

/* „Weiter“ / „Zurück“ im zweistufigen Formular (Plugin setzt die helle Variante mit !important) */
.bn-booking .wpbc_container a.wpbc_button_light.wpbc_wizard_step_button {
	color: var(--wp--preset--color--base) !important;
	background: var(--wp--preset--color--contrast) !important;
	border-color: var(--wp--preset--color--contrast) !important;
	text-decoration: none;
}
.bn-booking .wpbc_container a.wpbc_button_light.wpbc_wizard_step_button:hover {
	color: var(--wp--preset--color--contrast) !important;
	background: transparent !important;
}
.bn-booking .wpbc_container a.wpbc_button_light.wpbc_wizard_step_button.wpbc_wizard_step_1 {
	color: var(--wp--preset--color--contrast) !important;
	background: transparent !important;
}
/*
 * Formular-Farben des Plugins: Es setzt sie als Variablen inline am Container,
 * daher hier mit !important überschreiben („Senden“ wäre sonst blau).
 */
.bn-booking .wpbc_container {
	--wpbc_form-button-background-color: #1E2322 !important;
	--wpbc_form-button-background-color-alt: #1E2322 !important;
	--wpbc_form-button-text-color: #F6F4EF !important;
	--wpbc_form-button-border-radius: 2px !important;
	--wpbc_form-button-light-background-color: transparent !important;
	--wpbc_form-button-light-text-color: #1E2322 !important;
	--wpbc_form-button-light-border-color: #1E2322 !important;
	--wpbc_form-button-light-hover-background-color: #1E2322 !important;
	--wpbc_form-button-light-hover-text-color: #F6F4EF !important;
	--wpbc_form-button-light-hover-border-color: #1E2322 !important;
	--wpbc_form-button-light-box-shadow: none !important;
	--wpbc_form-button-light-hover-box-shadow: none !important;
	--wpbc_form-field-background-color: #FFFFFF !important;
	--wpbc_form-field-border-color: #CFC8BA !important;
	--wpbc_form-field-focus-border-color: #1E2322 !important;
	--wpbc_form-field-focus-shadow-color: transparent !important;
	--wpbc_form-field-text-color: #1E2322 !important;
	--wpbc_form-label-color: #4F5A56 !important;
	--wpbc_form-choice-checked-color: #2C5566 !important;
	--wpbc_form-choice-focus-color: #2C5566 !important;
}
.bn-booking .wpbc_container .wpbc_button.wpbc_button_primary:hover {
	color: var(--wp--preset--color--contrast) !important;
	background: transparent !important;
}

/* Klassisches Formular: Label und Feld stehen durch <br> getrennt – Abstand übernimmt das Label */
.bn-booking .wpbc__field > label + br {
	display: none;
}

/* Rahmen um Kalender + Formular */
.bn-booking .wpbc_wizard__border_container,
.bn-booking .wpbc_container_booking_form {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	box-shadow: none;
}
.bn-booking .wpbc_wizard__border_container {
	padding: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 3vw, 2rem);
}
/* Tageszellen am Desktop etwas flacher als quadratisch, damit drei Monate ohne Scrollen sichtbar sind */
@media (min-width: 782px) {
	.bn-booking .datepick-inline .datepick td.datepick-days-cell,
	.bn-booking .datepick-inline .datepick td.datepick-days-cell .wpbc-cell-box {
		aspect-ratio: 5 / 4;
	}
}
/* Leeres Label über dem Kalender (klassisches Formular) braucht keinen Platz */
.bn-booking .wpbc_r_calendar > label:empty,
.bn-booking .wpbc_r_calendar > label:empty + br {
	display: none;
}
/* Volle Breite des Theme-Rasters nutzen (Plugin begrenzt sonst auf 900px) */
.bn-booking .wpbc_container,
.bn-booking .wpbc_wizard__border_container,
.bn-booking .bk_calendar_frame {
	width: 100%;
	max-width: none !important;
}

/* Kalender */
.bn-booking .bk_calendar_frame,
.bn-booking .datepick-inline {
	max-width: none;
	border: 0;
	box-shadow: none;
}
/* Mehrere Monate als gleichmäßiges Raster (sonst wird ein dritter Monat doppelt breit) */
.bn-booking .datepick-inline.datepick-multi {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	column-gap: 2rem;
	row-gap: 1.5rem;
	width: 100% !important;
}
.bn-booking .datepick-inline.datepick-multi > .calendar-links {
	grid-column: 1 / -1;
}
.bn-booking .datepick-inline.datepick-multi > .datepick-one-month {
	float: none;
	width: auto !important;
	margin: 0;
}
.bn-booking .datepick-inline.datepick-multi > div:empty {
	display: none;
}
.bn-booking .datepick-header,
.bn-booking .datepick-header * {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 400;
	letter-spacing: 0;
}
.bn-booking .datepick-title-row th {
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.bn-booking .datepick-days-cell a,
.bn-booking .datepick-days-cell span {
	font-weight: 400;
}
.bn-booking td.datepick-days-cell.date_approved,
.bn-booking td.datepick-days-cell.date2approve {
	cursor: not-allowed;
}
.bn-booking td.datepick-today .wpbc-cell-box {
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--contrast);
}

/* Legende */
.bn-booking .block_hints {
	margin-top: 1.25rem;
	padding-top: 1.125rem;
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}

/* Texte und Trennlinien aus dem Formular-Baukasten */
.bn-booking .wpbc_static_text[style*="font-weight:bold"],
.bn-booking .wpbc_static_text[style*="font-weight: bold"] {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 400 !important;
	line-height: 1.2;
}
.bn-booking small.wpbc_static_text,
.bn-booking .wpbc_field_description,
.bn-booking .wpbc_field_hint {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
.bn-booking .wpbc_bfb_divider {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
	opacity: 1;
}
.bn-booking .wpbc__row {
	row-gap: 1.125rem;
}
.bn-booking a {
	color: var(--wp--preset--color--sea);
}

/* Hinweise/Meldungen des Plugins */
.bn-booking .wpbc_front_end__message {
	border-radius: 2px;
	box-shadow: none;
	font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ */
/* Gwolle Guestbook                                                    */
/* ------------------------------------------------------------------ */
.bn-guestbook .gwolle-gb {
	max-width: 780px;
}

/* „Eintrag schreiben“-Knopf und Formular */
.bn-guestbook .gwolle-gb-write-button {
	margin: 0 0 2rem;
}
.bn-guestbook form.gwolle-gb-write {
	position: relative;
	margin: 0 0 3rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
}
.bn-guestbook form.gwolle-gb-write h3 {
	margin: 0 0 1.5rem;
	font-size: var(--wp--preset--font-size--x-large);
}
.bn-guestbook form.gwolle-gb-write > div:not([hidden]) {
	margin-bottom: 1.125rem;
}
.bn-guestbook form.gwolle-gb-write .label,
.bn-guestbook form.gwolle-gb-write .input {
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
}
.bn-guestbook form.gwolle-gb-write .clearBoth {
	display: none;
}
.bn-guestbook form.gwolle-gb-write .required {
	color: var(--wp--preset--color--contrast);
}
.bn-guestbook form.gwolle-gb-write .gb-notice-dismiss {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--muted);
	cursor: pointer;
}
.bn-guestbook .gwolle-gb-submit .input {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}
.bn-guestbook .gwolle-gb-submit .label {
	display: none;
}
.bn-guestbook .gwolle-gb-notice {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}
.bn-guestbook .gwolle-gb-notice br:first-child {
	display: none;
}
/* Rechenaufgabe / Antispam-Frage */
.bn-guestbook form.gwolle-gb-write [class*="antispam"] .label label,
.bn-guestbook form.gwolle-gb-write .gwolle_gb_antispam_question {
	text-transform: none;
	letter-spacing: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
}

/* Meldungen */
.bn-guestbook .gwolle-gb-messages,
.bn-guestbook .gwolle-gb-messages-top-container > div {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--wp--preset--color--sand);
	border: 0;
	border-radius: 2px;
	color: var(--wp--preset--color--contrast);
}
.bn-guestbook .gwolle-gb-messages.error,
.bn-guestbook .gwolle-gb-messages .error {
	color: #8A2A1F;
}

/* Liste der Einträge */
.bn-guestbook .gwolle-gb-total {
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
.bn-guestbook .gwolle-gb .gb-entry {
	position: relative;
	padding: 2rem 0;
	border-top: 1px solid var(--wp--preset--color--line);
	background: none;
}
.bn-guestbook .gb-entry article {
	margin: 0;
}
.bn-guestbook .gb-author-avatar {
	display: none;
}
.bn-guestbook .gb-author-info {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.875rem;
	margin-bottom: 0.75rem;
}
.bn-guestbook .gb-author-info br {
	display: none;
}
.bn-guestbook .gwolle-gb .gb-author-name,
.bn-guestbook .gwolle-gb .gb-author-name a {
	font-weight: 400;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.5rem;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.bn-guestbook .gb-author-name i,
.bn-guestbook .gb-moderator {
	font-style: normal;
}
.bn-guestbook .gb-author-origin,
.bn-guestbook .gb-datetime {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
.bn-guestbook .gb-entry-content {
	white-space: pre-line;
	font-size: 1.0625rem;
	line-height: 1.65;
}
.bn-guestbook .gb-entry-admin_reply {
	margin-top: 1.125rem;
	padding: 1rem 1.25rem;
	background: var(--wp--preset--color--sand);
	border: 0;
	border-radius: 2px;
	font-size: 0.9375rem;
}
.bn-guestbook .gb-admin_reply_uid,
.bn-guestbook .gb-admin_reply_uid em {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

/* „…“-Menü (Permalink/Bearbeiten) dezent */
.bn-guestbook .gb-metabox-handle {
	position: absolute;
	top: 1.75rem;
	right: 0;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--muted);
	cursor: pointer;
}
.bn-guestbook .gb-metabox {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.25);
	font-size: 0.875rem;
}

/* Seitennavigation */
.bn-guestbook .page-navigation {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 1.75rem;
	border-top: 1px solid var(--wp--preset--color--line);
}
.bn-guestbook .page-navigation :is(a, span) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.5rem;
	box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-size: 0.9375rem;
}
.bn-guestbook .page-navigation a:hover {
	border-color: var(--wp--preset--color--contrast);
}
.bn-guestbook .page-navigation .page-numbers.current,
.bn-guestbook .page-navigation span:not(.page-numbers.dots) {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* ------------------------------------------------------------------ */
/* Everest Forms (Kontakt)                                             */
/* ------------------------------------------------------------------ */
.bn-form .evf-container {
	margin: 0;
}
.bn-form .evf-container .evf-frontend-row {
	margin: 0;
	gap: 1.125rem;
}
.bn-form .evf-container .evf-field {
	padding: 0 0 1.125rem;
}
.bn-form .evf-container .evf-field-description,
.bn-form .evf-container .evf-field-sublabel {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
.bn-form .evf-container .evf-error,
.bn-form .evf-container label.evf-error {
	color: #8A2A1F;
	font-size: 0.875rem;
	text-transform: none;
	letter-spacing: 0;
}
.bn-form .everest-forms-notice {
	padding: 1rem 1.25rem;
	background: var(--wp--preset--color--sand);
	border: 0;
	border-radius: 2px;
	color: var(--wp--preset--color--contrast);
}
