/* mediarock Logo-Planer — Frontend
   Markenfarben/-schriften 1:1 von mediarock.de übernommen (identisch zum
   Webdesign-Projektplaner): Gold-Akzent #feca32, Anthrazit #292929/#2d2d2d,
   Playfair Display / Source Sans Pro. */

.lgp-wizard {
	--lgp-accent: #feca32;
	--lgp-accent-dark: #d9a900;
	--lgp-ink: #292929;
	--lgp-ink-soft: #2d2d2d;
	--lgp-muted: #6b6b6b;
	--lgp-tint: #faf7ef;
	--lgp-line: #e3e0d6;
	--lgp-danger: #c0392b;
	--lgp-danger-bg: #f8d7da;
	--lgp-success-bg: #d4edda;
	--lgp-success-ink: #155724;
	--lgp-font-heading: 'Playfair Display Custom', Georgia, 'Times New Roman', serif;
	--lgp-font-body: 'Source Sans Pro Custom', Helvetica, Arial, sans-serif;

	--lgp-sidebar: 300px;
	--lgp-gap: 56px;
	/* Abstand, den der automatische Schritt-Scroll oben frei lässt — verhindert,
	   dass ein fixierter Seiten-Header (z. B. die Divi-Nav beim Scrollen) die
	   neue Überschrift verdeckt. Bei Bedarf an die tatsächliche Header-Höhe
	   der Live-Site anpassen. */
	--lgp-scroll-offset: 100px;

	/* Großzügige Obergrenze, damit das Formular auf breiten Screens Raum nutzt,
	   aber Eingabefelder und Lesbarkeit nicht ins Uferlose gezogen werden. */
	max-width: 1440px;
	margin: 0 auto;
	font-family: var( --lgp-font-body );
	color: var( --lgp-ink );
	scroll-margin-top: var( --lgp-scroll-offset );
}

/* --- Breitbild-Layout: Sidebar-Stepper links, Formular rechts --- */

@media ( min-width: 1024px ) {
	.lgp-wizard {
		display: grid;
		grid-template-columns: var( --lgp-sidebar ) 1fr;
		column-gap: var( --lgp-gap );
		align-items: start;
	}

	/* Nach dem Absenden fällt die Sidebar weg -> Erfolgsmeldung nutzt die volle Breite. */
	.lgp-wizard.is-done {
		grid-template-columns: 1fr;
	}

	#lgp-form {
		min-width: 0; /* erlaubt der Aufschlüsselungs-Tabelle, in der Grid-Spalte zu schrumpfen */
	}

	.lgp-field {
		margin-bottom: 28px;
	}
}

.lgp-wizard * {
	box-sizing: border-box;
}

.lgp-wizard h2 {
	font-family: var( --lgp-font-heading );
	font-weight: 400;
	font-size: clamp( 24px, 4vw, 32px );
	letter-spacing: -0.01em;
	color: var( --lgp-ink );
	margin: 0 0 10px;
}

.lgp-step-intro {
	color: var( --lgp-muted );
	max-width: 56ch;
	margin: 0 0 32px;
	line-height: 1.6;
}

/* --- Fortschrittsanzeige --- */

.lgp-progress {
	margin-bottom: 40px;
}

.lgp-progress-bar {
	height: 4px;
	background: var( --lgp-line );
	margin-bottom: 16px;
}

.lgp-progress-fill {
	height: 100%;
	width: 12.5%;
	background: var( --lgp-accent );
	transition: width 0.35s ease;
}

@media ( prefers-reduced-motion: reduce ) {
	.lgp-progress-fill {
		transition: none;
	}
}

.lgp-progress-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: var( --lgp-muted );
}

.lgp-progress-steps li {
	position: relative;
	padding-left: 18px;
	transition: color 0.2s ease;
}

.lgp-progress-steps li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var( --lgp-line );
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.lgp-progress-steps li.is-active {
	color: var( --lgp-ink );
	font-weight: 600;
}

.lgp-progress-steps li.is-active::before {
	background: var( --lgp-accent );
	box-shadow: 0 0 0 3px rgba( 254, 202, 50, 0.25 );
}

.lgp-progress-steps li.is-done::before {
	background: var( --lgp-accent-dark );
}

.lgp-progress-label {
	display: none;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var( --lgp-muted );
}

