/*
 * ARTiQ LeadGen 1.21.0 - Kontaktformular-Erweiterungen
 * Nur auf Seiten geladen, deren Formular eine der neuen Optionen nutzt. Laedt nach frontend.css.
 */

/* Nur fuer Screenreader sichtbar */
.af2_form_wrapper .af2_sr_only,
.af2_form_wrapper .af2_kf_label_sr .af2_question_text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Honeypot (zusaetzlich zum Inline-Style, falls ein Theme Inline-Styles ueberschreibt) */
.af2_form_wrapper .af2_kf_hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Verstecktes Feld */
.af2_form_wrapper .af2_question.af2_kf_verborgen {
    display: none !important;
}

/* ---------- Einstufiges Formular ---------- */
.af2_form_wrapper.af2_einstufig .af2_form_bottombar {
    display: none !important;
}
.af2_form_wrapper.af2_einstufig_ohne_titel .af2_form_heading_wrapper {
    display: none !important;
}
.af2_form_wrapper.af2_einstufig .af2_form_carousel {
    height: auto !important;
}
.af2_form_wrapper.af2_einstufig .af2_question {
    width: 100%;
}

/* ---------- Zweispaltiges Raster ---------- */
.af2_form_wrapper .af2_kf_raster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    /* Feld-Wrapper sind sonst je Feld 90 % breit und zentriert - im Raster gilt die Breite fuer das Raster,
       damit halbe und ganze Felder buendig abschliessen */
    width: 90%;
    margin: 0 auto;
}
.af2_form_wrapper .af2_kf_raster > .af2_question > .af2_question_wrapper {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.af2_form_wrapper .af2_kf_raster > .af2_question {
    width: auto !important;
    min-width: 0;
    grid-column: 1 / -1;
    /* .af2_question ist sonst per margin:auto zentriert - im Raster wuerde das Feld auf Inhaltsbreite schrumpfen */
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-self: stretch;
}
.af2_form_wrapper .af2_kf_raster > .af2_question.af2_kf_halb {
    grid-column: auto;
}
.af2_form_wrapper .af2_kf_raster > .af2_question.af2_kf_verborgen {
    display: none !important;
}
@media only screen and (max-width: 699px) {
    .af2_form_wrapper .af2_kf_raster {
        grid-template-columns: minmax(0, 1fr);
    }
    .af2_form_wrapper .af2_kf_raster > .af2_question.af2_kf_halb {
        grid-column: 1 / -1;
    }
}

/* ---------- Mehrzeiliger Text ---------- */
.af2_form_wrapper .af2_kf_textbereich_wrapper {
    align-items: stretch;
}
.af2_form_wrapper textarea.af2_kf_textbereich {
    width: 100%;
    height: auto !important;
    min-height: 6em;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
    box-sizing: border-box !important;
    /* wie die Eingabefelder (frontend.css: .af2_form_wrapper input) */
    border: solid 1px #ccc;
    outline: unset !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* ---------- Datei-Upload ---------- */
.af2_form_wrapper .af2_kf_datei {
    text-align: left;
}
.af2_form_wrapper .af2_kf_datei_zone {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 16px;
    border: 1px dashed rgba(0, 0, 0, .3);
    border-radius: 6px;
    background: rgba(0, 0, 0, .02);
    transition: border-color .15s ease, background-color .15s ease;
}
.af2_form_wrapper .af2_kf_datei_zone.is-ueber {
    border-color: rgba(0, 0, 0, .6);
    background: rgba(0, 0, 0, .05);
}
/* Natives Feld bleibt per Tastatur erreichbar, ist aber unsichtbar; der Knopf ist sein Label */
.af2_form_wrapper .af2_kf_datei_input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}
.af2_form_wrapper .af2_kf_datei_knopf {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid currentColor;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.3;
}
.af2_form_wrapper .af2_kf_datei_input:focus-visible + .af2_kf_datei_knopf {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.af2_form_wrapper .af2_kf_datei_hinweis {
    font-size: .85em;
    opacity: .75;
}
.af2_form_wrapper .af2_kf_datei_meldung {
    margin: 6px 0 0;
    color: #c00;
    font-size: .9em;
}
.af2_form_wrapper .af2_kf_datei_liste {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}
.af2_form_wrapper .af2_kf_datei_eintrag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: .9em;
}
.af2_form_wrapper .af2_kf_datei_name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.af2_form_wrapper .af2_kf_datei_eintrag.is-laedt .af2_kf_datei_status {
    opacity: .7;
}
.af2_form_wrapper .af2_kf_datei_entfernen {
    flex: 0 0 auto;
    padding: 2px 8px;
    border: 0;
    background: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-size: .9em;
}
