﻿/* 1. Container-Klasse: Hier steuern wir nur noch die Breite, 
   aber lassen den Builder (via JSON) die Kontrolle, falls nötig. */
.form-container {
    width: 100%;
    margin: 0 auto; /* ZENTRIERT das Formular automatisch (links/rechts gleich) */
}

    /* Erzwingt, dass alle Formularelemente den Container voll ausfüllen */
    .form-container form {
        width: 100% !important;
        display: block !important;
    }

    /* 2. Schriftart-Vererbung: Das '!important' stellt sicher, 
   dass die Google-Schrift aus den Blöcken immer gewinnt. */
    .form-container label,
    .form-container input,
    .form-container textarea,
    .form-container select {
        font-family: inherit !important;
    }

/* 3. Formular-Struktur (Standard-Elemente) */
.form-group {
    margin-bottom: 15px;
    position: relative;
}

    .form-group label {
        display: block;
        font-weight: 300;
        margin-bottom: 5px;
    }

/* Info-Button Style */
.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #007bff;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    cursor: help;
    margin-left: 5px;
}

input[type="text"], input[type="email"], select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Wichtig für die korrekte Breite bei padding */
}

.radio-label {
    display: block;
    font-weight: normal;
    margin-top: 5px;
}

.error-msg {
    color: red;
    font-size: 0.9em;
}

/* Container für das Icon und den Text */
.info-wrapper {
    position: relative;
    display: inline-flex;
    cursor: help;
    margin-left: 5px;
}

/* Das (i) Icon selbst */
.info-icon {
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Der versteckte Tooltip-Text */
.info-tooltip {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 100;
    bottom: 125%; /* Über dem Icon anzeigen */
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.4;
    pointer-events: none; /* Verhindert Flackern */
}

    /* Kleiner Pfeil nach unten */
    .info-tooltip::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #333 transparent transparent transparent;
    }

/* Anzeigen bei Hover (Desktop) ODER wenn das Eltern-Element aktiv ist (Touch) */
.info-wrapper:hover .info-tooltip,
.info-wrapper:active .info-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Für Smartphones: Tooltip anzeigen, wenn man darauf tippt */
@media (hover: none) {
    .info-wrapper:focus .info-tooltip {
        visibility: visible;
        opacity: 1;
    }
}