/**
 * Search Interface Styles
 * For the frontend search and browse functionality
 */

.realestate-search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.category-tab {
    padding: 15px 30px;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.category-tab:hover {
    color: #667eea;
    background: #f9f9ff;
}

.category-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f9f9ff;
}

/* Search Filters */
.search-filters {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.filter-input,
.filter-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
    margin-top: 0px !important;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

/* Search Filter Row */
.search-row-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.filter-county {
    flex: 0 0 20%;
    min-width: 160px;
}

.filter-state {
    flex: 0 0 12%;
    min-width: 100px;
}

.filter-date {
    flex: 0 0 15%;
    min-width: 140px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: flex-start;
}

.filter-field .search-input {
    height: 44px;
    padding: 0 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.filter-field .search-input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-actions .btn-search,
.filter-actions .btn-clear {
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-actions .btn-clear {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    color: #666;
}

.filter-actions .btn-clear:hover {
    background: #eee;
    border-color: #ccc;
}

/* Responsive Search Filters */
@media (max-width: 1024px) {
    .filter-county,
    .filter-state,
    .filter-date {
        flex: 0 0 calc(50% - 6px);
        min-width: 0;
    }
    
    .filter-actions {
        flex: 0 0 100%;
        margin-top: 8px;
    }
}

@media (max-width: 600px) {
    .filter-county,
    .filter-state,
    .filter-date {
        flex: 0 0 100%;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn-search,
    .filter-actions .btn-clear {
        width: 100%;
        justify-content: center;
    }
}

/* Results Section */
.search-results {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Result Cards */
.result-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    gap: 20px;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.result-checkbox {
    flex-shrink: 0;
    padding-top: 5px;
}

.result-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.result-content {
    flex: 1;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.result-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.result-body {
    color: #666;
}

.lead-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 15px;
}

.location-icon {
    font-size: 18px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.detail-item {
    display: flex;
    gap: 8px;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
}

.result-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.btn-view {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-view:hover {
    background: #5568d3;
}

.btn-download {
    background: #46b450;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #3e9c44;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .category-tabs {
        flex-direction: column;
    }
    
    .category-tab {
        text-align: center;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .result-card {
        flex-direction: column;
    }
    
    .result-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

