/* ── Search Page ── */

.search-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Search input with icon */
.search-bar-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-bottom: 0.75rem;
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input {
    padding-left: 38px !important;
    font-size: 1.05rem;
}

.search-btn {
    white-space: nowrap;
}

/* Tabs */
.search-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.search-tab {
    background: none;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.search-tab:hover {
    color: var(--color-turquoise-dark);
}

.search-tab.active {
    color: var(--color-turquoise-dark);
    border-bottom-color: var(--color-turquoise-dark);
}

/* Controls row */
.search-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.75rem 0;
}

.results-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.sort-select {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

/* Dish cards */
.search-dish-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.search-dish-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.search-dish-card:visited {
    color: inherit;
}

.search-dish-photo {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.search-dish-card-no-photo {
    align-items: center;
}

.search-dish-info {
    flex: 1;
    min-width: 0;
}

.search-dish-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-dish-restaurant {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-dish-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-dish-stars .stars {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.star-full {
    color: #f5a623;
}

.star-half {
    color: #f5a623;
    opacity: 0.55;
}

.star-empty {
    color: #ddd;
}

.search-dish-score-num {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    margin-left: 3px;
}

.search-dish-no-rating {
    font-size: 0.82rem;
    color: #aaa;
    font-style: italic;
}

.search-dish-reviews {
    font-size: 0.8rem;
    color: #888;
}

.search-dish-distance {
    font-size: 0.8rem;
    color: #999;
}

.search-dish-distance::before {
    content: "·";
    margin-right: 4px;
}

/* Loading */
.search-loading {
    text-align: center;
    padding: 1rem;
    color: #999;
    font-size: 0.9rem;
}

/* Empty */
.search-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 1rem;
}

/* People cards */
.people-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.people-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.people-card:visited {
    color: inherit;
}

.people-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.people-card-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-turquoise, #15D3C9);
}

.people-card-info {
    min-width: 0;
}

.people-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.people-card-username {
    font-size: 0.82rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* People shelf cards (used on homepage) */
.people-shelf-card {
    flex: 0 0 auto;
    width: 90px;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.people-shelf-card:visited,
.people-shelf-card:hover,
.people-shelf-card:active {
    color: inherit;
    text-decoration: none;
}

.people-shelf-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.people-shelf-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-turquoise, #15D3C9);
}

.people-shelf-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 5px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.people-shelf-username {
    font-size: 0.68rem;
    color: #888;
    margin-top: 1px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

/* See more link */
.see-more-link {
    display: inline-block;
    margin: 0.4rem 0 0.8rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-turquoise-dark, #007C87);
    text-decoration: none;
    cursor: pointer;
}

.see-more-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .search-page {
        padding: 0.5rem 10px;
    }

    .search-dish-photo {
        width: 60px;
        height: 60px;
    }

    .search-dish-name {
        font-size: 0.92rem;
    }

    .people-card-avatar {
        width: 36px;
        height: 36px;
    }
}
