/* AJAX Search Styles */

/* Loading states */
.ajax-search-loading {
    position: relative;
    overflow: hidden;
}

.ajax-search-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Search button loading state */
.mainSearch__submit .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

/* Results count */
.results-count {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Error alerts */
.ajax-search-error {
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.ajax-search-error .close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Fade transition for results */
.ajax-results-container {
    transition: opacity 0.3s ease-in-out;
}

.ajax-results-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Pagination styling */
.pagination-container {
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .results-count {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
}

/* Filter reset button */
.filter-reset-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.filter-reset-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Loading overlay for entire results section */
.results-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 0.375rem;
}

.results-loading-overlay .spinner-border {
    width: 2rem;
    height: 2rem;
    color: #007bff;
}