/* Nordstern Anfrage – Formular in Schritten. Nutzt die Farben des Nordstern-Themes, falls vorhanden. */

.nsa-form {
	--nsa-primary: var(--wp--preset--color--primary, #0b4ea2);
	--nsa-primary-dark: var(--wp--preset--color--primary-dark, #08376f);
	--nsa-navy: var(--wp--preset--color--contrast, #001a5b);
	--nsa-line: var(--wp--preset--color--line, #dce5f0);
	--nsa-muted: var(--wp--preset--color--secondary, #4a5b73);
	--nsa-soft: var(--wp--preset--color--tertiary, #f2f6fb);
	display: grid;
	gap: 1.1rem;
	margin: 0;
	color: var(--nsa-navy);
	font-size: 1rem;
	line-height: 1.5;
}

.nsa-form [hidden] {
	display: none !important;
}

.nsa-step,
.nsa-group {
	display: grid;
	gap: 1rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.nsa-group {
	gap: 0.55rem;
}

.nsa-legend {
	margin-bottom: 0.25rem;
	padding: 0;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.nsa-legend:focus {
	outline: none;
}

.nsa-sublegend {
	margin-bottom: 0.1rem;
	padding: 0;
	font-size: 0.9375rem;
	font-weight: 600;
}

.nsa-choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
	gap: 0.55rem;
}

.nsa-choice {
	position: relative;
	display: block;
	cursor: pointer;
}

.nsa-choice input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.nsa-choice span {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 48px;
	height: 100%;
	padding: 0.7rem 0.95rem;
	border: 1.5px solid var(--nsa-line);
	border-radius: 12px;
	background: #fff;
	font-weight: 600;
	line-height: 1.3;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.nsa-choice input:hover + span {
	border-color: var(--nsa-primary);
}

.nsa-choice input:checked + span {
	border-color: var(--nsa-primary);
	background: #eaf2fc;
	box-shadow: inset 0 0 0 1px var(--nsa-primary);
}

.nsa-choice input:focus-visible + span {
	outline: 3px solid #01b0ee;
	outline-offset: 2px;
}

.nsa-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 0.9rem 1rem;
}

.nsa-field {
	display: grid;
	gap: 0.35rem;
}

.nsa-field label {
	font-size: 0.9375rem;
	font-weight: 600;
}

.nsa-optional {
	color: var(--nsa-muted);
	font-weight: 400;
}

.nsa-field input,
.nsa-field textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 0.9rem;
	border: 1.5px solid var(--nsa-line);
	border-radius: 10px;
	background: #fff;
	color: var(--nsa-navy);
	font: inherit;
}

.nsa-field input:focus,
.nsa-field textarea:focus {
	border-color: var(--nsa-primary);
	outline: 3px solid #01b0ee;
	outline-offset: 1px;
}

.nsa-progress {
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--nsa-soft);
}

.nsa-progress__bar {
	display: block;
	width: 25%;
	height: 100%;
	border-radius: inherit;
	background: var(--nsa-primary);
	transition: width 0.3s ease;
}

.nsa-status {
	margin: -0.4rem 0 0;
	color: var(--nsa-muted);
	font-size: 0.8125rem;
	font-weight: 600;
}

.nsa-form:not(.is-stepped) .nsa-progress,
.nsa-form:not(.is-stepped) .nsa-status {
	display: none;
}

.nsa-nav {
	display: flex;
	gap: 0.75rem;
}

.nsa-next {
	margin-left: auto;
}

.nsa-btn {
	min-height: 48px;
	padding: 0.75rem 1.4rem;
	border: 1.5px solid var(--nsa-primary);
	border-radius: 10px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.nsa-btn:focus-visible {
	outline: 3px solid #01b0ee;
	outline-offset: 2px;
}

.nsa-btn--primary {
	background: var(--nsa-primary);
	color: #fff;
}

.nsa-btn--primary:hover {
	border-color: var(--nsa-primary-dark);
	background: var(--nsa-primary-dark);
}

.nsa-btn--ghost {
	background: #fff;
	color: var(--nsa-primary);
}

.nsa-btn[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.nsa-submit {
	width: 100%;
}

.nsa-note {
	margin: 0;
	color: var(--nsa-muted);
	font-size: 0.8125rem;
}

.nsa-note a {
	color: var(--nsa-primary);
}

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

.nsa-alert {
	margin: 0 0 1rem;
	padding: 0.9rem 1rem;
	border-radius: 10px;
	font-weight: 600;
}

.nsa-alert--error {
	background: #fdecea;
	color: #b42318;
}

.nsa-alert--ok {
	background: #e8f5ee;
	color: #14532d;
}
