/*
 * Vorsorge-Fördercheck – Frontend
 * Die Bausteine übernehmen die Schrift des Themes und setzen alle Farben
 * selbst, damit sie in jedem Theme lesbar bleiben.
 * Akzentfarbe: Einstellungen → Vorsorge-Fördercheck.
 */
.vfc {
	/* Akzent, Schrift auf Akzent und Seitenhintergrund setzt das Plugin aus dem Theme (VFC_Colors). */
	--vfc-accent: #1f5f8b;
	--vfc-on-accent: #ffffff;
	--vfc-bg: #ffffff;
	--vfc-good: #24734a;
	--vfc-warn: #9a6512;
	--vfc-bad: #a63a28;
	--vfc-radius: 12px;

	/* Neutraltöne: Rückfall für ältere Browser, sonst aus der Textfarbe des Themes gemischt. */
	--vfc-ink: currentColor;
	--vfc-muted: #5a6573;
	--vfc-line: #d8dee6;
	--vfc-grid: #e8ecf1;
	--vfc-field: #b9c2cd;
	--vfc-field-hover: #8e99a7;
	--vfc-soft: #f4f6f9;
	--vfc-tint: #eef4f8;
	--vfc-alt: #7d8794;
	--vfc-warn-bg: #fbf3e4;
	--vfc-bad-bg: #fbeceb;
	--vfc-good-bg: #e9f4ee;

	box-sizing: border-box;
	margin: 2rem 0;
	padding: clamp(16px, 3vw, 32px);
	border: 1px solid var(--vfc-line);
	border-radius: var(--vfc-radius);
	background: transparent;
	color: inherit;
	font-size: 1rem;
	line-height: 1.5;
}

@supports (color: color-mix(in srgb, red 10%, transparent)) {
	.vfc {
		--vfc-muted: color-mix(in srgb, currentColor 70%, transparent);
		--vfc-line: color-mix(in srgb, currentColor 18%, transparent);
		--vfc-grid: color-mix(in srgb, currentColor 10%, transparent);
		--vfc-field: color-mix(in srgb, currentColor 35%, transparent);
		--vfc-field-hover: color-mix(in srgb, currentColor 60%, transparent);
		--vfc-soft: color-mix(in srgb, currentColor 5%, transparent);
		--vfc-tint: color-mix(in srgb, var(--vfc-accent) 11%, transparent);
		--vfc-alt: color-mix(in srgb, currentColor 55%, transparent);
		--vfc-warn-bg: color-mix(in srgb, var(--vfc-warn) 14%, transparent);
		--vfc-bad-bg: color-mix(in srgb, var(--vfc-bad) 13%, transparent);
		--vfc-good-bg: color-mix(in srgb, var(--vfc-good) 14%, transparent);
	}
}

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

.vfc [hidden] {
	display: none !important;
}

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

/* Kopf */
.vfc-head {
	margin-bottom: 24px;
	max-width: 46rem;
}

.vfc-eyebrow {
	margin: 0 0 6px;
	color: var(--vfc-accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.vfc .vfc-title {
	margin: 0;
	color: var(--vfc-ink);
	font-size: clamp(1.3rem, 2.4vw, 1.65rem);
	line-height: 1.25;
	text-wrap: balance;
}

.vfc-lead {
	margin: 10px 0 0;
	color: var(--vfc-muted);
}

/* Formular */
.vfc-form {
	display: grid;
	gap: 22px;
}

.vfc fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.vfc legend {
	margin-bottom: 12px;
	padding: 0;
	color: var(--vfc-ink);
	font-size: 1.02rem;
	font-weight: 700;
}

.vfc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px 18px;
}

.vfc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
}

.vfc-label {
	color: var(--vfc-ink);
	font-size: 0.875rem;
	font-weight: 600;
}

.vfc-hint {
	margin: 0;
	color: var(--vfc-muted);
	font-size: 0.8rem;
}

.vfc input[type="number"],
.vfc input[type="text"],
.vfc input[type="email"],
.vfc input[type="tel"],
.vfc select,
.vfc textarea {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid var(--vfc-field);
	border-radius: 8px;
	background: var(--vfc-bg);
	color: inherit;
	font: inherit;
	font-size: 1rem;
	box-shadow: none;
}

