/* Gravity Forms im Design „Anfrageformular (8 Schritte)“.
   Das CSS von Gravity Forms ist abgeschaltet (inc/formular.php) – hier steht alles, was ein Formular braucht.
   Lädt nur auf Seiten mit Formular. */

.anfrage-karte { border-radius: 22px; background: var(--weiss); box-shadow: var(--schatten); border: 1px solid var(--linie); padding: 40px 44px; }
@media (max-width: 639px) { .anfrage-karte { padding: 24px 18px; border-radius: 18px; } }
.raster--formular { align-items: flex-start; }
.chips-hell { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.chips-hell li { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--weiss); font-size: 15px; font-weight: 700; }

/* Seitenleiste: vorhandene Infokästen */
.anfrage-leiste .aa-rail { display: flex; flex-direction: column; gap: 16px; }
.anfrage-leiste .aa-infokasten { padding: 22px; border-radius: 20px; background: var(--flaeche-2); }
.anfrage-leiste .aa-infokasten--gruen { background: var(--gruen-100); }
.anfrage-leiste .aa-infokasten h2 { font-size: 17px; margin: 0 0 6px; letter-spacing: 0; }
.anfrage-leiste .aa-infokasten p { font-size: 15px; color: var(--text-2); }

/* Grundgerüst */
.gform_wrapper { color: var(--text); }
.gform_wrapper form { margin: 0; }
.gform_heading { display: none; }
.gform_validation_container, .gform_wrapper .gform_hidden, .gfield--type-honeypot, .gform_wrapper .gfield_visibility_hidden { display: none !important; }
.gform_fields { display: flex; flex-direction: column; gap: 28px; }
.gfield { margin: 0; padding: 0; border: 0; min-width: 0; }
.gform_wrapper fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

