/* Cookie consent — Delta D #51 (Figma 53:12314: banner 44:14305 / mobile 44:14318, modal 44:14330, Maps 44:14366).
   Brand: red #f04 (not Figma #d6003a), navy #012e55. Toggles are pure CSS. */

[hidden].mf-cookie-banner,
[hidden].mf-cookie-modal {
	display: none !important;
}

/* ---------- Banner ---------- */
.mf-cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	gap: 48px;
	padding: 32px 64px;
	background: #fff;
	box-shadow: 0 -8px 32px 0 rgba(1, 46, 85, 0.16);
	box-sizing: border-box;
}

.mf-cookie-banner:focus {
	outline: none;
}

.mf-cookie-banner-text {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mf-cookie-banner-title {
	margin: 0;
	font-family: "Cal Sans", "Source Sans 3", sans-serif;
	font-weight: 400;
	font-size: 22px;
	line-height: 1.4;
	text-transform: uppercase;
	color: #012e55;
}

.mf-cookie-banner-copy {
	margin: 0;
	font-family: "Source Sans 3", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
}

.mf-cookie-banner-links {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	font-family: "Source Sans 3", sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
}

.mf-cookie-banner-links a,
.mf-cookie-banner-links a:visited,
.mf-cookie-banner-links a:hover,
.mf-cookie-banner-links a:focus {
	color: #012e55;
	text-decoration: underline;
}

.mf-cookie-banner-actions {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.mf-cookie-link,
.mf-cookie-open {
	padding: 0;
	border: 0;
	background: none;
	font-family: "Source Sans 3", sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	appearance: none;
}

.mf-cookie-link {
	color: #012e55;
	text-decoration: underline;
	white-space: nowrap;
}

.mf-cookie-link:hover {
	color: #f04;
}

/* Footer control (legal row). Matches .theme-footer-legal-links a. */
.mf-cookie-open,
.mf-cookie-open:hover,
.mf-cookie-open:focus {
	color: #fff;
	font-size: inherit;
	white-space: nowrap;
}

.mf-cookie-open:hover,
.mf-cookie-open:focus {
	opacity: 0.85;
}

.theme-footer-legal-links {
	flex-wrap: wrap;
}

/* Focus (same ring as the form) */
.mf-cookie-banner .theme-button:focus-visible,
.mf-cookie-dialog .theme-button:focus-visible,
.mf-cookie-link:focus-visible,
.mf-cookie-open:focus-visible,
.mf-cookie-close:focus-visible,
.mf-cookie-banner-links a:focus-visible,
.mf-maps a:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px rgba(1, 46, 85, 0.18);
	border-radius: 6px;
}

.mf-cookie-banner .theme-button:focus-visible,
.mf-cookie-dialog .theme-button:focus-visible {
	border-radius: 10px;
}

.mf-cookie-open:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Keep the page readable above the fixed banner (e.g. Impressum, Datenschutz, footer). */
html.mf-cookie-banner-open body {
	padding-bottom: var(--mf-cookie-banner-h, 0px);
}

/* ---------- Modal ---------- */
.mf-cookie-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.mf-cookie-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(1, 46, 85, 0.5);
}

.mf-cookie-dialog {
	position: relative;
	width: 640px;
	max-width: 100%;
	max-height: 100%;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 40px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 64px 0 rgba(1, 46, 85, 0.2);
	box-sizing: border-box;
}

.mf-cookie-dialog:focus {
	outline: none;
}

html.mf-cookie-modal-open {
	overflow: hidden;
}

.mf-cookie-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.mf-cookie-dialog-title {
	margin: 0;
	font-family: "Cal Sans", "Source Sans 3", sans-serif;
	font-weight: 400;
	font-size: 26px;
	line-height: 1.3;
	color: #012e55;
}

.mf-cookie-close {
	flex-shrink: 0;
	padding: 4px 6px;
	border: 0;
	background: none;
	font-family: "Cal Sans", "Source Sans 3", sans-serif;
	font-size: 22px;
	line-height: 1.4;
	color: #012e55;
	cursor: pointer;
}

.mf-cookie-dialog-lead {
	margin: 0;
	font-family: "Source Sans 3", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
}

