/* search.css - OmVibe Search Page */

.search-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.search-hero-bar {
    margin-bottom: 20px;
}

.search-hero-form {
    display: flex;
    gap: 8px;
}

.search-hero-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    color: #e2e8f0;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.search-hero-input::placeholder {
    color: #475569;
}

.search-hero-input:focus {
    border-color: rgba(167,139,250,0.5);
}

.search-hero-btn {
    background: linear-gradient(135deg,#7c3aed,#a78bfa);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.search-hero-btn:hover {
    opacity: 0.88;
}

.search-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-bottom: 12px;
}

.search-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 18px;
}

.search-sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.search-sort-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.search-sort-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #e2e8f0;
    font: inherit;
    padding: 9px 12px;
    outline: none;
}

.search-sort-select:focus {
    border-color: rgba(167,139,250,0.5);
}

.search-tab {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.search-tab:hover {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
}

.search-tab.active {
    background: rgba(139,92,246,0.15);
    color: #c4b5fd;
    border-color: rgba(139,92,246,0.35);
}

.search-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #475569;
    margin: 20px 0 10px;
}

.search-loading,
.search-empty,
.search-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 24px;
    text-align: center;
    color: #64748b;
}

.search-empty-icon {
    font-size: 40px;
}

.search-empty-text {
    font-size: 15px;
}

.search-error {
    color: #ef4444;
}

.search-highlight {
    background: rgba(250,204,21,0.22);
    color: inherit;
    border-radius: 4px;
    padding: 0 2px;
}

.search-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.search-chip-row--query {
    margin-bottom: 20px;
}

.search-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    border-radius: 999px;
    color: #cbd5e1;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 14px;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.search-chip span {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.search-chip:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(139,92,246,0.28);
    transform: translateY(-1px);
}

.search-chip.is-active {
    background: rgba(139,92,246,0.18);
    border-color: rgba(139,92,246,0.35);
    color: #ede9fe;
}

.search-topic-hero {
    background:
      radial-gradient(circle at top right, rgba(139,92,246,0.18), transparent 38%),
      rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 18px 18px 16px;
    margin-bottom: 20px;
}

.search-topic-kicker {
    color: #a78bfa;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.search-topic-title {
    color: #f8fafc;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 6px;
}

.search-topic-summary {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 8px;
}

.search-topic-note {
    color: #fbbf24;
    font-size: 13px;
    margin-top: 10px;
}

.search-topic-group {
    margin-top: 16px;
}

.search-topic-group-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.search-topic-community-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.search-topic-community-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15,23,42,0.28);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: inherit;
    padding: 12px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.search-topic-community-card:hover {
    border-color: rgba(139,92,246,0.3);
    background: rgba(15,23,42,0.42);
    transform: translateY(-1px);
}

.search-topic-community-card.is-joined {
    border-color: rgba(16,185,129,0.28);
}

.search-topic-community-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.search-topic-community-name {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
}

.search-topic-community-sub {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 3px;
}

.search-people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.search-person-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.search-person-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(139,92,246,0.3);
    transform: translateY(-2px);
}

.search-person-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.search-person-initial {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.search-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0f172a;
}

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

.search-person-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-person-handle {
    font-size: 12px;
    color: #64748b;
}

.search-person-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.search-person-friends {
    font-size: 11px;
    color: #64748b;
}

.search-badge-premium {
    font-size: 11px;
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
    border-radius: 6px;
    padding: 1px 5px;
}

.search-lock-badge {
    font-size: 12px;
}

.search-posts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-post-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: background 0.15s, border-color 0.15s;
}

.search-post-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(139,92,246,0.3);
}

.search-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.search-post-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
}

.search-post-name {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.search-post-time {
    font-size: 11px;
    color: #64748b;
}

.search-post-body {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
    word-break: break-word;
}

.search-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.search-inline-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.18);
    border-radius: 999px;
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
}

.search-post-img {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    max-height: 180px;
}

