/* 2G-Abschaltung: Geräteprüfung. Alles unter .g2f gekapselt.
   Look: helle Karte, links Eingabe, rechts Ergebnis-Kachel.
   Reines CSS, keine Grafiken (wegen CSP). Slider-Bilder kommen aus fileadmin. */

/* ---------- Karte ---------- */
.g2f {
	--g2f-orange: #F47825;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1.15fr);
	grid-template-areas:
		"intro   line result"
		"label   line result"
		"hint    line result"
		"input   line result"
		"note    line result"
		"button  line result"
		"support line result";
	grid-template-rows: auto auto auto auto auto auto 1fr;
	column-gap: 30px;
	margin: 10px 0 40px;
	padding: 30px 32px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid #e3e7ea;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(20, 40, 60, 0.10), 0 2px 6px rgba(20, 40, 60, 0.06);
}
.g2f * { box-sizing: border-box; }

/* Trennlinie zwischen den Spalten */
.g2f::before {
	content: "";
	grid-area: line;
	align-self: stretch;
	background: #dfe4e8;
}

/* Platzhalter rechts, solange noch kein Ergebnis da ist */
.g2f::after {
	content: "Ihr Ergebnis erscheint hier";
	grid-area: result;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 190px;
	padding: 20px;
	border: 2px dashed #d5dbe0;
	border-radius: 14px;
	color: #9aa4ac;
	font: 14px/1.4 Arial, sans-serif;
	text-align: center;
}
.g2f:has(.g2f-result:not([hidden]))::after,
.g2f:has(.g2f-slider:not([hidden]))::after { display: none; }

.g2f-intro {
	grid-area: intro;
	margin: 0 0 20px;
	max-width: 640px;
}
.g2f label {
	grid-area: label;
	display: block;
	margin: 0 0 8px;
	font: 14px/1.2 "Libre Franklin Bold", Arial, sans-serif;
	color: #555;
}

/* ---------- Eingabe, Hinweis, Button untereinander ----------
   .g2f-row wird "aufgelöst", damit der Hinweis zwischen Feld und Button passt */
