/* Bewerber Funnel – Frontend. Mobile-first, Touch-optimiert. */

.bf-body {
	margin: 0;
	background: var(--bf-bg, #f5f7fb);
	background-image: radial-gradient(1100px 520px at 50% -120px, color-mix(in srgb, var(--bf-primary) 12%, var(--bf-bg, #f5f7fb)), var(--bf-bg, #f5f7fb));
	background-attachment: fixed;
	font-family: var(--bf-font, sans-serif);
	color: var(--bf-text, #0f172a);
	-webkit-font-smoothing: antialiased;
}

/* Partikel-Layer (liegt hinter dem Inhalt) */
.bf-particles {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.bf-funnel { position: relative; z-index: 1; }

/* Glas-Effekt: Karte halbtransparent, Hintergrund/Partikel schimmern durch.
   Stärke in 3 Stufen einstellbar. Border + Highlight sorgen für den Glas-Look. */
.bf-glass .bf-card {
	-webkit-backdrop-filter: blur(16px) saturate(1.25);
	backdrop-filter: blur(16px) saturate(1.25);
	border: 1px solid rgba(255, 255, 255, .6);
	box-shadow: 0 10px 40px -12px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.bf-glass-light .bf-card  { background: color-mix(in srgb, var(--bf-card, #fff) 82%, transparent); }
.bf-glass-medium .bf-card { background: color-mix(in srgb, var(--bf-card, #fff) 62%, transparent); }
.bf-glass-strong .bf-card {
	background: color-mix(in srgb, var(--bf-card, #fff) 40%, transparent);
	-webkit-backdrop-filter: blur(22px) saturate(1.35);
	backdrop-filter: blur(22px) saturate(1.35);
}
/* Inputs auf der Glaskarte ebenfalls leicht transluzent, damit es stimmig wirkt */
.bf-glass-strong .bf-input,
.bf-glass-strong .bf-choice { background: color-mix(in srgb, #ffffff 70%, transparent); }
/* Stärkerer Hintergrund-Verlauf, damit der Glas-Effekt auch ohne Partikel sichtbar ist */
.bf-glass .bf-body,
.bf-body.bf-glass {
	background-image:
		radial-gradient(820px 480px at 12% 0%, color-mix(in srgb, var(--bf-primary) 24%, transparent), transparent 70%),
		radial-gradient(760px 520px at 92% 18%, color-mix(in srgb, var(--bf-accent) 22%, transparent), transparent 70%),
		radial-gradient(900px 600px at 50% 110%, color-mix(in srgb, var(--bf-primary) 16%, transparent), transparent 70%);
}

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

/* hidden-Attribut themenfest erzwingen (manche Themes überschreiben display
   auf Buttons und blenden so versteckte Elemente fälschlich wieder ein). */
.bf-funnel [hidden],
.bf-embed [hidden] { display: none !important; }

.bf-funnel {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
	font-family: var(--bf-font, sans-serif);
	color: var(--bf-text, #0f172a);
}

.bf-embed .bf-funnel { min-height: auto; padding: 0; }

/* Header / Logo */
.bf-header {
	width: 100%;
	max-width: 560px;
	display: flex;
	justify-content: center;
	padding: 8px 0 16px;
}
.bf-logo { max-height: 52px; max-width: 220px; object-fit: contain; }
.bf-logo-text { font-size: 20px; font-weight: 700; color: var(--bf-primary); }

/* Logo-Ausrichtung */
.bf-header.bf-logo-left { justify-content: flex-start; }
.bf-header.bf-logo-center { justify-content: center; }
.bf-header.bf-logo-right { justify-content: flex-end; }

/* Logo über die volle Breite */
.bf-header.bf-logo--full { display: block; }
.bf-header.bf-logo--full .bf-logo {
	display: block;
	width: 100%;
	max-width: 100%;
	max-height: none;
	height: auto;
}
.bf-header.bf-logo--full .bf-logo-text { display: block; width: 100%; text-align: center; }

/* Progress */
.bf-progress {
	width: 100%;
	max-width: 560px;
	height: 6px;
	background: rgba(0,0,0,.08);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 14px;
}
.bf-progress-bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--bf-primary);
	border-radius: 999px;
	transition: width .35s cubic-bezier(.4,0,.2,1);
}

/* Card */
.bf-card {
	width: 100%;
	max-width: 560px;
	background: var(--bf-card, #fff);
	border-radius: 20px;
	box-shadow: 0 10px 40px -12px rgba(0,0,0,.18);
	padding: 26px 22px;
	flex: 0 0 auto;
}

/* Hero */
.bf-hero { text-align: center; margin-bottom: 20px; }
.bf-hero-img { max-width: 100%; border-radius: 14px; margin-bottom: 14px; }
.bf-headline { font-size: 24px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
.bf-subline { font-size: 15px; color: #64748b; margin: 0; }

/* Steps */
.bf-step { animation: bf-slide .32s cubic-bezier(.25,.8,.35,1); }
@keyframes bf-slide { from { opacity: 0; transform: translateX(22px);} to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) {
	.bf-step { animation: none; }
}

/* Schritt-Zähler ("Frage 2 von 7") */
.bf-step-count {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bf-primary);
	margin: 0 0 8px;
}

.bf-field { margin-bottom: 18px; }
.bf-label { display: block; font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.bf-help { font-size: 13px; color: #64748b; margin: 0 0 10px; }
.bf-req { color: #ef4444; }

/* Inputs */
.bf-input {
	width: 100%;
	font-size: 16px; /* verhindert iOS-Zoom */
	font-family: inherit;
	color: inherit;
	padding: 14px 16px;
	border: 2px solid #e2e8f0;
	border-radius: var(--bf-radius, 14px);
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}
.bf-input:focus {
	outline: none;
	border-color: var(--bf-primary);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--bf-primary) 18%, transparent);
}
textarea.bf-input { resize: vertical; min-height: 110px; }

.bf-select-wrap { position: relative; }
.bf-select-wrap::after {
	content: "";
	position: absolute;
	right: 18px; top: 50%;
	width: 10px; height: 10px;
	border-right: 2px solid #94a3b8;
	border-bottom: 2px solid #94a3b8;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}
/* Select: feste Höhe + kein vertikales Padding => Browser zentriert den Text
   zuverlässig (verhindert abgeschnittenen Text bei appearance:none). */
.bf-select,
select.bf-input {
	height: 54px;
	line-height: normal;
	padding-top: 0;
	padding-bottom: 0;
	padding-right: 44px;
	text-overflow: ellipsis;
}

/* Choices (radio / checkbox als große Touch-Karten) */
.bf-choices { display: flex; flex-direction: column; gap: 10px; }
.bf-choice {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border: 2px solid #e2e8f0;
	border-radius: var(--bf-radius, 14px);
	cursor: pointer;
	user-select: none;
	transition: border-color .15s, background .15s;
	min-height: 56px;
}
.bf-choice:hover { border-color: color-mix(in srgb, var(--bf-primary) 45%, #e2e8f0); transform: translateY(-1px); box-shadow: 0 4px 14px -8px rgba(0,0,0,.18); }
.bf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bf-choice-box {
	flex: 0 0 auto;
	width: 24px; height: 24px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
	position: relative;
	transition: all .15s;
}
.bf-choice-box.bf-square { border-radius: 7px; }
.bf-choice-text { font-size: 16px; line-height: 1.4; }
.bf-choice input:checked ~ .bf-choice-box {
	border-color: var(--bf-primary);
	background: var(--bf-primary);
}
.bf-choice input:checked ~ .bf-choice-box::after {
	content: "";
	position: absolute;
	left: 7px; top: 3px;
	width: 6px; height: 11px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}
.bf-choice:has(input:checked) {
	border-color: var(--bf-primary);
	background: color-mix(in srgb, var(--bf-primary) 7%, #fff);
}
.bf-consent { align-items: flex-start; }
.bf-consent .bf-choice-text { font-size: 14px; color: #475569; }

/* Nav */
.bf-nav { display: flex; gap: 12px; margin-top: 22px; }
.bf-btn {
	flex: 1;
	font-size: 17px;
	font-weight: 600;
	font-family: inherit;
	padding: 16px 20px;
	border: none;
	border-radius: var(--bf-radius, 14px);
	cursor: pointer;
	transition: transform .08s, filter .15s, opacity .15s;
	min-height: 54px;
}
.bf-btn:active { transform: scale(.98); }
.bf-btn-primary {
	background: linear-gradient(180deg, color-mix(in srgb, var(--bf-primary) 86%, #fff), var(--bf-primary));
	color: #fff;
	box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--bf-primary) 60%, transparent);
}
.bf-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.bf-btn-primary:disabled { opacity: .6; cursor: default; }
.bf-btn-ghost { flex: 0 0 auto; background: transparent; color: #64748b; border: 2px solid #e2e8f0; }
.bf-btn-ghost:hover { border-color: #cbd5e1; }

/* Error */
.bf-error { color: #ef4444; font-size: 13px; margin: 8px 0 0; }
.bf-field.bf-invalid .bf-input,
.bf-field.bf-invalid .bf-choice { border-color: #ef4444; }

/* Success */
.bf-success { text-align: center; padding: 20px 6px; }
.bf-success-icon {
	width: 76px; height: 76px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--bf-accent, #22c55e);
	color: #fff;
	font-size: 40px;
	display: flex; align-items: center; justify-content: center;
	animation: bf-pop .4s cubic-bezier(.2,1.4,.5,1);
}
@keyframes bf-pop { from { transform: scale(0);} to { transform: scale(1);} }
.bf-success-title { font-size: 24px; margin: 0 0 10px; }
.bf-success-text { color: #64748b; font-size: 16px; line-height: 1.5; margin: 0; }

/* Honeypot */
.bf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.bf-footer {
	width: 100%; max-width: 560px;
	display: flex; gap: 18px; justify-content: center;
	margin-top: 22px; padding-bottom: 8px;
}
.bf-footer a { color: #94a3b8; font-size: 13px; text-decoration: none; }
.bf-footer a:hover { color: #64748b; text-decoration: underline; }

/* Consent-Link */
.bf-consent-link { color: var(--bf-primary); text-decoration: underline; }

/* Rechtsseiten (Datenschutz/Impressum) */
.bf-legal-card { max-width: 720px; text-align: left; }
.bf-legal-title { font-size: 24px; margin: 0 0 18px; font-weight: 700; }
.bf-legal-content { font-size: 15px; line-height: 1.7; color: #334155; }
.bf-legal-content h2 { font-size: 18px; margin: 22px 0 8px; color: var(--bf-text); }
.bf-legal-content ul { padding-left: 20px; }
.bf-legal-content li { margin-bottom: 6px; }
.bf-legal-content a { color: var(--bf-primary); }
.bf-legal-back { margin-top: 26px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.bf-legal-back a { color: var(--bf-primary); text-decoration: none; font-weight: 600; }

/* Desktop */
@media (min-width: 640px) {
	.bf-funnel { padding-top: 48px; }
	.bf-card { padding: 36px 34px; }
	.bf-headline { font-size: 28px; }
}
