/* Form Validation Styling */
.form-field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-field-error::before {
    content: "⚠ ";
    font-weight: bold;
}

/* Error styling für Felder mit Fehlern */
.text-danger {
    color: #dc3545 !important;
    font-weight: 500;
}

/* Highlight Felder mit Fehlern */
.has-error .form-control,
.has-error .form-select {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Focus-Styling für Felder mit Fehlern */
.has-error .form-control:focus,
.has-error .form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Only show red border on fields with errors (not all invalid fields) */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

/* Remove all automatic validation styling */
.form-control:invalid,
.form-select:invalid,
.form-control:valid,
.form-select:valid {
    border-color: #dee2e6 !important; /* Default Bootstrap border */
    box-shadow: none !important; /* Remove any validation box-shadow */
}

/* Specifically target select elements to ensure no red borders */
select.form-select:invalid {
    border-color: #dee2e6 !important;
    background-color: transparent !important;
}

/* Ensure select elements maintain normal styling */
select.form-select {
    border-color: #dee2e6 !important;
}

/* Force remove any validation styling from all form elements */
.form-select[required]:invalid,
.form-control[required]:invalid,
select[required]:invalid,
input[required]:invalid {
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* Default focus styling */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Default Bootstrap focus */
}

/* Verbessertes Styling für Fehler-Container */
.error-field {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}