/* ============================================================
   UNIPLUS Formularwesen V2 — Frontend Styles
   Bootstrap 3 / 4 / 5 kompatibel
   ============================================================ */

/* ── Honeypot (für Menschen unsichtbar, NICHT display:none) ── */
.uni-fv2-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ── Formular-Wrapper ──────────────────────────────────────── */
.uni-formular-v2 {
    position: relative;
}

/* ── Pflichtfeld-Stern ─────────────────────────────────────── */
.uni-fv2-required {
    color: #c0392b;
    margin-left: 2px;
}

/* ── Hilfetext / Subtitle ──────────────────────────────────── */
.uni-fv2-subtitle {
    display: block;
    font-size: 0.85em;
    margin-top: 2px;
    margin-bottom: 4px;
    color: #6c757d;
}

/* ── Validierungsfeedback ──────────────────────────────────── */

.uni-fv2-field .invalid-feedback {
    display: none;
}

.uni-fv2-field-error .invalid-feedback {
    display: block;
}

/* Red border on inputs and selects when field has an error */
.uni-fv2-field-error .form-control,
.uni-fv2-field-error .form-select {
    border-color: #dc3545;
}

/* ── Submit / Actions ──────────────────────────────────────── */
.uni-fv2-actions {
    margin-top: 12px;
    text-align: right !important;
}

.uni-fv2-submit[disabled],
.uni-fv2-submit.loading {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Captcha ───────────────────────────────────────────────── */
.uni-fv2-captcha {
    /* inherits mb-3 via field wrapper */
}

/* ── Headline / Trenner ────────────────────────────────────── */
.uni-fv2-headline {
    margin-top: 20px;
    margin-bottom: 4px;
}

.uni-fv2-headline__text {
    font-size: 1.1em;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

/* ── Callout ───────────────────────────────────────────────── */
.uni-fv2-callout {
    margin-bottom: 8px;
}

/* ── Erfolgsmeldung ────────────────────────────────────────── */
.uni-fv2-success {
    margin-top: 16px;
}

/* ── Datei-Upload ──────────────────────────────────────────── */
.uni-fv2-file input[type="file"] {
    padding: 4px;
}

/* ── Bootstrap 3 Brücke: col-xs-* → col-* ─────────────────── */
/*
   Bootstrap 3 nutzt .col-xs-{n} als kleinsten Breakpoint.
   Bootstrap 4/5 nutzt .col-{n}.
   Wir geben beide Klassen aus, daher ist keine CSS-Brücke nötig —
   die jeweils nicht bekannte Klasse wird vom Browser ignoriert.
*/

/* ── Lade-Spinner beim Absenden ────────────────────────────── */
.uni-fv2-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: uni-fv2-spin 0.75s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes uni-fv2-spin {
    to { transform: rotate(360deg); }
}