@media ( max-width: 560px ) {
	.lgp-progress-steps {
		display: none;
	}

	.lgp-progress-label {
		display: block;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.lgp-progress-steps li,
	.lgp-progress-steps li::before {
		transition: none;
	}
}

/* Desktop: Sidebar bleibt beim Scrollen sichtbar, Schritte werden zum
   vertikalen, nummerierten Stepper mit Verbindungslinie. */
@media ( min-width: 1024px ) {
	.lgp-progress {
		position: sticky;
		top: 24px;
		margin-bottom: 0;
	}

	.lgp-progress-bar {
		margin-bottom: 28px;
	}

	.lgp-progress-steps {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0;
		counter-reset: lgp-step;
		font-size: 15px;
	}

	.lgp-progress-steps li {
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 0 0 24px;
		padding-left: 0;
		min-height: 30px;
	}

	.lgp-progress-steps li::before {
		counter-increment: lgp-step;
		content: counter( lgp-step );
		position: relative;
		left: auto;
		top: auto;
		z-index: 1;
		flex: 0 0 auto;
		width: 30px;
		height: 30px;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 2px solid var( --lgp-line );
		border-radius: 50%;
		background: #fff;
		color: var( --lgp-muted );
		font-size: 13px;
		font-weight: 700;
		box-shadow: none;
	}

	/* Verbindungslinie zwischen den Badges. */
	.lgp-progress-steps li::after {
		content: '';
		position: absolute;
		left: 14px;
		top: 30px;
		bottom: 0;
		width: 2px;
		background: var( --lgp-line );
		z-index: 0;
	}

	.lgp-progress-steps li:last-child::after {
		display: none;
	}

	.lgp-progress-steps li.is-active::before {
		border-color: var( --lgp-accent-dark );
		background: var( --lgp-accent );
		color: var( --lgp-ink );
		box-shadow: 0 0 0 4px rgba( 254, 202, 50, 0.22 );
	}

	.lgp-progress-steps li.is-done::before {
		content: '✓';
		border-color: var( --lgp-ink );
		background: var( --lgp-ink );
		color: #fff;
	}

	.lgp-progress-steps li.is-done::after {
		background: var( --lgp-ink );
	}
}

/* --- Steps --- */

.lgp-step {
	display: none;
}

.lgp-step.is-active {
	display: block;
	animation: lgp-fade-in 0.25s ease;
}

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

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

.lgp-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 240px, 1fr ) );
	gap: 20px 24px;
	margin-bottom: 8px;
}

.lgp-field {
	margin-bottom: 24px;
}

.lgp-field label,
.lgp-field > label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: var( --lgp-ink );
}

.lgp-hint {
	margin: 6px 0 0;
	font-size: 13px;
	color: var( --lgp-muted );
}

/* Erklärtext, der ÜBER einer Auswahl-Gruppe steht (Nutzungsrechte-Schritt):
   braucht Abstand nach unten statt nach oben und etwas mehr Lesekomfort,
   da hier juristische Begriffe erklärt werden. */
.lgp-hint--lead {
	margin: -2px 0 12px;
	max-width: 68ch;
	line-height: 1.55;
}

.lgp-wizard input[type="text"],
.lgp-wizard input[type="email"],
.lgp-wizard input[type="tel"],
.lgp-wizard input[type="url"],
.lgp-wizard input[type="number"],
.lgp-wizard select,
.lgp-wizard textarea {
	width: 100%;
	padding: 12px 14px;
	font-family: var( --lgp-font-body );
	font-size: 16px;
	color: var( --lgp-ink );
	background: #fff;
	border: 1px solid var( --lgp-line );
	border-radius: 2px;
	min-height: 44px;
}

.lgp-wizard textarea {
	resize: vertical;
	max-width: 720px;
}

/* Zahlenfelder bleiben schmal — ein 900px breites "Anzahl Seiten"-Feld wäre absurd. */
.lgp-wizard input[type="number"] {
	max-width: 220px;
}

.lgp-wizard input:focus,
.lgp-wizard select:focus,
.lgp-wizard textarea:focus {
	outline: none;
	border-color: var( --lgp-accent );
	box-shadow: 0 0 0 3px rgba( 254, 202, 50, 0.35 );
}

.lgp-wizard input:invalid.lgp-touched,
.lgp-wizard .lgp-field.lgp-error input,
.lgp-wizard .lgp-field.lgp-error .lgp-options {
	border-color: var( --lgp-danger );
}

.lgp-field-error {
	color: var( --lgp-danger );
	font-size: 13px;
	margin-top: 6px;
}

/* --- Auswahl-Karten (Radio/Checkbox) --- */

