/**
 * Form Utilities CSS
 * Loading states, validation, and error messages
 */

/* Field Error States */
.field-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-error:focus {
    outline: none;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.field-error-message {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
    animation: slideDown 0.3s ease;
}

.field-error-message::before {
    content: '⚠ ';
    margin-right: 4px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Message */
.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.success-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
    position: relative;
}

.error-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.error-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.error-close:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.1);
}

.error-close i {
    font-size: 0.9rem;
}

/* Light Theme */
[data-theme="light"] .field-error {
    border-color: #dc2626 !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

[data-theme="light"] .field-error-message {
    color: #dc2626;
}

[data-theme="light"] .success-message {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

[data-theme="light"] .error-message {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
}




