/* Pflege Funnel Formular – Frontend
 *
 * Alle Farben kommen aus CSS-Variablen, die im Adminbereich gesetzt werden.
 * Interaktive Elemente definieren ihre Farben in JEDEM Zustand (normal, hover,
 * focus, active) explizit und mit `.pf-wrap`-Präfix, damit Theme-Regeln wie
 * `button:hover { background: … }` das Formular nicht einfärben können.
 */

.pf-wrap {
	--pf-bg: #fdf5f3;
	--pf-card: #ffffff;
	--pf-border: #efe9e7;
	--pf-footer: #faf7f6;
	--pf-text: #333333;
	--pf-icon: #d2ac85;
	--pf-accent: #d2ac85;

	--pf-tile: #ffffff;
	--pf-tile-hover: #ffffff;
	--pf-tile-border: #d2ac85;
	--pf-tile-label: #333333;

	--pf-btn: #d2ac85;
	--pf-btn-text: #ffffff;
	--pf-btn-hover: #c19a70;

	--pf-nav: #efeae8;
	--pf-nav-icon: #7a7069;
	--pf-nav-hover: #d2ac85;
	--pf-nav-hover-icon: #ffffff;
	--pf-progress: #d2ac85;
	--pf-track: #e8e2df;

	--pf-input-bg: #ffffff;
	--pf-input-border: #e4dcd8;
	--pf-input-focus: #d2ac85;
	--pf-input-text: #333333;
	--pf-label: #4a4a4a;

	--pf-max: 1300px;

	max-width: var(--pf-max);
	margin: 0 auto;
	box-sizing: border-box;
	color: var(--pf-text);
	font-size: 16px;
}

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

.pf-card {
	background: var(--pf-card);
	border: 1px solid var(--pf-border);
	border-radius: 16px;
	padding: 6px;
	overflow: hidden;
}

.pf-stage {
	background: var(--pf-bg);
	border-radius: 12px 12px 0 0;
	padding: 46px 28px 34px;
	text-align: center;
}

.pf-headline {
	margin: 0 0 26px;
	font-size: clamp(20px, 2.4vw, 30px);
	font-weight: 400;
	line-height: 1.25;
	color: var(--pf-text);
}

.pf-question {
	margin: 0 0 34px;
	font-size: clamp(19px, 2.1vw, 26px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--pf-text);
}

.pf-subtext {
	margin: -20px auto 28px;
	max-width: 560px;
	font-size: 15px;
	line-height: 1.55;
	opacity: .75;
}

.pf-steps {
	position: relative;
}

.pf-step {
	display: none;
	animation: pf-fade .25s ease both;
}

.pf-step.is-active {
	display: block;
}

@keyframes pf-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pf-step { animation: none; }
}

/* ---------- Antwort-Kacheln ---------- */

.pf-options {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 22px 36px;
	margin: 0 auto;
	max-width: 900px;
}

.pf-wrap .pf-option,
.pf-wrap .pf-option:hover,
.pf-wrap .pf-option:focus,
.pf-wrap .pf-option:active {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-shadow: none;
	text-decoration: none;
	text-transform: none !important;
	cursor: pointer;
	font: inherit;
	color: inherit !important;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.pf-wrap .pf-option__box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 202px;
	height: 152px;
	max-width: 42vw;
	background: var(--pf-tile) !important;
	border: 2px solid transparent;
	border-radius: 8px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .10);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.pf-wrap .pf-option:hover .pf-option__box {
	background: var(--pf-tile-hover) !important;
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}

.pf-wrap .pf-option:focus-visible .pf-option__box {
	outline: 3px solid var(--pf-accent);
	outline-offset: 3px;
}

.pf-wrap .pf-option.is-selected .pf-option__box {
	border-color: var(--pf-tile-border);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}

.pf-icon {
	width: 78px;
	height: 78px;
	color: var(--pf-icon);
}

.pf-icon--flag {
	width: 92px;
	height: 92px;
}

.pf-option__dot {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--pf-icon);
	display: block;
}

.pf-option__label {
	font-size: 15px;
	line-height: 1.35;
	color: var(--pf-tile-label);
	max-width: 200px;
}

/* ---------- Kontaktschritt ---------- */

.pf-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 22px;
	max-width: 720px;
	margin: 0 auto;
	text-align: left;
}

.pf-field--full {
	grid-column: 1 / -1;
}

.pf-label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--pf-label);
}

.pf-req {
	color: #c0392b;
}

.pf-wrap .pf-input {
	display: block;
	width: 100%;
	height: 52px;
	margin: 0 !important;
	padding: 14px 16px !important;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--pf-input-text) !important;
	background: var(--pf-input-bg) !important;
	background-image: none !important;
	border: 1px solid var(--pf-input-border) !important;
	border-radius: 10px !important;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.pf-wrap textarea.pf-input {
	height: auto;
	min-height: 110px;
	resize: vertical;
}

.pf-wrap .pf-input::placeholder {
	color: #a9a19d;
	opacity: 1;
}

.pf-wrap .pf-input:focus,
.pf-wrap .pf-input:focus-visible {
	outline: none;
	border-color: var(--pf-input-focus) !important;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .05);
}

