* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333333;
    line-height: 1.6;
    padding: 20px;
}

.form-container {
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    margin-bottom: 20px;
    font-size: 24px;
}

.hint {
    font-size: 14px;
    color: #666666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.required {
    color: #d9534f;
}

/* Eingabefelder & Hellgelb-Mouseover-Effekt */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 16px;
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

/* Hier wird das Feld bei Mouseover hellgelb */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
textarea:hover {
    background-color: #ffffe0; 
    border-color: #999999;
}
/* Hier wird das Feld bei Mouseon von fff auf hellgrün border auch geändert */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    background-color: #e8f5e9;
    border-color: #4caf50;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 5px;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 14px;
    cursor: pointer;
}

.dsgvo-text {
    font-size: 13px;
    color: #555555;
}

button[type="submit"] {
    display: inline-block;
    width: 100%;
    background-color: #0066cc;
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #004c99;
}

/* Status-Seiten Styling */
.status-container {
    max-width: 500px;
    margin: 80px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.status-btn {
    display: inline-block;
    margin-top: 25px;
    background-color: #0066cc;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
}

/* Handy-Optimierung */
@media (max-width: 480px) {
    body { padding: 10px; }
    .form-container { padding: 20px; margin: 10px auto; }
}


/* Container für den Iframe auf der Hauptseite */
.form-iframe-wrapper iframe {
    height: 980px; /* Perfekte Höhe für das Formular inklusive Abstände */
}

/* Handy-Optimierung für den Iframe */
@media (max-width: 480px) {
    .form-iframe-wrapper iframe {
        height: 1120px; /* Etwas höher auf dem Handy, da Texte und Felder umbrechen */
    }
}


/* captcha -  1. STUFE: Honeypot-Feld rigoros verstecken */
.form-hp-field {
    display: none !important;
    visibility: hidden !important;
}

/* 2. STUFE: Captcha Rechenaufgabe hervorheben */
.captcha-group .captcha-task {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 15px;
    color: #333333;
}

/* CAPTCHA nebeneinander anordnen */
.captcha-row {
    display: flex;
    align-items: center; /* Richtet Text und Feld vertikal mittig aus */
    gap: 12px;           /* Abstand zwischen Aufgabe und Eingabefeld */
    margin-top: 6px;
}

/* Die Rechenaufgabe optisch anpassen */
.captcha-row .captcha-task {
    background-color: #f0f0f0;
    padding: 10px 14px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    color: #333333;
    white-space: nowrap; /* Verhindert einen Zeilenumbruch der Aufgabe */
}

/* Das Eingabefeld deutlich verkleinern */
.captcha-row input[type="text"] {
    width: 90px;        /* Schmale, feste Breite für das Ergebnis */
    text-align: center; /* Zentriert die eingegebene Zahl im Feld */
    padding: 10px;      /* Passt die Höhe an die Rechenaufgabe an */
}


/* Button-Reihe für Desktop und Handy */
.submit-row {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.submit-row button {
    flex: 1;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Haupt-Button (Senden) */
.btn-primary {
    background-color: #0066cc;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #004c99;
}

/* Abmelde-Button (Dezenter gehalten) */
.btn-secondary {
    background-color: #757575;
    color: #ffffff;
}
.btn-secondary:hover {
    background-color: #555555;
}

/* Radio-Buttons Styling angleichen */
.checkbox-group input[type="radio"] {
    margin-top: 5px;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Handy-Optimierung: Buttons untereinander stapeln */
@media (max-width: 480px) {
    .submit-row {
        flex-direction: column;
    }
}