.g2f-row { display: contents; }
.g2f-row .g2f-button { grid-area: button; max-width: 420px; margin-top: 14px; }
.g2f-row input {
	grid-area: input;
	width: 100%;
	max-width: 420px;
	height: 52px;
	padding: 0 16px;
	border: 1px solid #cfd5da;
	border-radius: 8px;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	font: 17px Arial, sans-serif;
	color: #333;
}
.g2f-row input:focus {
	outline: none;
	border-color: var(--g2f-orange);
	box-shadow: 0 0 0 3px rgba(244, 120, 37, 0.2);
}
/* Button ist nur Hülle: Farbe, Pfeile und Hover kommen von .cta-button aus dem Seiten-CSS */
.g2f-button {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.g2f-row .g2f-button,
.g2f-row .g2f-button .cta-button { display: block; width: 100%; }
.g2f-button .cta-button { display: block; }
/* Falls im Button kein .cta-button steckt: eigener oranger Button wie im Mockup */
.g2f-button:not(:has(.cta-button)) {
	min-height: 52px;
	padding: 0 24px;
	border-radius: 3px;
	background: var(--g2f-orange);
	color: #fff;
	font: bold 17px/52px "Libre Franklin Bold", Arial, sans-serif;
	text-align: center;
}
/* flach wie die Seiten-Buttons: kein Verlauf, kein Schatten, kein Hover-Effekt */
/* Kontakt-Button grün */
.g2f-button.g2f-support:not(:has(.cta-button)) { background: #2e9a3e; }
.g2f-button:focus-visible { outline: 3px solid rgba(244, 120, 37, 0.4); outline-offset: 2px; }
.g2f-button[hidden] { display: none; }
.g2f-button[disabled] { opacity: 0.6; cursor: wait; }
.g2f-support { grid-area: support; align-self: start; width: 100%; max-width: 420px; margin-top: 14px; }

/* Hinweis bei "betroffen": schlicht, direkt unter dem Eingabefeld */
.g2f-note {
	grid-area: note;
	max-width: 420px;
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #444;
}
.g2f-note[hidden] { display: none; }

.g2f-hint {
	grid-area: hint;
	max-width: 420px;
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.4;
	color: #6b7378;
}

/* ---------- Ergebnis-Kachel ----------
   ::before = runder Icon-Kreis, ::after = großes Status-Wort,
   darunter der Text aus dem DCE. */
.g2f-result {
	--g2f-farbe: #8a96a0;
	--g2f-hell: #f1f4f6;
	--g2f-text: #444;
	grid-area: result;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 190px;
	margin: 0;
	padding: 22px 20px;
	background: linear-gradient(160deg, #fff 0%, var(--g2f-hell) 100%);
	border: 1px solid rgba(0, 0, 0, 0.05);
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(20, 40, 60, 0.08);
	color: var(--g2f-text);
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	animation: g2f-rein 0.3s ease-out;
}
.g2f-result[hidden] { display: none; }

.g2f-result::before {
	order: -2;
	content: "";
	display: block;
	flex: none;
	width: 64px;
	height: 64px;
	margin: 0 0 10px;
	border-radius: 50%;
	background: var(--g2f-farbe);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
	color: #fff;
	font: bold 36px/64px Arial, "Segoe UI Symbol", "DejaVu Sans", sans-serif;
	text-align: center;
}
.g2f-result::after {
	order: -1;
	display: block;
	margin: 0 0 6px;
	color: var(--g2f-farbe);
	font: 900 24px/1.1 "Libre Franklin Bold", Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* ok / nicht betroffen: grüner Haken, READY */
.g2f-result--ok,
.g2f-result--nicht_betroffen,
.g2f-result--support_ok {
	--g2f-farbe: #2e9a3e;
	--g2f-hell: #e3f4e6;
	--g2f-text: #1f4d26;
}
.g2f-result--ok::before,
.g2f-result--nicht_betroffen::before,
.g2f-result--support_ok::before { content: "\2714"; font-size: 34px; }
.g2f-result--ok::after,
.g2f-result--nicht_betroffen::after { content: "Ready"; font-size: 40px; }
.g2f-result--support_ok::after { content: "Gesendet"; }

/* betroffen: rotes Ausrufezeichen */
.g2f-result--betroffen {
	--g2f-farbe: #d32f2f;
	--g2f-hell: #fde7e5;
	--g2f-text: #6e1c1c;
}
.g2f-result--betroffen::before { content: "!"; font-size: 40px; }
.g2f-result--betroffen::after  { content: "Wir helfen weiter"; }

/* unbekannt: graues Fragezeichen */
.g2f-result--unbekannt {
	--g2f-farbe: #6b7780;
	--g2f-hell: #e9edf0;
}
.g2f-result--unbekannt::before { content: "?"; }
.g2f-result--unbekannt::after  { content: "Nicht gefunden"; }

/* ungültige Eingabe: oranger Hinweis */
.g2f-result--ungueltig {
	--g2f-farbe: #F47825;
	--g2f-hell: #fdeee2;
	--g2f-text: #7a3608;
}
.g2f-result--ungueltig::before { content: "i"; font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.g2f-result--ungueltig::after  { content: "Eingabe prüfen"; }

/* technischer Fehler / Versand fehlgeschlagen */
.g2f-result--fehler,
.g2f-result--support_fehler {
	--g2f-farbe: #8a96a0;
	--g2f-hell: #e9edf0;
}
.g2f-result--fehler::before,
.g2f-result--support_fehler::before { content: "\00D7"; font-size: 42px; }
.g2f-result--fehler::after { content: "Nicht möglich"; }
.g2f-result--support_fehler::after { content: "Nicht gesendet"; }

/* ---------- Slider bei "betroffen" (Slides aus dem DCE) ---------- */
.g2f-slider {
	grid-area: result;
	position: relative;
	z-index: 1;
	align-self: start;
	min-width: 0;
	animation: g2f-rein 0.3s ease-out;
}
.g2f-slider[hidden] { display: none; }
.g2f-viewport {
	overflow: hidden;
	border-radius: 14px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 4px 14px rgba(20, 40, 60, 0.08);
}
.g2f-slides {
	display: flex;
	transition: transform 0.6s ease;
}
.g2f-slide {
	flex: 0 0 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.g2f-slide-img {
	display: block;
	width: 100%;
	height: auto;
}
.g2f-slide-body { padding: 18px 22px 22px; }
/* Nur Bild (+ Button): kein leerer Textbereich, Button mittig */
.g2f-slide-body:not(:has(*)) { display: none; }
/* Nur Bild + Button: Button liegt unten rechts auf dem Bild */
.g2f-slide { position: relative; }
.g2f-slide:has(.g2f-slide-img) .g2f-slide-body:not(:has(.g2f-slide-title, .g2f-slide-text)) {
	position: absolute;
	right: 16px;
	bottom: 16px;
	padding: 0;
}
.g2f-slide:has(.g2f-slide-img) .g2f-slide-body:not(:has(.g2f-slide-title, .g2f-slide-text)) .g2f-slide-btn {
	box-shadow: none;
}
.g2f-slide-body:not(:has(.g2f-slide-title, .g2f-slide-text)) { padding: 14px; text-align: center; }
.g2f-slide-title {
	margin: 0 0 8px;
	font: 20px/1.25 "Libre Franklin Bold", Arial, sans-serif;
	color: #222;
}
.g2f-slide-text {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #444;
}
.g2f-slide-btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 3px;
	background: var(--g2f-orange);
	color: #fff !important;
	font: bold 15px/1.2 "Libre Franklin Bold", Arial, sans-serif;
	text-decoration: none !important;
}
.g2f-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
}
.g2f-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #cfd5da;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}
.g2f-dot[aria-current="true"] { background: var(--g2f-orange); transform: scale(1.25); }
.g2f-dot:focus-visible { outline: 3px solid rgba(244, 120, 37, 0.4); outline-offset: 2px; }

@keyframes g2f-rein {
	from { opacity: 0; transform: scale(0.96); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.g2f-result, .g2f-slider { animation: none; }
	.g2f-slides { transition: none; }
}

/* ---------- Tablet / Handy: alles untereinander ---------- */
@media (max-width: 767px) {
	.g2f {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "intro" "label" "hint" "input" "note" "button" "result" "support";
		grid-template-rows: none;
		padding: 22px 16px;
	}
	.g2f::before, .g2f::after { display: none; }
	.g2f-row input, .g2f-row .g2f-button, .g2f-hint, .g2f-note, .g2f-support { max-width: none; }
	.g2f-result, .g2f-slider { margin-top: 18px; min-height: 0; }
	.g2f-support, .g2f-support .cta-button { width: 100%; }
}

/* Seiten-Button (.cta-button) im Formular: ohne Pfeile, Text mittig */
.g2f .cta-button::before,
.g2f .cta-button::after { display: none !important; }
.g2f .cta-button { padding-left: 22px !important; padding-right: 22px !important; text-align: center; border-radius: 8px !important; }
/* Höhe wie das Eingabefeld (52 px), wie beim früheren Button */
.g2f-button .cta-button { padding-top: 0 !important; padding-bottom: 0 !important; min-height: 52px; line-height: 52px !important; }
/* Kontakt-Button grün (flach, Rest vom Seiten-Button) */
.g2f-support .cta-button { background: #2e9a3e !important; background-color: #2e9a3e !important; }
/* Slide-Button: Schrift weiß (Seiten-CSS färbt Links sonst orange auf orange) */
.g2f a.cta-button, .g2f a.cta-button:hover, .g2f a.cta-button:visited { color: #fff !important; text-decoration: none !important; }
