/**
 * PV-Funnel: Anpassungen & Schutz vor Elementor-reset.css
 *
 * Wo kommen Klassen wie sepv-text-brand her?
 * ───────────────────────────────────────────
 * Alle sepv-*-Klassen erzeugt der Tailwind-CDN (siehe inc/pv-funnel.php → tailwind.config).
 * Farben „brand“ / „funnelbg“ sind dort an CSS-Variablen angebunden – Sie ändern Werte
 * bequem hier (--sepv-brand, --sepv-funnelbg, …).
 *
 * Spezifität: In PHP ist tailwind.config.important = '.sepv-funnel-scope' gesetzt, damit
 * Utilities wie .sepv-text-brand als „.sepv-funnel-scope .sepv-text-brand“ ausgegeben werden
 * und Elementors globale Resets in der Regel übertreffen.
 */

.elementor .sepv-funnel-scope,
.sepv-funnel-scope {
	/* Markenfarben */
	--sepv-brand: #f65d2d;
	--sepv-funnelbg: #e5e5e5;
	--sepv-on-brand: #ffffff;

	/* Fließtext / UI auf hellem Grund */
	--sepv-text-body: #f65d2d;
	--sepv-text-muted: rgba(246, 93, 45, 0.85);

	/* Formularfelder (gegen Elementor-Input-Resets) */
	--sepv-input-bg: #ffffff;
	--sepv-input-text: var(--sepv-text-body);
	--sepv-input-border: rgba(0, 0, 0, 0.12);
	--sepv-input-placeholder: rgba(246, 93, 45, 0.45);

	/* Typo (optional überschreiben) */
	--sepv-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sepv-fs-kicker: 0.875rem;
	--sepv-fs-title: 1.25rem;
	--sepv-fs-lead: 1.125rem;
	--sepv-fs-body: 1rem;

	font-family: var(--sepv-font-sans);
	color: var(--sepv-text-body);
}

/* Kopfbereich: Schriftgrößen explizit (Tailwind-Klassen bleiben, hier Feintuning) */
.elementor .sepv-funnel-scope .sepv-bg-brand > p:first-of-type,
.sepv-funnel-scope .sepv-bg-brand > p:first-of-type {
	font-size: var(--sepv-fs-kicker);
}

.elementor .sepv-funnel-scope .sepv-bg-brand h2,
.sepv-funnel-scope .sepv-bg-brand h2 {
	font-size: var(--sepv-fs-title);
	line-height: 1.25;
}

/* Schritt kWp: erste Überschrift etwas größer */
.elementor .sepv-funnel-scope [data-sepv-panel="0"] > p:first-of-type,
.sepv-funnel-scope [data-sepv-panel="0"] > p:first-of-type {
	font-size: var(--sepv-fs-lead);
}

/* Vollbild-Start (wird per JS an body gehängt, damit fixed wirklich den Viewport füllt) */
html.sepv-pv-funnel-splash-open {
	overflow: hidden;
}