.pf-wrap .pf-field.has-error .pf-input,
.pf-wrap .pf-field.has-error .pf-dial {
	border-color: #c0392b !important;
}

.pf-field-error {
	display: none;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.4;
	color: #c0392b;
}

.pf-field.has-error .pf-field-error {
	display: block;
}

/* Telefon mit Ländervorwahl */

.pf-tel {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.pf-wrap .pf-dial {
	flex: 0 0 auto;
	width: 118px;
	height: 52px;
	margin: 0 !important;
	padding: 0 30px 0 14px !important;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--pf-input-text) !important;
	background-color: var(--pf-input-bg) !important;
	/* Eigener Pfeil statt System-Dropdown-Pfeil. */
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%238d827c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 9px center !important;
	background-size: 18px 18px !important;
	border: 1px solid var(--pf-input-border) !important;
	border-radius: 10px !important;
	box-shadow: none;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.pf-wrap .pf-dial:focus,
.pf-wrap .pf-dial:focus-visible {
	outline: none;
	border-color: var(--pf-input-focus);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .05);
}

.pf-tel .pf-input {
	flex: 1 1 auto;
	min-width: 0;
}

/* Datenschutz-Checkbox */

.pf-consent {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	max-width: 720px;
	margin: 22px auto 0;
	text-align: left;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}

.pf-wrap .pf-consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--pf-accent);
	cursor: pointer;
}

.pf-consent a {
	color: inherit;
}

.pf-submit-row {
	margin-top: 26px;
}

.pf-wrap .pf-submit,
.pf-wrap .pf-submit:hover,
.pf-wrap .pf-submit:focus,
.pf-wrap .pf-submit:active,
.pf-wrap .pf-submit:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 250px;
	margin: 0 !important;
	padding: 15px 32px !important;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--pf-btn-text) !important;
	background: var(--pf-btn) !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	text-shadow: none;
	text-decoration: none;
	text-transform: none !important;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.pf-wrap .pf-submit:hover {
	background: var(--pf-btn-hover) !important;
}

.pf-wrap .pf-submit:focus-visible {
	outline: 3px solid var(--pf-accent);
	outline-offset: 3px;
}

.pf-wrap .pf-submit:active {
	transform: translateY(1px);
}

.pf-wrap .pf-submit[disabled] {
	opacity: .65;
	cursor: default;
}

.pf-submit-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.pf-error {
	display: none;
	margin: 16px auto 0;
	max-width: 720px;
	font-size: 14px;
	color: #c0392b;
}

.pf-error.is-visible {
	display: block;
}

.pf-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Erfolg ---------- */

.pf-success-icon {
	margin-bottom: 18px;
	color: var(--pf-icon);
}

.pf-success-icon .pf-icon {
	width: 62px;
	height: 62px;
}

.pf-step--success .pf-subtext {
	margin-top: 0;
}

/* ---------- Fußzeile mit Fortschritt ---------- */

.pf-footer {
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 20px 24px;
	background: var(--pf-footer);
	border-radius: 0 0 12px 12px;
}

.pf-wrap .pf-nav,
.pf-wrap .pf-nav:hover,
.pf-wrap .pf-nav:focus,
.pf-wrap .pf-nav:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 44px;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--pf-nav) !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	color: var(--pf-nav-icon) !important;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.pf-nav svg {
	width: 24px;
	height: 24px;
}

.pf-wrap .pf-nav:hover:not([disabled]) {
	background: var(--pf-nav-hover) !important;
	color: var(--pf-nav-hover-icon) !important;
}

.pf-wrap .pf-nav:focus-visible {
	outline: 3px solid var(--pf-accent);
	outline-offset: 2px;
}

.pf-wrap .pf-nav[disabled] {
	opacity: .5;
	cursor: default;
}

.pf-progress {
	flex: 1 1 auto;
	height: 7px;
	background: var(--pf-track);
	border-radius: 99px;
	overflow: hidden;
}

.pf-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--pf-progress);
	border-radius: 99px;
	transition: width .3s ease;
}

.pf-footer--bare .pf-progress {
	visibility: hidden;
}

.pf-wrap.is-done .pf-footer {
	display: none;
}

/* ---------- Responsiv ---------- */

@media (max-width: 782px) {
	.pf-stage {
		padding: 32px 18px 26px;
	}

	.pf-options {
		gap: 18px;
	}

	.pf-wrap .pf-option__box {
		width: 150px;
		height: 120px;
	}

	.pf-icon {
		width: 60px;
		height: 60px;
	}

	.pf-icon--flag {
		width: 72px;
		height: 72px;
	}

	.pf-fields {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.pf-wrap .pf-submit,
	.pf-wrap .pf-submit:hover,
	.pf-wrap .pf-submit:focus,
	.pf-wrap .pf-submit:active {
		width: 100%;
		min-width: 0;
	}

	.pf-footer {
		padding: 16px;
		gap: 14px;
	}
}

@media (max-width: 420px) {
	.pf-wrap .pf-option__box {
		width: 132px;
		height: 106px;
	}

	.pf-option__label {
		font-size: 14px;
	}

	.pf-wrap .pf-dial {
		width: 104px;
		padding-right: 26px;
	}
}
