/* ============================================================
   mod_contact – Kontaktformular
   Basis-Styling, anpassbar über user.css
   ============================================================ */

/* Wrapper */
.mod-contact {
    width: 100%;
}

/* Pflichtfeld-Hinweis */
.mod-contact__required-hint {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 1rem;
}

/* Formular-Layout: Flexbox damit Felder nebeneinander möglich sind */
.mod-contact__form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Einzelnes Feld */
.mod-contact__field {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Volle Breite (Nachricht, Submit) */
.mod-contact__field--full {
    width: 100% !important;
}

.mod-contact__field--submit {
    width: 100% !important;
}

/* Label */
.mod-contact__label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Pflichtfeld-Stern */
.mod-contact__required {
    color: #c0392b;
    margin-left: 2px;
}

/* Eingabefelder */
.mod-contact__input,
.mod-contact__textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mod-contact__input:focus,
.mod-contact__textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.mod-contact__input:invalid:not(:placeholder-shown),
.mod-contact__textarea:invalid:not(:placeholder-shown) {
    border-color: #c0392b;
}

.mod-contact__textarea {
    resize: vertical;
    min-height: 140px;
}

/* Senden-Button */
.mod-contact__submit {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mod-contact__submit:hover {
    background-color: #0052a3;
}

.mod-contact__submit:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
}

/* Erfolgsmeldung */
.mod-contact__success {
    padding: 1rem 1.25rem;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    font-size: 1rem;
}

/* Fehlermeldung */
.mod-contact__error {
    padding: 1rem 1.25rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Honeypot – für Menschen unsichtbar */
.mod-contact__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Screen-Reader-only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
    .mod-contact__input,
    .mod-contact__textarea,
    .mod-contact__submit {
        transition: none;
    }
}