/* Auswahl-Gruppen (Radio UND Checkbox) einheitlich als gleichmäßiges Raster —
   gleiche Optik über alle Schritte hinweg. Auf großen Bildschirmen 2–3 Spalten,
   auf dem Handy einspaltig. */
.lgp-options {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 250px, 1fr ) );
	gap: 10px;
}

.lgp-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 40px 12px 16px;
	border: 1px solid var( --lgp-line );
	border-radius: 2px;
	cursor: pointer;
	font-size: 15px;
	line-height: 1.4;
	min-height: 44px;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

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

.lgp-option:hover {
	border-color: var( --lgp-accent-dark );
	background: var( --lgp-tint );
	transform: translateY( -1px );
	box-shadow: 0 4px 10px rgba( 41, 41, 41, 0.08 );
}

@media ( prefers-reduced-motion: reduce ) {
	.lgp-option:hover {
		transform: none;
	}
}

.lgp-option input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	accent-color: var( --lgp-accent-dark );
}

.lgp-option:has( input:checked ) {
	border-color: var( --lgp-accent-dark );
	background: var( --lgp-tint );
	font-weight: 600;
}

.lgp-options .lgp-option:has( input:checked )::after {
	content: '';
	position: absolute;
	right: 16px;
	top: 50%;
	width: 7px;
	height: 12px;
	border-right: 2px solid var( --lgp-ink );
	border-bottom: 2px solid var( --lgp-ink );
	transform: translateY( -60% ) rotate( 45deg );
}

.lgp-field--checkbox .lgp-option {
	padding-right: 16px;
	align-items: flex-start;
}

.lgp-field--checkbox .lgp-option input {
	margin-top: 3px;
}

.lgp-field--checkbox a {
	color: var( --lgp-ink );
	text-decoration: underline;
}

/* Honeypot — für echte Nutzer unsichtbar, für Formular-Bots nicht erkennbar als "leer lassen" */
.lgp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Bedingte Felder --- */

.lgp-conditional[hidden] {
	display: none;
}

/* --- Hinweise --- */

.lgp-notice {
	margin-top: 16px;
	padding: 14px 18px;
	border-radius: 2px;
	font-size: 14px;
	line-height: 1.55;
	background: var( --lgp-tint );
	border: 1px solid var( --lgp-line );
	color: var( --lgp-ink );
}

.lgp-notice[hidden] {
	display: none;
}

.lgp-notice strong {
	font-weight: 700;
}

/* Info: freundlicher Hinweis (z. B. externes Shopsystem einbindbar). */
.lgp-notice--info {
	background: var( --lgp-tint );
	border-color: var( --lgp-accent );
	color: var( --lgp-ink );
}

/* Blocker: gewählte Leistung wird aktuell nicht angeboten. */
.lgp-notice--block {
	background: var( --lgp-danger-bg );
	border-color: #f1aeb5;
	color: #842029;
}

/* --- Ergebnis-Step --- */

/* Auf breiten Screens: Preis-Box links, Aufschlüsselung rechts (Angebots-Optik). */
.lgp-result-grid {
	margin-bottom: 28px;
}

@media ( min-width: 860px ) {
	.lgp-result-grid {
		display: grid;
		grid-template-columns: minmax( 260px, 340px ) 1fr;
		gap: 40px;
		align-items: start;
	}

	.lgp-result-grid .lgp-price-result {
		margin-bottom: 0;
	}

	/* In der schmalen Angebotsspalte passen zwei fünfstellige Beträge nicht
	   nebeneinander -> vertikal stapeln, der Trennstrich wird zur Mittellinie. */
	.lgp-result-grid .lgp-price-range {
		flex-direction: column;
		gap: 6px;
	}

	.lgp-result-grid .lgp-price-range .lgp-price-sep {
		width: 40px;
	}
}

.lgp-price-result {
	background: var( --lgp-ink );
	color: #fff;
	padding: 40px 28px;
	text-align: center;
	margin-bottom: 28px;
	animation: lgp-price-in 0.5s cubic-bezier( 0.16, 1, 0.3, 1 );
}