.vfc input[type="number"] {
	font-variant-numeric: tabular-nums;
}

.vfc input:hover,
.vfc select:hover,
.vfc textarea:hover {
	border-color: var(--vfc-field-hover);
}

.vfc input[aria-invalid="true"] {
	border-color: var(--vfc-bad);
}

.vfc input::placeholder {
	color: var(--vfc-muted);
}

.vfc-beitrag {
	margin-top: 18px;
	padding: 16px 18px;
	border-radius: 10px;
	background: var(--vfc-soft);
}

.vfc-beitrag .vfc-label {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 4px 12px;
}

.vfc-beitrag-out {
	color: var(--vfc-accent);
	font-size: 1.05rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.vfc input[type="range"] {
	width: 100%;
	margin: 6px 0 0;
	accent-color: var(--vfc-accent);
}

.vfc-beitrag-monat {
	margin-top: 4px;
}

.vfc-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 0.95rem;
	cursor: pointer;
}

.vfc-check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
	accent-color: var(--vfc-accent);
}

.vfc-bonus {
	margin-top: 12px;
}

.vfc-partner {
	display: grid;
	gap: 16px;
	padding: 18px;
	border: 1px dashed var(--vfc-line);
	border-radius: 10px;
}

.vfc-kinder-liste {
	display: grid;
	gap: 12px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.vfc-kind {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	margin: 0;
}

.vfc-kind .vfc-field {
	flex: 1 1 160px;
}

.vfc-segment {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	border-radius: 10px;
	background: var(--vfc-soft);
}

.vfc-segment label {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.vfc-segment input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.vfc-segment span {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 7px;
	color: var(--vfc-muted);
	font-size: 0.92rem;
	font-weight: 600;
}

.vfc-segment input:checked + span {
	background: var(--vfc-bg);
	color: var(--vfc-ink);
	box-shadow: 0 1px 2px rgba(23, 33, 43, 0.12);
}

.vfc-segment input:focus-visible + span {
	outline: 2px solid var(--vfc-accent);
	outline-offset: 2px;
}

.vfc-modus-hint {
	margin-top: 8px;
	max-width: 46rem;
}

/* Schaltflächen */
.vfc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 20px;
	border: 1px solid var(--vfc-accent);
	border-radius: 8px;
	background: var(--vfc-accent);
	color: var(--vfc-on-accent);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.vfc-btn:hover {
	filter: brightness(1.08);
}

.vfc-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.vfc-btn-quiet {
	background: transparent;
	color: var(--vfc-accent);
}

.vfc-btn-quiet:hover {
	background: var(--vfc-tint);
	filter: none;
}

/* Ergebnis */
.vfc-result {
	display: grid;
	gap: 22px;
	margin-top: 30px;
	padding-top: 28px;
	border-top: 1px solid var(--vfc-line);
}

.vfc-verdict {
	padding: 18px 20px;
	border-radius: 10px;
	background: var(--vfc-soft);
}

.vfc-verdict.is-neu,
.vfc-verdict.is-alt {
	background: var(--vfc-tint);
}

.vfc-verdict-main {
	margin: 0;
	font-size: clamp(1.1rem, 2vw, 1.3rem);
	font-weight: 700;
	line-height: 1.35;
	text-wrap: balance;
}

.vfc-verdict-sub {
	margin: 6px 0 0;
	color: var(--vfc-muted);
	font-size: 0.92rem;
}

.vfc-sicht {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-self: start;
	padding: 4px;
	border-radius: 10px;
	background: var(--vfc-soft);
}

.vfc-tab {
	min-height: 38px;
	margin: 0;
	padding: 6px 16px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--vfc-muted);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	cursor: pointer;
}

.vfc-tab[aria-selected="true"] {
	background: var(--vfc-bg);
	color: var(--vfc-ink);
	box-shadow: 0 1px 2px rgba(23, 33, 43, 0.12);
}

.vfc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.vfc-card {
	min-width: 0;
	padding: 20px;
	border: 1px solid var(--vfc-line);
	border-radius: 10px;
	background: var(--vfc-bg);
}

.vfc-card.is-winner {
	border: 2px solid var(--vfc-accent);
	padding: 19px;
}

.vfc-card-head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 2px 10px;
}