.search-post-img img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.search-post-stats {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.search-community-snippet {
    margin-top: 8px;
}

.search-topic-match {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.18);
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.search-guardrail {
    display: flex;
    justify-content: center;
    margin: 22px auto 0;
    width: fit-content;
    color: #64748b;
    font: inherit;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.search-guardrail--end {
    color: #94a3b8;
}

.search-scroll-sentinel {
    width: 100%;
    height: 1px;
}

.search-back-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0 13px;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    align-self: stretch;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.search-back-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.header-search-icon {
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html[data-theme="light"] .search-hero-input {
    background: #f1f5f9;
    border-color: rgba(0,0,0,0.1);
    color: #0f172a;
}

html[data-theme="light"] .search-hero-input:focus {
    border-color: rgba(139,92,246,0.5);
}

html[data-theme="light"] .search-hero-input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .search-tabs {
    border-bottom-color: rgba(0,0,0,0.08);
}

html[data-theme="light"] .search-sort-label {
    color: #64748b;
}

html[data-theme="light"] .search-sort-select {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    color: #0f172a;
}

html[data-theme="light"] .search-tab {
    border-color: rgba(0,0,0,0.1);
    color: #64748b;
}

html[data-theme="light"] .search-tab:hover {
    background: rgba(0,0,0,0.05);
    color: #374151;
}

html[data-theme="light"] .search-tab.active {
    background: rgba(139,92,246,0.1);
    color: #6d28d9;
    border-color: rgba(139,92,246,0.3);
}

html[data-theme="light"] .search-highlight {
    background: rgba(250,204,21,0.32);
}

html[data-theme="light"] .search-chip {
    background: #ffffff;
    border-color: rgba(15,23,42,0.09);
    color: #334155;
}

html[data-theme="light"] .search-chip:hover {
    background: #f8fafc;
}

html[data-theme="light"] .search-chip.is-active {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.25);
    color: #6d28d9;
}

html[data-theme="light"] .search-topic-hero {
    background:
      radial-gradient(circle at top right, rgba(139,92,246,0.12), transparent 38%),
      #ffffff;
    border-color: rgba(15,23,42,0.08);
}

html[data-theme="light"] .search-topic-title {
    color: #0f172a;
}

html[data-theme="light"] .search-topic-match {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.14);
    color: #6d28d9;
}

html[data-theme="light"] .search-topic-community-card {
    background: #ffffff;
    border-color: rgba(15,23,42,0.08);
}

html[data-theme="light"] .search-topic-community-card:hover {
    background: #f8fafc;
}

html[data-theme="light"] .search-topic-community-name {
    color: #0f172a;
}

html[data-theme="light"] .search-person-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.07);
}

html[data-theme="light"] .search-person-card:hover {
    background: #f8fafc;
    border-color: rgba(139,92,246,0.3);
}

html[data-theme="light"] .search-person-name {
    color: #0f172a;
}

html[data-theme="light"] .search-post-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.07);
}

html[data-theme="light"] .search-post-card:hover {
    background: #f8fafc;
    border-color: rgba(139,92,246,0.3);
}

html[data-theme="light"] .search-post-name {
    color: #0f172a;
}

html[data-theme="light"] .search-post-body {
    color: #374151;
}

html[data-theme="light"] .search-inline-tag {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.16);
    color: #6d28d9;
}

html[data-theme="light"] .search-online-dot {
    border-color: #ffffff;
}

html[data-theme="light"] .search-back-btn {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #64748b;
}

html[data-theme="light"] .search-back-btn:hover {
    background: rgba(0,0,0,0.08);
    color: #0f172a;
}

html[data-theme="light"] .search-guardrail {
    background: #ffffff;
    border-color: rgba(15,23,42,0.12);
    color: #334155;
}

@media (max-width: 600px) {
    .search-page {
        padding: 12px 10px 60px;
    }

    .search-hero-bar {
        margin-bottom: 12px;
    }

    .search-hero-form {
        gap: 6px;
    }

    .search-hero-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .search-back-btn {
        padding: 0 10px;
        font-size: 16px;
    }

    .search-hero-btn {
        display: none;
    }

    .search-tabs {
        gap: 4px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .search-tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    .search-chip-row {
        gap: 6px;
    }

    .search-chip {
        padding: 8px 12px;
    }

    .search-people-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .search-person-card {
        padding: 10px;
        gap: 8px;
    }

    .search-person-avatar {
        width: 36px;
        height: 36px;
    }

    .search-topic-title {
        font-size: 22px;
    }

    .search-topic-community-row {
        grid-template-columns: 1fr;
    }
}
