/* Form Validation Styles */

/* Invalid form elements */
.form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Error message styling */
.error-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.error-message.text-danger {
    color: #dc3545 !important;
}

/* Form group error state */
.form-group.has-error .form-control {
    border-color: #dc3545;
}

/* Loading spinner animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Alert styling for form messages */
.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 0.75rem 1.25rem;
    border-radius: 0.25rem;
    margin-top: 1rem;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem 1.25rem;
    border-radius: 0.25rem;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .error-message {
        font-size: 0.75rem;
    }
}

/* Input focus state */
.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button loading state */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Smooth transitions */
.form-control,
.btn,
.error-message {
    transition: all 0.3s ease;
}
