/* Enhanced Error Handling and User Experience */

.form-message {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 6px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.error-field {
    border-color: #e74c3c !important;
    background-color: #fdf2f2 !important;
}

.error-field:focus {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25) !important;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.button-primary:disabled,
.button-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress indicator */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #007cba;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 9999;
}

.progress-indicator.active {
    transform: scaleX(1);
}

/* Animation keyframes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .form-message {
        padding: 10px 12px;
        font-size: 14px;
    }
}