/* Enhanced Filters Styling */
.enhanced-filters-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.enhanced-filters-form .form-label {
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 5px;
}

.enhanced-filters-form .form-select,
.enhanced-filters-form .form-control {
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.enhanced-filters-form .form-select:focus,
.enhanced-filters-form .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
    background-color: #ffffff;
}

.enhanced-filters-form .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.enhanced-filters-form .btn-primary {
    background: linear-gradient(45deg, #0d6efd, #0056b3);
    border: none;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.enhanced-filters-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.enhanced-filters-form .btn-outline-secondary {
    border-color: #e0e6ed;
    color: #6c757d;
}

.enhanced-filters-form .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Filter Summary Badges */
.enhanced-filters-form .badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 20px;
    font-weight: 500;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .enhanced-filters-form {
        padding: 15px;
        margin: 10px 0;
    }
    
    .enhanced-filters-form .row > div {
        margin-bottom: 15px;
    }
    
    .enhanced-filters-form .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .enhanced-filters-form .btn:last-child {
        margin-bottom: 0;
    }
    
    .filter-summary .badge {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .enhanced-filter-card {
        padding: 15px;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .enhanced-filters-form {
        padding: 12px;
    }
    
    .enhanced-filters-form .col-lg-2,
    .enhanced-filters-form .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .filter-header h5 {
        font-size: 1rem;
    }
    
    .search-clear-btn {
        right: 35px !important;
    }
}

/* Animation for filter summary */
.enhanced-filters-form .filter-summary {
    animation: slideDown 0.3s ease-out;
}

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

/* Hover effects for select elements */
.enhanced-filters-form .form-select:hover {
    border-color: #b0b8c1;
}

/* Focus ring improvements */
.enhanced-filters-form .form-control:focus,
.enhanced-filters-form .form-select:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Input group enhancements */
.enhanced-filters-form .input-group {
    border-radius: 6px;
    overflow: hidden;
}

.enhanced-filters-form .input-group .form-control {
    border-right: none;
}

.enhanced-filters-form .input-group .btn {
    border-left: none;
    z-index: 2;
}

/* Card header styling */
.ai-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    border-radius: 0.375rem 0.375rem 0 0;
}

.ai-card-header .ai-card-title {
    color: #495057;
    font-weight: 600;
}

.ai-card-header .ai-card-title i {
    color: #0d6efd;
}

/* Performance optimizations */
.enhanced-filter-card {
    will-change: transform;
}

.btn {
    will-change: transform, box-shadow;
}

/* Accessibility improvements */
.enhanced-filters-form .form-select:focus,
.enhanced-filters-form .form-control:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Loading states */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
