/**
 * Global search results page (Figma)
 */

.ye-search-results-page {
    background: var(--primary-light, #f2f4f7);
    padding: 40px 20px 56px;
    min-height: 60vh;
}

.ye-search-results-shell {
    width: min(100%, var(--ye-shell-max, 1280px));
    margin: 0 auto;
    box-sizing: border-box;
}

.ye-search-results-card {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 28px 24px 32px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ye-search-results-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.ye-search-results-title {
    margin: 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    line-height: 1.25;
    font-weight: 700;
    color: var(--primary-color, #081b33);
}

.ye-search-results-title__term {
    display: inline;
    margin-left: 0.3em;
    font-weight: 700;
}

.ye-search-results-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ye-search-results-tabs .ye-menu-chip {
    min-height: 36px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--primary-color, #081b33);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.ye-search-results-tabs .ye-menu-chip:hover:not(.is-disabled) {
    background: var(--primary-color, #081b33);
    color: #fff;
}

.ye-search-results-tabs .ye-menu-chip.is-active {
    background: var(--primary-color, #081b33);
    color: #fff;
}

.ye-search-results-body {
    margin-top: 24px;
}

.ye-search-results-body.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

/* ---- Posts grid (Figma 3-column cards) ---- */
.ye-search-results-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ye-search-results-posts-grid .ye-home-feed-card,
.ye-search-results-posts-grid .ye-search-feed-card {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 16px 12px;
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: none;
    box-sizing: border-box;
}

.ye-search-results-posts-grid .ye-home-feed-card__head {
    gap: 10px;
}

.ye-search-results-posts-grid .ye-home-feed-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.ye-search-results-posts-grid .ye-home-feed-card__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
}

.ye-search-results-posts-grid .ye-home-feed-card__meta {
    margin-top: 2px;
    font-size: 12px;
    line-height: 18px;
    color: #8a94a6;
    gap: 4px;
}

.ye-search-results-posts-grid .ye-home-feed-card__badge {
    min-height: 20px;
    padding: 0 8px;
    border-radius: 4px;
    background: #d9f5f0;
    color: #0f766e;
    font-size: 11px;
    font-weight: 600;
}

.ye-search-results-posts-grid .ye-home-feed-card__location {
    margin-top: 10px;
    font-size: 13px;
    line-height: 20px;
    color: var(--lable-color, #0056a7);
}

.ye-search-results-posts-grid .ye-home-feed-card__text {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--gray-color, #374151);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.ye-search-results-posts-grid .ye-home-feed-card__hashtags {
    margin-top: 8px;
    gap: 6px;
}

.ye-search-results-posts-grid .ye-home-feed-card__hashtag {
    font-size: 13px;
    font-weight: 500;
    color: var(--lable-color, #0056a7);
}

.ye-search-results-posts-grid .ye-home-feed-card__gallery {
    margin-top: 12px;
    border-radius: 8px;
}

.ye-search-results-posts-grid .ye-home-feed-card__grid {
    gap: 2px;
    border-radius: 8px;
    overflow: hidden;
}

.ye-search-results-posts-grid .ye-home-feed-card__grid--1 .ye-home-feed-card__image,
.ye-search-results-posts-grid .ye-home-feed-card__image--wide {
    height: 168px;
}

.ye-search-results-posts-grid .ye-home-feed-card__grid--2 .ye-home-feed-card__image {
    height: 120px;
}

.ye-search-results-posts-grid .ye-home-feed-card__grid--3 .ye-home-feed-card__image,
.ye-search-results-posts-grid .ye-home-feed-card__grid--4 .ye-home-feed-card__image {
    height: 96px;
}

.ye-search-results-posts-grid .ye-home-feed-card__grid--3 .ye-home-feed-card__image:first-child {
    grid-row: span 2;
    height: auto;
    min-height: 194px;
}

.ye-search-results-posts-grid .ye-home-feed-card__more {
    font-size: 20px;
    font-weight: 700;
    background: rgba(8, 27, 51, 0.5);
}

.ye-search-results-posts-grid .ye-home-feed-card__actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.ye-search-results-posts-grid .ye-home-feed-card__action-group {
    gap: 10px;
}

.ye-search-results-posts-grid .ye-home-feed-card__action {
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
    color: var(--gray-color, #374151);
}

.ye-search-results-posts-grid .ye-home-feed-card__action img {
    width: 16px;
    height: 16px;
}

.ye-search-results-posts-grid .ye-home-feed-card__action--btn.is-inspired {
    color: #e11d48;
}

.ye-search-results-posts-grid .ye-home-feed-card__action--btn.is-bookmarked {
    color: var(--primary-color, #081b33);
}

.ye-search-results-body .ye-store-grid,
.ye-search-results-body .ye-marketplace-grid,
.ye-search-results-body .ye-search-results-explorers-grid {
    margin-top: 0;
}

/* ---- Events tab (Figma event cards) ---- */
.ye-search-results-body .ye-event-discover-grid {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ye-search-results-body .ye-event-discover-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ye-search-results-body .ye-event-discover-card:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(8, 27, 51, 0.06);
}

.ye-search-results-body .ye-event-discover-card__media {
    aspect-ratio: 16 / 10;
    border-radius: 12px 12px 0 0;
}

.ye-search-results-body .ye-event-discover-card__image {
    border-radius: 0;
}

.ye-search-results-body .ye-event-discover-card__category {
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
    color: #e85d5d;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.ye-search-results-body .ye-event-discover-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

.ye-search-results-body .ye-event-discover-card__title {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--primary-color, #081b33);
}

.ye-search-results-body .ye-event-discover-card__meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 0;
}

.ye-search-results-body .ye-event-discover-card__meta-divider {
    display: block;
    width: 1px;
    height: 18px;
    background: #e5e7eb;
    flex-shrink: 0;
}

.ye-search-results-body .ye-event-discover-card__date,
.ye-search-results-body .ye-event-discover-card__location {    
    margin: 0;
    font-size: 13px;
    line-height: 20px;
    min-width: 0;
}

.ye-search-results-body .ye-event-discover-card__date {
    color: #6b7280;
}

.ye-search-results-body .ye-event-discover-card__location {
    color: var(--lable-color, #0056a7);
}

.ye-search-results-body .ye-event-discover-card__description {
    margin-top: auto;
    padding-top: 10px;
    font-size: 13px;
    line-height: 1.55;
    color: #6b7280;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* ---- Festivals tab (Figma festival cards) ---- */
.ye-search-results-body .ye-festival-discover-grid {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ye-search-results-body .ye-festival-discover-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ye-search-results-body .ye-festival-discover-card:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(8, 27, 51, 0.06);
}

.ye-search-results-body .ye-festival-discover-card__media {
    aspect-ratio: 16 / 10;
    border-radius: 12px 12px 0 0;
}

.ye-search-results-body .ye-festival-discover-card__category {
    display: none;
}

.ye-search-results-body .ye-festival-discover-card__share {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
}

.ye-search-results-body .ye-festival-discover-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

.ye-search-results-body .ye-festival-discover-card__title {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--primary-color, #081b33);
}

.ye-search-results-body .ye-festival-discover-card__location,
.ye-search-results-body .ye-festival-discover-card__location-link {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 22px;
    color: #0056a7;
}

.ye-search-results-body .ye-festival-discover-card__date {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 22px;
    color: #6b7280;
}

.ye-search-results-body .ye-festival-discover-card__description {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    color: #6b7280;
    -webkit-line-clamp: 3;
}

/* ---- Search explorers tab (Figma horizontal card) ---- */
.ye-search-results-explorers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ye-search-explorer-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    padding: 14px 14px 0;
    box-sizing: border-box;
    min-width: 0;
}

.ye-search-explorer-card__top {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: start;
}

.ye-search-explorer-card__avatar-link {
    display: block;
    text-decoration: none;
}

.ye-search-explorer-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.ye-search-explorer-card__meta {
    min-width: 0;
    padding-top: 2px;
}

.ye-search-explorer-card__name-link {
    color: inherit;
    text-decoration: none;
}

.ye-search-explorer-card__name {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: var(--primary-color, #081b33);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ye-search-explorer-card__username {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 18px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ye-search-explorer-card__location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    color: #2563eb;
}

.ye-search-explorer-card__location img {
    flex-shrink: 0;
}

.ye-search-explorer-card__location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ye-search-explorer-card__view {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #081b33);
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.ye-search-explorer-card__view svg {
    display: block;
}

.ye-search-explorer-card__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 14px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.ye-search-explorer-card__stat {
    padding: 12px 8px;
    text-align: center;
}

.ye-search-explorer-card__stat + .ye-search-explorer-card__stat {
    border-left: 1px solid var(--border-color, #e2e8f0);
}

.ye-search-explorer-card__stat-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: var(--primary-color, #081b33);
}

.ye-search-explorer-card__stat-label {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    color: #6b7280;
}

.ye-search-results-tabs .ye-menu-chip {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.ye-search-results-body .ye-store-pagination {
    margin-top: 28px;
}

.ye-search-results-empty,
.ye-search-results-body .ye-empty-stores {
    margin-top: 32px;
    padding: 48px 20px;
    text-align: center;
    color: #64748b;
}

.ye-search-results-empty img,
.ye-search-results-body .ye-empty-stores img {
    display: block;
    margin: 0 auto 16px;
    opacity: 0.85;
}

.ye-search-results-empty p,
.ye-search-results-body .ye-empty-stores p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .ye-search-results-posts-grid,
    .ye-search-results-explorers-grid,
    .ye-search-results-body .ye-event-discover-grid,
    .ye-search-results-body .ye-festival-discover-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .ye-search-results-page {
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .ye-search-results-card {
        padding: 20px 16px 24px;
    }

    .ye-search-results-body .ye-store-grid,
    .ye-search-results-body .ye-marketplace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ye-search-results-posts-grid,
    .ye-search-results-explorers-grid,
    .ye-search-results-body .ye-event-discover-grid,
    .ye-search-results-body .ye-festival-discover-grid,
    .ye-search-results-body .ye-store-grid,
    .ye-search-results-body .ye-marketplace-grid {
        grid-template-columns: 1fr;
    }

    .ye-search-results-body .ye-event-discover-card__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ye-search-results-body .ye-event-discover-card__meta-divider {
        display: none;
    }

    .ye-search-explorer-card__top {
        grid-template-columns: 64px minmax(0, 1fr) 28px;
    }

    .ye-search-explorer-card__avatar {
        width: 64px;
        height: 64px;
    }
}
