/*
 * Koenigshofer Formulare - Frontend. Nur ASCII.
 * Gestaltung angelehnt an das feratel/Deskline-Buchungswidget der Seite
 * Ferienwohnungen (weisse Karte, Schatten, Gold #bd8b41, Roboto, wenn
 * vom Widget geladen, sonst die Schrift der Seite).
 * Kontraste: Text auf Gold ist dunkel (#1f1f1e, 5,2:1), Absende-Button
 * dunkel mit weisser Schrift (11:1).
 * Raster: kurze Felder (.kf-field--half) stehen ab 767 px paarweise
 * nebeneinander, darunter alles einspaltig.
 */

.kf {
	--kf-gold: #bd8b41;
	--kf-gold-dark: #9c7134;
	--kf-gold-soft: #f6efe4;
	--kf-ink: #3c3c3b;
	--kf-ink-strong: #1f1f1e;
	--kf-grey: #5f5f5e;
	--kf-line: #c9c6c0;
	--kf-line-hover: #8f8b84;
	--kf-focus: #1f1f1e;
	--kf-error: #b3261e;
	--kf-font: Roboto, "Signika Negative", Helvetica, Arial, sans-serif;
	--kf-radius: 4px;
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--kf-font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--kf-ink);
	text-align: left;
}

.kf *,
.kf *::before,
.kf *::after {
	box-sizing: border-box;
}

/* Das hidden-Attribut muss immer gewinnen. */
.kf [hidden] {
	display: none !important;
}

/* Nur fuer Screenreader sichtbar. */
.kf .kf-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Honeypot: fuer Menschen unsichtbar, nicht per display:none (manche Bots pruefen das). */
.kf-hp {
	position: absolute !important;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.kf-anchor {
	display: block;
	position: relative;
	top: -120px;
	visibility: hidden;
}

/* ---------- Raster ---------- */

.kf-form {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 1.25em;
	row-gap: 0;
	margin: 0;
}

.kf-form > *,
.kf-group-inner > * {
	grid-column: 1 / -1;
	min-width: 0;
}

.kf-group-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 1.25em;
}

@media (min-width: 767px) {
	.kf-form,
	.kf-group-inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.kf-form > .kf-field--half,
	.kf-group-inner > .kf-field--half {
		grid-column: auto;
	}
}

.kf-form[aria-busy="true"] {
	cursor: progress;
}

.kf fieldset.kf-group {
	min-width: 0;
	margin: 0 0 1.5em;
	padding: 0;
	border: 0;
}

.kf .kf-legend {
	display: block;
	width: 100%;
	margin: 0 0 0.85em;
	padding: 0;
	border: 0;
	font-family: var(--kf-font);
	font-size: 1.125em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--kf-ink);
}

/* ---------- Felder ---------- */

.kf .kf-field {
	margin: 0 0 1.1em;
	padding: 0;
}

.kf .kf-label {
	display: block;
	margin: 0 0 0.35em;
	padding: 0;
	font-family: var(--kf-font);
	font-size: 0.875em;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: normal;
	text-transform: none;
	color: var(--kf-ink);
}

.kf .kf-req {
	font-weight: 700;
	color: var(--kf-ink);
}