.mf-cookie-categories {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mf-cookie-category {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 20px;
	border: 1px solid #e4e8ec;
	border-radius: 12px;
	box-sizing: border-box;
}

.mf-cookie-category-text {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mf-cookie-category-title {
	font-family: "Source Sans 3", sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
	color: #012e55;
}

.mf-cookie-category-desc {
	margin: 0;
	font-family: "Source Sans 3", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.5;
	color: #444;
}

/* Toggle 44×24 — off: gray-blue, on: navy, locked "Notwendig": on + muted (Figma "Toggle / An") */
.mf-cookie-toggle {
	position: relative;
	flex-shrink: 0;
	display: block;
	width: 44px;
	height: 24px;
}

.mf-cookie-toggle input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.mf-cookie-toggle input:disabled {
	cursor: not-allowed;
}

.mf-cookie-toggle-ui {
	position: absolute;
	inset: 0;
	border-radius: 12px;
	background: #7a8b9c;
	transition: background-color 0.15s ease;
}

.mf-cookie-toggle-ui::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s ease;
}

.mf-cookie-toggle input:checked + .mf-cookie-toggle-ui {
	background: #012e55;
}

.mf-cookie-toggle input:checked + .mf-cookie-toggle-ui::after {
	transform: translateX(20px);
}

.mf-cookie-toggle input:disabled:checked + .mf-cookie-toggle-ui {
	background: #7a8b9c;
}

.mf-cookie-toggle input:focus-visible + .mf-cookie-toggle-ui {
	box-shadow: 0 0 0 4px rgba(1, 46, 85, 0.18);
}

.mf-cookie-dialog-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 12px;
}

/* ---------- Google Maps placeholder (Figma 44:14366) ---------- */
.mf-maps {
	width: 100%;
}

.mf-maps-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 240px;
	padding: 24px 28px;
	background: #f5f5f5;
	border: 1px solid #e4e8ec;
	border-radius: 16px;
	box-sizing: border-box;
	text-align: center;
}

.mf-maps-text {
	margin: 0;
	max-width: 362px;
	font-family: "Source Sans 3", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
}

.mf-maps-text a,
.mf-maps-text a:visited,
.mf-maps-text a:hover {
	color: #012e55;
	text-decoration: underline;
}

.mf-maps-always {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: "Source Sans 3", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	cursor: pointer;
}

.mf-maps-always input {
	appearance: none;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid #7a8b9c;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
}

.mf-maps-always input:checked {
	background: #012e55 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2 6l3 3 5-6'/%3E%3C/svg%3E") center / 11px no-repeat;
	border-color: #012e55;
}

.mf-maps-always input:focus-visible {
	outline: none;
	border-color: #012e55;
	box-shadow: 0 0 0 4px rgba(1, 46, 85, 0.18);
}

.mf-maps iframe {
	display: block;
	width: 100%;
	border: 0;
	border-radius: 16px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.mf-cookie-banner {
		gap: 32px;
		padding: 28px 32px;
	}

	.mf-cookie-banner-actions {
		flex-wrap: wrap;
		justify-content: flex-end;
	}
}

/* ---------- Mobile (Figma 44:14318): buttons stacked, "Einstellungen" text link under them ---------- */
@media (max-width: 767px) {
	.mf-cookie-banner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 24px 20px;
		max-height: 100vh;
		overflow-y: auto;
	}

	.mf-cookie-banner-title {
		font-size: 22px;
	}

	.mf-cookie-banner-actions {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 10px;
	}

	.mf-cookie-banner-actions .theme-button {
		width: 100%;
	}

	.mf-cookie-banner-actions .mf-cookie-link {
		order: 3;
		align-self: center;
		margin-top: 10px;
	}

	/* Full-screen sheet, buttons one under another */
	.mf-cookie-modal {
		padding: 0;
		align-items: stretch;
	}

	.mf-cookie-dialog {
		width: 100%;
		height: 100%;
		border-radius: 0;
		padding: 24px 20px;
		gap: 20px;
	}

	.mf-cookie-category {
		gap: 16px;
		padding: 16px;
	}

	.mf-cookie-dialog-actions {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.mf-cookie-dialog-actions .theme-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mf-cookie-toggle-ui,
	.mf-cookie-toggle-ui::after {
		transition: none;
	}
}
