.oebg-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.oebg-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.oebg-form .oebg-field {
    margin-bottom: 16px;
}

.oebg-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.oebg-required {
    color: #dc3232;
}

.oebg-form input[type="text"],
.oebg-form input[type="email"],
.oebg-form input[type="tel"],
.oebg-form input[type="password"],
.oebg-form select,
.oebg-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
}

.oebg-form input:focus,
.oebg-form select:focus,
.oebg-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.oebg-form input.oebg-readonly {
    background-color: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

.oebg-form select {
    appearance: auto;
}

.oebg-submit {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.oebg-submit:hover {
    background-color: #005a87;
}

.oebg-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.oebg-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.oebg-message a {
    color: inherit;
    text-decoration: underline;
}

.oebg-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.oebg-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Checkbox */
.oebg-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.oebg-field-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Radio buttons */
.oebg-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.oebg-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
}

.oebg-radio-label input[type="radio"] {
    width: auto;
    flex-shrink: 0;
}

.oebg-field-description {
    margin: 6px 0 0;
    font-size: 14px;
    /* erbt die Textfarbe des Hintergrunds (z. B. Weiß auf Grün) statt festem Grau –
       das alte #666 hatte auf dem grünen Container nur ca. 1,3 : 1 Kontrast */
    color: inherit;
    opacity: 0.9;
    line-height: 1.5;
}

.oebg-spinner {
    margin-left: 10px;
    color: inherit;
    font-style: italic;
}

.oebg-logout-link {
    color: #dc3232;
}

@media (max-width: 480px) {
    .oebg-form-wrapper {
        padding: 12px;
    }
    .oebg-submit {
        width: 100%;
    }
}

/* ---------------------------------------------------------------
 * Ergänzungen 1.3.0: Gruppen, Fehler je Feld, Links, Fokus
 * --------------------------------------------------------------- */
.oebg-intro {
    margin: 0 0 16px;
}

.oebg-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 24px;
    min-width: 0;
}

.oebg-fieldset > legend {
    display: block;
    width: 100%;
    padding: 0 0 8px;
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 17px;
    border-bottom: 1px solid currentColor;
    border-bottom-color: rgba(127, 127, 127, 0.4);
}

/* Fehler direkt am Feld – eigener heller Hintergrund, damit er auf hellem
   wie auf dunklem Container lesbar bleibt */
.oebg-field-error {
    display: block;
    margin: 6px 0 0;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #721c24;
    background: #f8d7da;
    border-left: 4px solid #c62828;
    border-radius: 3px;
}

.oebg-field-error[hidden] {
    display: none;
}

.oebg-form [aria-invalid="true"] {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.35) !important;
}

/* Sichtbarer Tastaturfokus */
.oebg-form input:focus-visible,
.oebg-form select:focus-visible,
.oebg-form button:focus-visible,
.oebg-form-wrapper a:focus-visible,
.oebg-message:focus-visible {
    outline: 3px solid #f2b705;
    outline-offset: 2px;
}

.oebg-message:focus {
    outline: none;
}

/* Größere Klickflächen für Auswahlfelder */
.oebg-radio-label input[type="radio"],
.oebg-field-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #12633f;
}

.oebg-radio-label {
    min-height: 32px;
}

.oebg-field-checkbox a,
.oebg-form-links a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.oebg-form-links {
    margin: 16px 0 0;
    font-size: 15px;
}

.oebg-resend {
    margin: 0 0 16px;
}

.oebg-resend p {
    margin: 0 0 8px;
}

.oebg-submit-secondary {
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
}