.kf .kf-input {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 0.65em 0.8em;
	border: 1px solid var(--kf-line);
	border-radius: var(--kf-radius);
	background: #fff;
	box-shadow: none;
	font-family: var(--kf-font);
	/* Mindestens 16 px: sonst zoomt iOS beim Antippen hinein. */
	font-size: max(1em, 16px);
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	color: var(--kf-ink);
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kf .kf-select {
	padding-right: 2.4em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233c3c3b' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9em center;
	background-size: 12px 8px;
	cursor: pointer;
}

.kf input[type="date"].kf-input {
	min-height: 48px;
	line-height: 1.4;
}

.kf input[type="date"].kf-input::-webkit-calendar-picker-indicator {
	cursor: pointer;
	opacity: 0.7;
}

.kf .kf-textarea {
	line-height: 1.5;
	resize: vertical;
}

.kf .kf-input::placeholder {
	color: var(--kf-grey);
	opacity: 1;
}

.kf .kf-input:hover {
	border-color: var(--kf-line-hover);
}

.kf .kf-input:focus,
.kf .kf-input:focus-visible {
	outline: 2px solid var(--kf-focus);
	outline-offset: 2px;
	border-color: var(--kf-ink);
	box-shadow: none;
}

.kf .has-error .kf-input,
.kf .kf-input[aria-invalid="true"] {
	border-color: var(--kf-error);
	box-shadow: inset 0 0 0 1px var(--kf-error);
}

.kf .kf-help {
	margin: 0.35em 0 0;
	font-size: 0.8125em;
	line-height: 1.45;
	color: var(--kf-grey);
}

.kf .kf-error {
	margin: 0.35em 0 0;
	font-size: 0.875em;
	font-weight: 700;
	line-height: 1.4;
	color: var(--kf-error);
}

.kf .kf-error:empty {
	display: none;
}

/* ---------- Kontrollkaestchen ---------- */

.kf .kf-check {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
}

.kf .kf-checkbox {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0.15em 0 0;
	accent-color: var(--kf-ink);
	cursor: pointer;
	-webkit-appearance: checkbox;
	appearance: auto;
}

.kf .kf-checkbox:focus-visible {
	outline: 2px solid var(--kf-focus);
	outline-offset: 2px;
}

.kf .kf-check-label {
	margin: 0;
	font-size: 0.875em;
	font-weight: 400;
	line-height: 1.45;
	color: var(--kf-ink);
	cursor: pointer;
}

.kf .kf-check-label a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* ---------- Hinweise unter den Feldern ---------- */

.kf .kf-required-note {
	margin: 0.1em 0 0;
	font-size: 0.8125em;
	line-height: 1.5;
	color: var(--kf-grey);
}

.kf .kf-privacy {
	margin: 0.35em 0 0;
	font-size: 0.8125em;
	line-height: 1.55;
	color: var(--kf-grey);
}

.kf .kf-privacy a {
	color: var(--kf-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.kf .kf-privacy a:hover {
	text-decoration-thickness: 2px;
}

.kf .kf-privacy a:focus-visible {
	outline: 2px solid var(--kf-focus);
	outline-offset: 2px;
}

/* ---------- Absenden (wie der dunkle Button im Buchungswidget) ---------- */

.kf .kf-actions {
	margin: 1.5em 0 0;
}

.kf .kf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 14px 26px;
	border: 0;
	border-radius: var(--kf-radius);
	background: var(--kf-ink);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
	text-shadow: none;
	color: #fff;
	font-family: var(--kf-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.06s ease;
}

.kf .kf-btn:hover {
	background: var(--kf-ink-strong);
	color: #fff;
}

.kf .kf-btn:active {
	transform: translateY(1px);
}

.kf .kf-btn:focus-visible {
	outline: 2px solid var(--kf-focus);
	outline-offset: 3px;
}

.kf .kf-btn:disabled {
	cursor: progress;
	opacity: 0.65;
}

@media (max-width: 766.98px) {
	.kf .kf-btn {
		width: 100%;
	}
}

/* ---------- Meldungen ---------- */

.kf .kf-errors {
	margin: 0 0 1.5em;
	padding: 1em 1.25em;
	border-left: 4px solid var(--kf-error);
	border-radius: var(--kf-radius);
	background: #fdf3f2;
	font-size: 0.9375em;
	line-height: 1.5;
	color: var(--kf-ink);
}

.kf .kf-errors:focus {
	outline: none;
}

.kf .kf-errors:focus-visible {
	outline: 2px solid var(--kf-error);
	outline-offset: 2px;
}

.kf .kf-errors-title {
	margin: 0 0 0.3em;
	font-weight: 700;
	color: var(--kf-error);
}

.kf .kf-errors p {
	margin: 0 0 0.3em;
}

.kf .kf-errors ul {
	margin: 0;
	padding: 0 0 0 1.2em;
	list-style: disc;
}

.kf .kf-errors li {
	margin: 0;
}

.kf .kf-errors a {
	color: var(--kf-error);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.kf .kf-success {
	padding: 1.25em 1.5em;
	border-left: 4px solid var(--kf-gold);
	border-radius: var(--kf-radius);
	background: var(--kf-gold-soft);
	font-size: 1.0625em;
	line-height: 1.55;
	color: var(--kf-ink-strong);
}

.kf .kf-success:focus {
	outline: none;
}

.kf .kf-success p {
	margin: 0 0 0.5em;
}

.kf .kf-success p:last-child {
	margin-bottom: 0;
}

.kf-admin-note {
	padding: 0.8em 1em;
	border-left: 4px solid #bd8b41;
	background: #f6efe4;
	font-size: 0.9375em;
}

/* =====================================================================
 * Anfrage Ferienwohnung (.kf--stay): Karte wie im Buchungswidget,
 * oben der goldene Block mit Wohnung, Daten und Personen.
 * ===================================================================== */

.kf.kf--stay {
	max-width: none;
	padding: 1.75em 1.4em 1.6em;
	border-radius: 7px;
	background: #fff;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.11);
}

@media (min-width: 767px) {
	.kf.kf--stay {
		padding: 2em 1.75em 1.75em;
	}
}

.kf--stay .kf-group--aufenthalt .kf-legend {
	margin-bottom: 0.6em;
}

/* Goldener Block wie die Suchleiste im Widget. */
.kf--stay .kf-group--aufenthalt .kf-group-inner {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6em;
	padding: 0.9em;
	border-radius: 6px;
	background: var(--kf-gold);
}

/* Felder als weisse Kaesten mit kleiner Beschriftung (wie im Widget). */
.kf--stay .kf-group--aufenthalt .kf-field {
	position: relative;
	grid-column: auto;
	margin: 0;
	padding: 0.45em 0.7em 0.35em;
	border-radius: var(--kf-radius);
	background: #fff;
}

.kf--stay .kf-group--aufenthalt .kf-field-wohnung {
	grid-column: 1 / -1;
}

@media (min-width: 600px) {
	.kf--stay .kf-group--aufenthalt .kf-group-inner {
		grid-template-columns: 1fr 1fr 0.7fr 0.7fr;
	}
}

.kf--stay .kf-group--aufenthalt .kf-label {
	margin: 0;
	font-size: 0.8125em;
	font-weight: 400;
	color: var(--kf-grey);
}

.kf--stay .kf-group--aufenthalt .kf-input {
	min-height: 32px;
	padding: 0.1em 0;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	font-weight: 700;
	color: var(--kf-ink-strong);
}

.kf--stay .kf-group--aufenthalt input[type="date"].kf-input {
	min-height: 32px;
}

.kf--stay .kf-group--aufenthalt .kf-select {
	padding-right: 1.6em;
	background-position: right 0.1em center;
}

.kf--stay .kf-group--aufenthalt .kf-field:focus-within {
	outline: 2px solid var(--kf-ink-strong);
	outline-offset: 2px;
}

.kf--stay .kf-group--aufenthalt .kf-input:focus,
.kf--stay .kf-group--aufenthalt .kf-input:focus-visible {
	outline: none;
	box-shadow: none;
}

.kf--stay .kf-group--aufenthalt .has-error {
	box-shadow: inset 0 0 0 2px var(--kf-error);
}

.kf--stay .kf-group--aufenthalt .kf-error {
	font-size: 0.75em;
	line-height: 1.3;
}

.kf--stay .kf-group--person {
	margin-bottom: 0;
}

/* =====================================================================
 * Newsletter (.kf--inline .kf--newsletter): eine Zeile im goldenen
 * Footer-Balken. Platzhalter dunkel (5,8:1 auf #d7b789).
 * ===================================================================== */

.kf.kf--inline {
	max-width: none;
	margin: 0;
	font-family: inherit;
	color: #fff;
}

.kf--inline .kf-form {
	grid-template-columns: minmax(0, 1fr);
	column-gap: 12px;
	align-items: start;
}

.kf--inline .kf-field {
	margin: 0 0 10px;
}

.kf--inline .kf-input {
	min-height: 44px;
	height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: 0;
	background: #d7b789;
	font-family: inherit;
	font-size: max(1em, 16px);
	color: #1f1f1e;
}

.kf--inline .kf-input::placeholder {
	color: #3c3c3b;
	opacity: 1;
}

.kf--inline .kf-input:hover {
	border: 0;
}

.kf--inline .kf-input:focus,
.kf--inline .kf-input:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.kf--inline .kf-input:focus::placeholder {
	color: transparent;
}

.kf--inline .has-error .kf-input,
.kf--inline .kf-input[aria-invalid="true"] {
	box-shadow: inset 0 0 0 2px #7a1712;
}

.kf--inline .kf-actions {
	margin: 0 0 10px;
}

.kf--inline .kf-btn {
	width: 100%;
	min-height: 44px;
	height: 44px;
	padding: 0 24px;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: #3c3c3b;
	font-family: inherit;
	font-size: 1em;
	font-weight: 400;
	letter-spacing: normal;
	white-space: nowrap;
	transition: transform 0.06s ease, box-shadow 0.3s ease;
}

.kf--inline .kf-btn:hover {
	background: #fff;
	color: #1f1f1e;
	transform: scale(0.97);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.kf--inline .kf-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.kf--inline .kf-check-label,
.kf--inline .kf-check-label a {
	font-size: 14px;
	line-height: 1.35;
	color: #fff;
}

.kf--inline .kf-checkbox {
	width: 18px;
	height: 18px;
	margin-top: 0.1em;
	accent-color: #fff;
}

.kf--inline .kf-checkbox:focus-visible {
	outline-color: #fff;
}

/* Fehlermeldungen auf Gold: weisser Kasten mit dunkler Schrift. */
.kf--inline .kf-error {
	display: inline-block;
	margin-top: 4px;
	padding: 2px 6px;
	background: #fff;
	color: var(--kf-error);
	font-size: 13px;
}

.kf--inline .kf-error:empty {
	display: none;
}

.kf--inline .kf-errors {
	background: #fff;
	color: var(--kf-ink);
}

.kf--inline .kf-success {
	border-left-color: #fff;
	background: #fff;
	color: var(--kf-ink-strong);
	font-size: 1em;
}

@media (min-width: 769px) {
	.kf--inline .kf-form {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	}

	.kf--inline .kf-errors {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.kf--inline .kf-field-name {
		grid-column: 1;
		grid-row: 2;
	}

	.kf--inline .kf-field-email {
		grid-column: 2;
		grid-row: 2;
	}

	.kf--inline .kf-actions {
		grid-column: 3;
		grid-row: 2;
	}

	.kf--inline .kf-type-checkbox,
	.kf--inline .kf-privacy {
		grid-column: 1 / -1;
	}

	.kf--inline .kf-type-checkbox {
		grid-row: 3;
		margin-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kf *,
	.kf *::before,
	.kf *::after {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* Fehler im goldenen Block: Rahmen am Kasten, nicht am Eingabefeld. */
.kf--stay .kf-group--aufenthalt .has-error .kf-input,
.kf--stay .kf-group--aufenthalt .kf-input[aria-invalid="true"] {
	border: 0;
	box-shadow: none;
}