.vfc .vfc-card-head h3 {
	margin: 0;
	color: var(--vfc-ink);
	font-size: 1.05rem;
	line-height: 1.3;
}

.vfc-card-sub {
	grid-column: 1 / -1;
	margin: 0;
	color: var(--vfc-muted);
	font-size: 0.85rem;
}

.vfc-badge {
	grid-column: 2;
	grid-row: 1;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--vfc-accent);
	color: var(--vfc-on-accent);
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}

.vfc-big {
	margin: 14px 0 12px;
}

.vfc-big-num {
	font-size: clamp(1.7rem, 3.4vw, 2.2rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.vfc-big-unit {
	display: block;
	color: var(--vfc-muted);
	font-size: 0.9rem;
}

.vfc-rows {
	margin: 0;
}

.vfc-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 0;
	border-top: 1px solid var(--vfc-grid);
	font-size: 0.92rem;
}

.vfc-row dt {
	margin: 0;
	color: var(--vfc-muted);
}

.vfc-row dd {
	margin: 0;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.vfc-row.is-key dt,
.vfc-row.is-key dd {
	color: var(--vfc-ink);
	font-weight: 700;
}

.vfc-empty {
	margin: 14px 0 0;
	color: var(--vfc-muted);
}

/* Diagramm */
.vfc-chart {
	margin: 0;
	padding: 18px 18px 14px;
	border: 1px solid var(--vfc-line);
	border-radius: 10px;
}

.vfc-chart figcaption {
	margin-bottom: 8px;
	font-weight: 700;
}

.vfc-svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.vfc-grid-line {
	stroke: var(--vfc-grid);
	stroke-width: 1;
}

.vfc-axis {
	fill: var(--vfc-muted);
	font-size: 11.5px;
	font-variant-numeric: tabular-nums;
}

.vfc-line {
	fill: none;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.vfc-line-neu {
	stroke: var(--vfc-accent);
	stroke-width: 3;
}

.vfc-line-alt {
	stroke: var(--vfc-alt);
	stroke-width: 2.25;
	stroke-dasharray: 7 5;
}

.vfc-schwelle {
	stroke: var(--vfc-field);
	stroke-width: 1;
	stroke-dasharray: 2 4;
}

.vfc-aktuell {
	stroke: var(--vfc-ink);
	stroke-width: 1.25;
	opacity: 0.55;
}

.vfc-dot-neu {
	fill: var(--vfc-accent);
	stroke: var(--vfc-bg);
	stroke-width: 2;
}

.vfc-dot-alt {
	fill: var(--vfc-alt);
	stroke: var(--vfc-bg);
	stroke-width: 2;
}

.vfc-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 10px 0 0;
	padding: 0;
	color: var(--vfc-muted);
	font-size: 0.82rem;
	list-style: none;
}

.vfc-legend li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
}

.vfc-legend li::before {
	content: "";
	display: inline-block;
	width: 20px;
	height: 0;
	border-top: 3px solid var(--vfc-accent);
}

.vfc-legend li.is-alt::before {
	border-top: 2px dashed var(--vfc-alt);
}

.vfc-legend li.is-akt::before {
	width: 0;
	height: 14px;
	border-top: 0;
	border-left: 1.5px solid var(--vfc-ink);
	opacity: 0.6;
}

.vfc-legend li.is-sw::before {
	width: 0;
	height: 14px;
	border-top: 0;
	border-left: 1.5px dotted var(--vfc-field);
}

/* Hinweise */
.vfc-hint-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vfc-hint-list li {
	margin: 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--vfc-soft);
	font-size: 0.92rem;
}

.vfc-hint-list li.vfc-hint-warnung {
	background: var(--vfc-warn-bg);
}

.vfc-hint-list li.vfc-hint-tipp {
	background: var(--vfc-tint);
}