/* Fragen */
.gfield_label, .gform_wrapper legend.gfield_label { display: block; margin: 0 0 14px; padding: 0; font-size: 25px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
.gform_page:not(:first-child) .aa-kein-sprung .gfield_label { font-size: 19px; letter-spacing: 0; }
.gform_wrapper .gfield--type-text .gfield_label, .gform_wrapper .gfield--type-email .gfield_label, .gform_wrapper .gfield--type-phone .gfield_label, .gform_wrapper .gfield--type-textarea .gfield_label, .gform_wrapper .gfield--type-fileupload .gfield_label { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0; }
.gfield_required { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.gfield_required .gfield_required { margin: 0; }
.gfield_description { margin-top: 8px; font-size: 14px; color: var(--text-3); }
.gfield--type-radio .gfield_description { margin: -6px 0 14px; }

/* Auswahl als Kacheln */
.gfield_radio, .gfield_checkbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gchoice { position: relative; min-width: 0; }
.gchoice input[type="radio"], .gchoice input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gchoice label {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 60px; padding: 10px 18px; border-radius: 14px; border: 1.5px solid var(--eingabe-rand);
	background: var(--weiss); font-size: 17px; font-weight: 700; line-height: 1.3; cursor: pointer;
}
.gchoice label::after { content: ""; flex: 0 0 24px; height: 24px; border-radius: 999px; border: 2px solid var(--eingabe-rand); background: var(--weiss); }
.gchoice label:hover { border-color: var(--gruen-400); }
.gchoice input:checked + label { border-color: var(--gruen-800); background: var(--gruen-100); box-shadow: inset 0 0 0 1px var(--gruen-800); }
.gchoice input:checked + label::after {
	border-color: var(--gruen-800);
	background: var(--gruen-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.gchoice input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Schritt 1: Gewerke mit Sinnbild */
#input_22_1 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#input_22_1 .gchoice label { flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 112px; padding: 14px; border-radius: 16px; hyphens: auto; overflow-wrap: anywhere; }
#input_22_1 .gchoice label::after { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; }
#input_22_1 .gchoice input:checked + label::after { background-color: var(--gruen-800); }
.aa-wahl-sinnbild { width: 44px; height: 44px; border-radius: 12px; background: var(--gruen-100); color: var(--gruen-800); display: flex; align-items: center; justify-content: center; }
.aa-wahl-sinnbild svg { width: 26px; height: 26px; stroke-width: 1.8; }
.gchoice input:checked + label .aa-wahl-sinnbild { background: var(--weiss); }
@media (max-width: 1179px) { #input_22_1 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) {
	.gfield_radio, .gfield_checkbox { grid-template-columns: minmax(0, 1fr); }
	#input_22_1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	#input_22_1 .gchoice label { font-size: 15px; min-height: 104px; }
	.gfield_label, .gform_wrapper legend.gfield_label { font-size: 22px; }
}

/* Eingabefelder */
.gform_wrapper input[type="text"], .gform_wrapper input[type="email"], .gform_wrapper input[type="tel"], .gform_wrapper input[type="number"], .gform_wrapper input[type="url"], .gform_wrapper select, .gform_wrapper textarea {
	width: 100%; height: 54px; border: 1px solid var(--eingabe-rand); border-radius: 12px; padding: 0 14px; font-size: 16px; color: var(--text); background: var(--weiss);
}
.gform_wrapper textarea { height: auto; min-height: 130px; padding: 12px 14px; line-height: 1.5; }
.gform_wrapper input:focus, .gform_wrapper textarea:focus, .gform_wrapper select:focus { outline: 0; border-color: var(--gruen-800); box-shadow: 0 0 0 3px rgba(1, 81, 57, .15); }
.gform_wrapper ::placeholder { color: #8A9A92; }
.ginput_container_fileupload input[type="file"] { width: 100%; padding: 14px; border: 1.5px dashed var(--eingabe-rand); border-radius: 12px; background: var(--flaeche-2); font-size: 15px; }
.gform_fileupload_rules, .ginput_counter { display: block; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.gform_page_fields .gfield--width-half { width: auto; }
@media (min-width: 640px) {
	.gform_fields:has(> .gfield--width-half) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
	.gform_fields:has(> .gfield--width-half) > .gfield:not(.gfield--width-half) { grid-column: 1 / -1; }
}

/* Einwilligung */
.ginput_container_consent { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--flaeche-2); }
.ginput_container_consent input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gruen-800); }
.ginput_container_consent label { font-size: 15px; font-weight: 500; color: var(--text-2); }
.gfield--type-consent .gfield_label { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }

/* Knöpfe */
.gform_page_footer, .gform_footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--linie); }
.gform_page_footer .gform_next_button, .gform_page_footer .gform_button, .gform_footer .gform_button, .gform_wrapper button.gform_next_button, .gform_wrapper input[type="submit"] {
	order: 2; margin-left: auto; min-height: 56px; padding: 0 30px; border: 0; border-radius: 999px; background: var(--gold); color: var(--text); font-size: 17px; font-weight: 800; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.gform_page_footer .gform_next_button:hover, .gform_wrapper input[type="submit"]:hover { background: #F2BD10; }
.gform_page_footer .gform_previous_button { order: 1; min-height: 50px; padding: 0 20px; border: 1.5px solid var(--linie); border-radius: 999px; background: var(--weiss); color: var(--text-2); font-size: 16px; font-weight: 700; cursor: pointer; -webkit-appearance: none; appearance: none; }
.gform_page_footer .gform_previous_button:hover { border-color: var(--gruen-800); color: var(--gruen-800); }
.gform_ajax_spinner { order: 3; width: 22px; height: 22px; }
@media (max-width: 639px) { .gform_page_footer .gform_next_button, .gform_wrapper input[type="submit"] { flex: 1 1 auto; } }

/* Fortschritt (Skript aus aa-core) */
.aa-fortschritt { margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.aa-fortschritt__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 800; color: var(--gruen-800); text-transform: uppercase; letter-spacing: .06em; }
.aa-fortschritt__zahl { color: var(--text-3); }
.aa-fortschritt__spur { display: block; height: 10px; border-radius: 999px; background: var(--gruen-100); overflow: hidden; }
.aa-fortschritt__balken { display: block; height: 100%; background: var(--gruen-800); border-radius: 999px; transition: width .25s; }
.gf_progressbar_wrapper, .gf_page_steps { display: none; }

/* Fehler und Bestätigung */
.gform_validation_errors { margin-bottom: 24px; padding: 16px 18px; border-radius: 14px; background: var(--rot-hell); color: #4A2219; }
.gform_validation_errors h2 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: 0; color: inherit; }
.gform_submission_error .gform-icon { display: none; }
.gfield_error .gchoice label, .gfield_error input, .gfield_error textarea { border-color: var(--rot); }
.gfield_validation_message, .validation_message { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--rot); }
.gform_confirmation_message, .gform_confirmation_wrapper { padding: 28px; border-radius: 20px; background: var(--gruen-100); font-size: 18px; color: var(--text); }
.gform_confirmation_message h2, .gform_confirmation_message h3 { font-size: 24px; margin-bottom: 8px; }

/* Partnerformular (Formular 21) und weitere Formulare im Fließtext */
.inhalt .gform_wrapper { margin-top: 24px; }
.inhalt .gform_wrapper .gfield_label { font-size: 17px; }
.inhalt .gchoice label { min-height: 52px; font-size: 16px; }
#field_22_13 .ginput_counter, #field_22_14 .ginput_counter { display: none; }
.gform_drop_area { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px; border: 1.5px dashed var(--eingabe-rand); border-radius: 14px; background: var(--flaeche-2); color: var(--text-2); font-size: 15px; }
.gform_drop_area .gform_button_select_files { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--gruen-800); border-radius: 999px; background: var(--weiss); color: var(--gruen-800); font-weight: 700; cursor: pointer; }
.ginput_preview { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; }
/* Platz für den Fortschrittsbalken freihalten (wird per Skript eingesetzt) – kein Layoutsprung. */
.anfrage-karte .gform_wrapper form { position: relative; padding-top: 66px; }
.anfrage-karte .aa-fortschritt { position: absolute; top: 0; left: 0; right: 0; margin: 0; }
/* Gravity versteckt das Formular, bis seine Skripte da sind – Schritt 1 hat keine bedingten Felder,
   also sofort zeigen (sonst springt die Seite beim Einblenden). */
.anfrage-karte .gform_wrapper { display: block !important; }
/* Hinweis auf eine Ausschreibung (Rechnerpaket anfrage-hinweis) */
.aa-anfrage-hinweis { margin: 20px 0 8px; padding: 18px 20px; border-radius: 16px; background: var(--gold-hell); color: var(--braun-text); display: flex; flex-direction: column; gap: 8px; }
.aa-anfrage-hinweis b { color: var(--gold-tief); font-size: 17px; }
.aa-anfrage-hinweis p { font-size: 15px; }
.aa-anfrage-hinweis__knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 4px; }
.aa-anfrage-hinweis .aa-as-knopf { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--gruen-800); color: var(--gruen-800); font-weight: 800; text-decoration: none; background: var(--weiss); }
.aa-anfrage-hinweis .aa-as-link { background: none; border: 0; padding: 0; color: var(--text-2); font-weight: 700; text-decoration: underline; cursor: pointer; }
#input_22_1 .gchoice label { hyphens: manual; overflow-wrap: break-word; }
@media (max-width: 400px) { #input_22_1 .gchoice label { font-size: 14px; padding: 12px; } }
