/* Restaurant Search Page Styles */

/* Search Hero Section */
.search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.search-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.search-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.search-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.restaurant-search-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: center;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field i {
    position: absolute;
    left: 16px;
    color: #666;
    z-index: 2;
}

.search-field input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.location-field .location-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f8f9fa;
    border: none;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    color: #667eea;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.location-field .location-btn i {
    font-size: 16px;
    position: static;
    left: auto;
}

.location-field .location-btn:hover {
    background: #e9ecef;
}

.search-submit-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background: #5a6fd8;
}

/* Search Filters */
.search-filters {
    background: #f8f9fa;
    padding: 24px 0;
    border-bottom: 1px solid #e1e5e9;
}

.filters-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
    align-items: start;
}

.filters-row {
    display: block;
}

.all-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #e1e5e9 transparent;
}

.category-filters::-webkit-scrollbar {
    height: 4px;
}

.category-filters::-webkit-scrollbar-track {
    background: transparent;
}

.category-filters::-webkit-scrollbar-thumb {
    background: #e1e5e9;
    border-radius: 2px;
}

.category-filters::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.filter-btn {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover,
.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.sort-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.additional-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-toggle {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.filter-toggle:hover,
.filter-toggle.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Search Results */
.search-results {
    padding: 40px 0;
}

.search-results .container {
    max-width: none;
    width: 100%;
    padding: 0 20px;
}

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

.results-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.results-count {
    color: #666;
    font-size: 14px;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover,
.view-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Loading and No Results States */
.loading-state,
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #333;
}

.no-results p {
    color: #666;
    margin-bottom: 24px;
}

/* Restaurant Grid - Enhanced */
.restaurant-grid.list-view {
    grid-template-columns: 1fr;
}

.restaurant-grid.list-view .restaurant-card {
    display: flex;
    align-items: center;
    padding: 12px 20px;
}

.restaurant-grid.list-view .restaurant-image {
    width: 120px;
    height: 80px;
    margin-right: 16px;
    margin-bottom: 0;
}

.restaurant-grid.list-view .restaurant-info {
    flex: 1;
    padding: 8px 12px;
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background: #5a6fd8;
}

/* Quick Suggestions */
.quick-suggestions {
    background: #f8f9fa;
    padding: 40px 0;
}

.quick-suggestions h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.suggestion-tag {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-hero-content h1 {
        font-size: 2rem;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .all-filters {
        justify-content: flex-start;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .restaurant-grid {
        grid-template-columns: 1fr;
    }
    
    .additional-filters {
        justify-content: flex-start;
    }

    /* List view on tablet */
    .restaurant-grid.list-view .restaurant-card {
        padding: 10px 16px;
    }

    .restaurant-grid.list-view .restaurant-image {
        width: 100px;
        height: 70px;
        margin-right: 12px;
    }

    .restaurant-grid.list-view .restaurant-info {
        padding: 4px 8px;
    }

    /* Category filters on tablet - still scroll */
    .category-filters {
        gap: 6px;
    }

    /* Fluid container on tablet */
    .search-results .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .search-hero {
        padding: 60px 0 40px;
    }
    
    .restaurant-search-form {
        padding: 16px;
    }
    
    .search-field input {
        padding: 14px 14px 14px 44px;
        font-size: 14px;
    }
    
    .search-submit-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    /* List view responsive */
    .restaurant-grid.list-view .restaurant-card {
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .restaurant-grid.list-view .restaurant-image {
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    .restaurant-grid.list-view .restaurant-info {
        padding: 0;
        width: 100%;
    }

    /* Category filters wrap on mobile */
    .category-filters {
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: flex-start;
    }

    /* Fluid container on mobile */
    .search-results .container {
        padding: 0 12px;
    }
}

/* Distance display */
.restaurant-details .distance {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 4px;
}

.restaurant-details .distance i {
    margin-right: 4px;
    color: #dc3545;
}
