/* AJAX Filter Loading States */
.filter-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.filter-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* Filter Error States */
.filter-error {
    padding: 20px;
    text-align: center;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

/* Enhanced Filter Styles */
.realty-sidebar-filter {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.filter-section {
    padding: 20px 10px 0 10px;
    border-bottom: 1px solid #eee;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h4 {
    color: #555;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Controls */
.filter-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 120px;
    padding: 1px 1px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.separator {
    color: #666;
    font-weight: 500;
    padding: 0 4px;
}

/* Checkbox Styles */
.filter-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.filter-checkbox {
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid transparent;
}

.filter-checkbox:hover {
    background: rgba(0, 123, 255, 0.05);
}

.filter-checkbox.selected {
    background: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #007bff;
}

.filter-checkbox label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filter-checkbox.selected label {
    color: #007bff;
    font-weight: 500;
}

/* Text Inputs */
.filter-text-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-text-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Current Conditions */
.current-conditions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.condition-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.condition-item:last-child {
    margin-bottom: 0;
}

.condition-item span {
    font-size: 14px;
    color: #666;
}

/* Filter Actions */
.filter-actions {
    text-align: center;
}

.btn-clear-filters {
    background: #dc3545;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-search {
    background: #007bff;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btn-search:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-search:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Results Animation */
.property-listings {
    transition: opacity 0.3s ease;
}

.property-listings.loading {
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .filter-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .separator {
        display: none;
    }
}

/* Enhanced Group States */
.filter-checkboxes.has-selections {
    background: rgba(0, 123, 255, 0.02);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.3s ease;
}

/* Focus indicators for accessibility */
.filter-checkbox input[type="checkbox"]:focus + label {
    outline: 2px solid #007bff;
    outline-offset: 2px;
} 