/* Fairkauf Westmünsterland – Front-End-Styles.
   Auf .fkw-root beschränkt, damit das aktive Theme nicht überschrieben wird. */

html { scroll-behavior: smooth; }

.fkw-root {
	color: #1F3A5F;
	background: #fff;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-wrap: pretty;
	line-height: 1.5;
}
.fkw-root * { box-sizing: border-box; }

.fkw-root a {
	color: #1F3A5F;
	text-decoration-color: rgba(31, 58, 95, .35);
	text-underline-offset: 3px;
}
.fkw-root a:hover {
	color: #C9A24B;
	text-decoration-color: #C9A24B;
}

.fkw-root summary { list-style: none; cursor: pointer; }
.fkw-root summary::-webkit-details-marker { display: none; }

.fkw-root img { max-width: 100%; height: auto; }

/* Sichtbarkeit der Desktop-/Mobil-Call-to-Actions */
@media (min-width: 820px) {
	.fkw-root [data-mobilebar] { display: none !important; }
}
@media (max-width: 819px) {
	.fkw-root [data-deskcta] { display: none !important; }
}

/* Formular – Auswahl-Chips (Haus / Wohnung / Grundstück) */
.fkw-root .fkw-chip {
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	padding: 13px 22px;
	border-radius: 9px;
	cursor: pointer;
	background: #fff;
	color: #1F3A5F;
	border: 1.5px solid #D3DEEC;
	min-height: 48px;
	transition: background .15s, border-color .15s, color .15s;
}
.fkw-root .fkw-chip:hover { border-color: #C9A24B; }
.fkw-root .fkw-chip.is-active {
	font-weight: 600;
	background: #1F3A5F;
	color: #fff;
	border-color: #1F3A5F;
}

/* Formular – Textfelder */
.fkw-root .fkw-input {
	width: 100%;
	font: inherit;
	font-size: 16.5px;
	padding: 14px 15px;
	border: 1.5px solid #D3DEEC;
	border-radius: 9px;
	background: #fff;
	color: #1F3A5F;
}
.fkw-root .fkw-input:focus { border-color: #C9A24B; outline: none; }
.fkw-root .fkw-invalid { border-color: #C0392B !important; }

/* Kein-JavaScript: Inhalte sind ohnehin sichtbar (data-fade bleibt undefiniert),
   Fade-in wird nur per JS als Verbesserung ergänzt. */

/* ============================================================
   RECHTSTEXT-DIALOGE (Impressum & Datenschutz)
   ============================================================ */

/* Overlay/Hintergrund – deckt den gesamten Viewport ab. */
.fkw-root .fkw-legal-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000; /* über Sticky-Header und Mobil-Leiste */
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(12px, 4vw, 48px);
	background: rgba(9, 23, 43, .55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	overflow-y: auto; /* sehr kleine Bildschirme: gesamtes Overlay scrollt */
	overscroll-behavior: contain;
	animation: fkw-legal-fade .18s ease;
}
.fkw-root .fkw-legal-overlay[hidden] { display: none; }

@keyframes fkw-legal-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Dialog-Karte – Inhalt scrollt innerhalb der Karte. */
.fkw-root .fkw-legal-dialog {
	position: relative;
	width: min(760px, 100%);
	max-height: calc(100vh - clamp(24px, 8vw, 96px));
	margin: auto;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1F3A5F;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(9, 23, 43, .40);
	outline: none;
	animation: fkw-legal-pop .2s cubic-bezier(.22, .8, .3, 1);
}

@keyframes fkw-legal-pop {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

/* Kopfzeile mit Titel + Schließen-Button (bleibt beim Scrollen sichtbar). */
.fkw-root .fkw-legal-head {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px clamp(18px, 3vw, 30px);
	background: #fff;
	border-bottom: 1px solid #E1E8F0;
	border-radius: 14px 14px 0 0;
}
.fkw-root .fkw-legal-heading {
	margin: 0;
	font-size: clamp(19px, 2.6vw, 24px);
	font-weight: 700;
	letter-spacing: -.02em;
}
.fkw-root .fkw-legal-close {
	flex: none;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	color: #41567A;
	background: #F1F5FA;
	border: 1px solid #E1E8F0;
	border-radius: 9px;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.fkw-root .fkw-legal-close:hover {
	background: #E7EDF5;
	color: #1F3A5F;
	border-color: #C9A24B;
}
.fkw-root .fkw-legal-close:focus-visible {
	outline: 2px solid #C9A24B;
	outline-offset: 2px;
}

/* Scrollbarer Textbereich. */
.fkw-root .fkw-legal-body {
	padding: clamp(18px, 3vw, 30px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* Typografie der Rechtstexte. */
.fkw-root .fkw-legal-body h3 {
	margin: 26px 0 8px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #1F3A5F;
}
.fkw-root .fkw-legal-body h3:first-child { margin-top: 0; }
.fkw-root .fkw-legal-body p {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.7;
	color: #41567A;
}
.fkw-root .fkw-legal-body ul {
	margin: 0 0 12px;
	padding-left: 22px;
}
.fkw-root .fkw-legal-body li {
	margin: 0 0 6px;
	font-size: 15px;
	line-height: 1.65;
	color: #41567A;
}
.fkw-root .fkw-legal-body a { word-break: break-word; }
.fkw-root .fkw-legal-rule {
	border: 0;
	border-top: 1px solid #E1E8F0;
	margin: 22px 0 16px;
}
.fkw-root .fkw-legal-note {
	font-size: 13.5px;
	line-height: 1.6;
	color: #6B7F99;
	background: #F7F9FC;
	border: 1px solid #E4EBF3;
	border-radius: 9px;
	padding: 14px 16px;
}

/* Body-Scroll-Sperre, solange ein Dialog offen ist (per JS gesetzt). */
.fkw-legal-open,
.fkw-legal-open body { overflow: hidden !important; }

/* Weniger Bewegung, wenn vom Nutzer gewünscht. */
@media (prefers-reduced-motion: reduce) {
	.fkw-root .fkw-legal-overlay,
	.fkw-root .fkw-legal-dialog { animation: none; }
}