.vfc-hint-tag {
	display: inline-block;
	margin-right: 4px;
	color: var(--vfc-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.vfc-hint-warnung .vfc-hint-tag {
	color: var(--vfc-warn);
}

.vfc-timing {
	margin: 0;
	color: var(--vfc-muted);
	font-size: 0.88rem;
}

.vfc-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.vfc-disclaimer {
	margin: 0;
	color: var(--vfc-muted);
	font-size: 0.8rem;
	line-height: 1.45;
}

/* Riester-Check */
.vfc-optionen {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 14px;
}

.vfc-option {
	min-width: 0;
	padding: 16px 18px;
	border: 1px solid var(--vfc-line);
	border-radius: 10px;
	background: var(--vfc-bg);
}

.vfc-option.is-tendenz {
	border: 2px solid var(--vfc-accent);
	padding: 15px 17px;
}

.vfc-option-head {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 2px 10px;
	margin-bottom: 10px;
}

.vfc .vfc-option-head h3 {
	margin: 0;
	color: var(--vfc-ink);
	font-size: 0.98rem;
	line-height: 1.3;
}

.vfc-ampel {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--vfc-warn);
}

.is-gruen .vfc-ampel { background: var(--vfc-good); }
.is-rot .vfc-ampel { background: var(--vfc-bad); }

.vfc-ampel-text {
	grid-column: 2;
	color: var(--vfc-muted);
	font-size: 0.8rem;
	font-weight: 600;
}

.is-gruen .vfc-ampel-text { color: var(--vfc-good); }
.is-rot .vfc-ampel-text { color: var(--vfc-bad); }
.is-gelb .vfc-ampel-text { color: var(--vfc-warn); }

.vfc-gruende {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-size: 0.88rem;
	list-style: none;
}

.vfc-gruende li {
	display: grid;
	grid-template-columns: 20px 1fr;
	gap: 6px;
	margin: 0;
}

.vfc-gruende li.is-neutral {
	display: block;
	color: var(--vfc-muted);
}

.vfc-sign {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border-radius: 50%;
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
}

.is-pro .vfc-sign { background: var(--vfc-good); }
.is-contra .vfc-sign { background: var(--vfc-bad); }

/* Anfrage */
.vfc textarea {
	min-height: 110px;
	resize: vertical;
}

.vfc-anfrage-form .vfc-check a {
	color: var(--vfc-accent);
}

.vfc-anfrage-form button[type="submit"] {
	justify-self: start;
}

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

.vfc-anfrage {
	position: relative;
}

.vfc-form-error {
	margin: 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--vfc-bad-bg);
	color: var(--vfc-bad);
	font-weight: 600;
}

.vfc-success {
	padding: 18px 20px;
	border-radius: 10px;
	background: var(--vfc-good-bg);
	color: var(--vfc-good);
	font-weight: 600;
}

@media (max-width: 480px) {
	.vfc-partner {
		padding: 14px;
	}

	.vfc-tab {
		padding: 6px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vfc-btn {
		transition: none;
	}
}

/* Rechenannahmen */
.vfc-annahmen {
	border: 1px solid var(--vfc-line);
	border-radius: 10px;
}

.vfc-annahmen summary {
	padding: 12px 16px;
	color: var(--vfc-ink);
	font-weight: 700;
	cursor: pointer;
}

.vfc-annahmen summary:focus:not(:focus-visible) {
	outline: none;
}

.vfc-annahmen[open] summary {
	border-bottom: 1px solid var(--vfc-line);
}

.vfc-annahmen-body {
	padding: 4px 16px 16px;
	font-size: 0.88rem;
	line-height: 1.5;
}

.vfc .vfc-annahmen h3 {
	margin: 16px 0 6px;
	color: var(--vfc-ink);
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.3;
	text-transform: uppercase;
}

.vfc .vfc-annahmen ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0 0 0 1.1em;
}

.vfc .vfc-annahmen li {
	margin: 0;
	color: var(--vfc-muted);
}

.vfc-steuer-opt {
	margin-top: 12px;
}

.vfc-row.is-off dt,
.vfc-row.is-off dd {
	text-decoration: line-through;
	text-decoration-color: var(--vfc-muted);
	opacity: 0.75;
}