.sepv-start-splash .sepv-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sepv-start-splash {
	--sepv-brand: #f65d2d;
	--sepv-panel-dark: #d94820;
	--sepv-panel-light: #ff8f66;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	overflow: hidden;
	/* Sichtbarer Rand/Padding-Ring; Fläche füllen die Balken. */
	background: var(--sepv-brand);
	box-sizing: border-box;
	font-family: var(--sepv-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

.sepv-start-splash__logo-link {
	position: absolute;
	top: 40px;
	left: 40px;
	z-index: 3;
	display: block;
	width: 88px;
	height: 88px;
	line-height: 0;
}

.sepv-start-splash__logo-link:focus-visible {
	outline: 2px solid var(--sepv-funnelbg, #fff);
	outline-offset: 4px;
	border-radius: 4px;
}

.sepv-start-splash__logo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@media (min-width: 1024px) {
	.sepv-start-splash__logo-link {
		width: 125px;
		height: 125px;
	}
}

/* Unter den Balken: leicht anderer Ton, damit translateX beim Schließen sichtbar ist (sonst Orange auf Orange). */
.sepv-start-splash::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: var(--sepv-funnelbg, #e5e5e5);
}

/* Fünf horizontale Balken: im Ruhezustand eine durchgehende Orange-Fläche (keine Verläufe an den Fugen); beim Schließen nach links/rechts */
.sepv-start-splash__bars {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 0;
	pointer-events: none;
	/* Kein eigener Hintergrund: sonst Orange auf Orange beim translateX (Animation unsichtbar). Lücken schließen die Balken + border-Regel unten. */
}

.sepv-start-splash__bar {
	/* 0.01px-Basis mindert in WebKit/Blink oft 1px-Lücken zwischen flex:1-Zeilen */
	flex: 1 1 0.01px;
	min-height: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background-color: var(--sepv-brand);
	background-image: none;
	transform: translateX(0);
	transition: transform 0.58s cubic-bezier(0.38, 0.02, 0.22, 1);
	will-change: transform;
}

/* Überlappung + Linie in Brandfarbe: schließt die typische 1px-Fuge zwischen zwei Balken (nicht wirklich ein Border vom Theme) */
.sepv-start-splash__bar + .sepv-start-splash__bar {
	margin-top: -1px;
	border-top: 1px solid var(--sepv-brand);
}

.sepv-start-splash__bar:nth-child(1) {
	transition-delay: 0s;
}

.sepv-start-splash__bar:nth-child(2) {
	transition-delay: 0.05s;
}

.sepv-start-splash__bar:nth-child(3) {
	transition-delay: 0.1s;
}

.sepv-start-splash__bar:nth-child(4) {
	transition-delay: 0.15s;
}

.sepv-start-splash__bar:nth-child(5) {
	transition-delay: 0.2s;
}

.sepv-start-splash--leaving .sepv-start-splash__bar:nth-child(odd) {
	transform: translateX(-108%);
}

.sepv-start-splash--leaving .sepv-start-splash__bar:nth-child(even) {
	transform: translateX(108%);
}

.sepv-start-splash__inner {
	position: relative;
	z-index: 2;
	display: flex;
	max-width: min(48rem, 100%);
	flex-direction: column;
	align-items: stretch;
	gap: clamp(1rem, 3vw, 1.35rem);
	text-align: left;
	transition: opacity 0.34s ease, transform 0.34s ease;
}

/* Elementor-Kit-Typografie (Variablen nur auf Elementor-Seiten gesetzt; Fallbacks für andere Kontexte) */
.sepv-start-splash__heading {
	margin: 0;
	max-width: none;
	text-align: center;
	font-family: var(--e-global-typography-ef9fbd9-font-family), var(--sepv-font-sans, ui-sans-serif, system-ui, sans-serif);
	font-size: var(--e-global-typography-ef9fbd9-font-size, clamp(1.2rem, 3.8vw, 1.65rem));
	font-weight: var(--e-global-typography-ef9fbd9-font-weight, 700);
	text-transform: var(--e-global-typography-ef9fbd9-text-transform, none);
	line-height: var(--e-global-typography-ef9fbd9-line-height, 1.28);
	color: var(--e-global-color-secondary, #2e2e2e);
}

.sepv-start-splash__text {
	margin: 0;
	font-family: var(--e-global-typography-eb36648-font-family), var(--sepv-font-sans, ui-sans-serif, system-ui, sans-serif);
	font-size: var(--e-global-typography-eb36648-font-size, clamp(0.95rem, 2.4vw, 1.05rem));
	line-height: var(--e-global-typography-eb36648-line-height, 1.55);
	color: var(--e-global-color-secondary, #2e2e2e);
}

.sepv-start-splash__text--body {
	text-align: center;
	text-wrap: balance;
}

.sepv-start-splash__inner .sepv-start-splash__cta {
	align-self: center;
	margin-top: clamp(0.35rem, 2vw, 0.75rem);
	text-align: center;
}

.sepv-start-splash--leaving .sepv-start-splash__inner {
	opacity: 0;
	transform: translateY(-14px) scale(0.97);
}

.sepv-start-splash.sepv-start-splash--dismissed {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.sepv-start-splash__bar,
	.sepv-start-splash__inner {
		transition: none !important;
	}

	.sepv-start-splash--leaving .sepv-start-splash__bar,
	.sepv-start-splash--leaving .sepv-start-splash__inner {
		opacity: 0;
		transform: none;
	}
}

.sepv-start-splash__cta {
	min-width: min(18rem, 100%);
	padding: 0.9rem 1.5rem;
	font-family: inherit;
	font-size: clamp(1.05rem, 2.8vw, 1.25rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--sepv-brand);
	background: #fff;
	border: 0;
	border-radius: 0.75rem;
	box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transition: filter 0.15s ease;
}

.sepv-start-splash__cta:hover {
	filter: brightness(0.97);
}

/* Splash hängt an body: eigene Spezifität gegen Theme/Elementor */
body .sepv-start-splash button.sepv-start-splash__cta,
body.elementor-page .sepv-start-splash button.sepv-start-splash__cta {
	box-sizing: border-box;
	min-width: min(18rem, 100%);
	padding: 0.9rem 1.5rem;
	font-family: inherit;
	font-size: clamp(1.05rem, 2.8vw, 1.25rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--sepv-brand, #f65d2d);
	background: #fff;
	border: 0;
	border-radius: 0.75rem;
	box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.35);
	cursor: pointer;
}

body .sepv-start-splash button.sepv-start-splash__cta:hover,
body.elementor-page .sepv-start-splash button.sepv-start-splash__cta:hover {
	filter: brightness(0.97);
}

/* Eingaben: harte Rücksetzung gegen Elementor / Theme-Resets */
.elementor .sepv-funnel-scope input[type="email"],
.elementor .sepv-funnel-scope input[type="text"],
.elementor .sepv-funnel-scope input[type="range"],
.sepv-funnel-scope input[type="email"],
.sepv-funnel-scope input[type="text"],
.sepv-funnel-scope input[type="range"] {
	box-sizing: border-box;
	max-width: 100%;
	font-family: inherit;
	font-size: var(--sepv-fs-body);
	line-height: 1.5;
	color: var(--sepv-input-text);
	background-color: var(--sepv-input-bg);
	border-color: var(--sepv-input-border);
}

.elementor .sepv-funnel-scope input[type="email"]::placeholder,
.elementor .sepv-funnel-scope input[type="text"]::placeholder,
.sepv-funnel-scope input[type="email"]::placeholder,
.sepv-funnel-scope input[type="text"]::placeholder {
	color: var(--sepv-input-placeholder);
	opacity: 1;
}

.elementor .sepv-funnel-scope input[type="checkbox"],
.elementor .sepv-funnel-scope input[type="radio"],
.sepv-funnel-scope input[type="checkbox"],
.sepv-funnel-scope input[type="radio"] {
	width: auto;
	height: auto;
	max-width: none;
	accent-color: var(--sepv-brand);
}

/* Radio „Karten“: verstecktes native Radio nicht von display:none anderer Resets treffen */
.elementor .sepv-funnel-scope .sepv-sr-only,
.sepv-funnel-scope .sepv-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Buttons: Schrift/Box nicht von Elementor-Button-Styles leeren */
.elementor .sepv-funnel-scope button,
.sepv-funnel-scope button {
	box-sizing: border-box;
	font-family: inherit;
	cursor: pointer;
}

.elementor .sepv-funnel-scope button:disabled,
.sepv-funnel-scope button:disabled {
	cursor: not-allowed;
	opacity: 0.65;
}

/* Links in Checkbox-Zeile (Datenschutz) */
.elementor .sepv-funnel-scope a.sepv-underline,
.sepv-funnel-scope a.sepv-underline {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.kalkulator-heading {
	font-size: clamp(18px, 4vw, 20px);
	font-weight: 700;
	line-height: 1.2;
}

.kalkulator-paragraph {
	font-size: 18px;
	line-height: 1.2em;
	font-weight: 400;
}

/* Dachfoto-Upload: Dropzone-Zustand */
.elementor .sepv-funnel-scope .sepv-roof-dropzone.sepv-roof-dropzone--drag,
.sepv-funnel-scope .sepv-roof-dropzone.sepv-roof-dropzone--drag {
	border-color: var(--sepv-brand) !important;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 0 0 3px rgba(246, 93, 45, 0.18);
}

/* Letzter Step: E-Mail-Card absetzen + Eingabetext in Projekt-Schwarz */
.elementor .sepv-funnel-scope .sepv-email-card,
.sepv-funnel-scope .sepv-email-card {
	box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.38);
}

.elementor .sepv-funnel-scope #sepv-email,
.sepv-funnel-scope #sepv-email {
	color: #2e2e2e !important;
}

.elementor .sepv-funnel-scope #sepv-email::placeholder,
.sepv-funnel-scope #sepv-email::placeholder {
	color: rgba(46, 46, 46, 0.62);
}

/* kWp: große Zahleneingabe (Schwarz, nicht Marken-Orange) */
.elementor .sepv-funnel-scope .sepv-kwp-input-field,
.sepv-funnel-scope .sepv-kwp-input-field {
	color: #2e2e2e !important;
}