@keyframes lgp-price-in {
	from {
		opacity: 0;
		transform: scale( 0.97 ) translateY( 8px );
	}
	to {
		opacity: 1;
		transform: scale( 1 ) translateY( 0 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.lgp-price-result {
		animation: none;
	}
}

.lgp-price-range {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 14px;
	font-family: var( --lgp-font-heading );
	font-size: clamp( 30px, 6vw, 44px );
	letter-spacing: -0.01em;
	color: var( --lgp-accent );
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.lgp-price-range .lgp-price-sep {
	width: 28px;
	height: 1px;
	background: rgba( 254, 202, 50, 0.4 );
	align-self: center;
}

@media ( max-width: 480px ) {
	.lgp-price-range {
		gap: 10px;
	}

	.lgp-price-range .lgp-price-sep {
		width: 16px;
	}
}

.lgp-price-note {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: rgba( 255, 255, 255, 0.7 );
}

/* Zusammensetzung (Design + Nutzungsrechte) direkt unter der Preis-Spanne —
   heller Trennstrich darüber, damit sie als Fußnote der Box liest. */
.lgp-price-compose {
	display: block;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid rgba( 255, 255, 255, 0.16 );
	font-size: 14px;
	color: rgba( 255, 255, 255, 0.85 );
	font-variant-numeric: tabular-nums;
}

.lgp-breakdown-heading {
	font-family: var( --lgp-font-body );
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var( --lgp-muted );
	margin: 0 0 12px;
}

/* Zweite Aufschlüsselungs-Tabelle (Nutzungsrechte-Zuschlag) braucht Abstand
   zur ersten (Design-Grundleistung). */
.lgp-breakdown-heading--nutzung {
	margin-top: 28px;
}

.lgp-breakdown-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	font-size: 14px;
}

.lgp-breakdown-table td {
	padding: 9px 4px;
	border-bottom: 1px solid var( --lgp-line );
}

.lgp-breakdown-table td:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	padding-left: 16px;
	color: var( --lgp-muted );
}

.lgp-breakdown-table tfoot td {
	padding-top: 10px;
	font-weight: 600;
	color: var( --lgp-ink );
}

.lgp-breakdown-table tfoot td:last-child {
	color: var( --lgp-ink );
}

.lgp-breakdown-table .lgp-breakdown-total {
	font-size: 16px;
}

.lgp-breakdown-table .lgp-breakdown-total td {
	border-top: 2px solid var( --lgp-ink );
	border-bottom: none;
}

.lgp-breakdown-table .lgp-breakdown-rate td {
	border-top: none;
	padding-top: 0;
	font-weight: 400;
	color: var( --lgp-muted );
	font-size: 13px;
}

.lgp-submit-feedback {
	margin-top: 16px;
	font-size: 14px;
}

.lgp-submit-feedback.is-error {
	color: var( --lgp-danger );
}

.lgp-submit-feedback.is-success {
	background: var( --lgp-success-bg );
	color: var( --lgp-success-ink );
	padding: 16px;
}

/* --- Navigation --- */

.lgp-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var( --lgp-line );
}

.lgp-btn {
	font-family: var( --lgp-font-body );
	font-size: 16px;
	font-weight: 600;
	padding: 14px 32px;
	border: 2px solid transparent;
	border-radius: 0;
	cursor: pointer;
	min-height: 44px;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

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

/* Längerer Button-Text (Schritt "Datenschutz" — macht die Speicherung
   transparent) braucht etwas weniger Schriftgröße, damit er nicht zu wuchtig wirkt. */
.lgp-btn--long {
	font-size: 14px;
	padding-left: 24px;
	padding-right: 24px;
}

.lgp-btn--primary {
	background: var( --lgp-accent );
	color: var( --lgp-ink );
	margin-left: auto;
}

.lgp-btn--primary:hover:not( :disabled ) {
	background: var( --lgp-accent-dark );
}

.lgp-btn--primary:active:not( :disabled ) {
	transform: translateY( 1px );
}

.lgp-btn--primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.lgp-btn--ghost {
	background: transparent;
	border-color: var( --lgp-line );
	color: var( --lgp-ink );
}

.lgp-btn--ghost:hover:not( :disabled ) {
	border-color: var( --lgp-ink );
	background: var( --lgp-tint );
}

.lgp-btn--ghost:active:not( :disabled ) {
	transform: translateY( 1px );
}

.lgp-btn--ghost:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

@media ( prefers-reduced-motion: reduce ) {
	.lgp-btn--primary:active:not( :disabled ),
	.lgp-btn--ghost:active:not( :disabled ) {
		transform: none;
	}
}

.lgp-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba( 254, 202, 50, 0.5 );
}

.lgp-wizard.is-done .lgp-nav,
.lgp-wizard.is-done .lgp-progress {
	display: none;
}

@media ( max-width: 480px ) {
	.lgp-nav {
		flex-direction: column-reverse;
	}

	.lgp-btn--primary,
	.lgp-btn--ghost {
		width: 100%;
		margin-left: 0;
		text-align: center;
	}
}
