/* TrustBhai — Search results (mobile-first) */

body:has(.sr-page) {
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    background: #f0f2f5 !important;
}

.sr-page {
    --sr-bg: #f0f2f5;
    --sr-card: #ffffff;
    --sr-text: #1c1e21;
    --sr-muted: #65676b;
    --sr-primary: #5b6ee8;
    --sr-accent: #7c4fbd;
    --sr-radius: 14px;
    --sr-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .06);
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 12px 28px;
    background: var(--sr-bg);
    min-height: calc(100vh - var(--fb-topbar-height, 56px));
}

.sr-page p,
.sr-page span,
.sr-page input,
.sr-page button,
.sr-page a,
.sr-page h1,
.sr-page h2,
.sr-page h3,
.sr-page h4,
.sr-page label {
    font-family: inherit !important;
}

.sr-page i.fa,
.sr-page i.fas,
.sr-page i.far,
.sr-page i.fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-style: normal;
}

.sr-page i.fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
}

.sr-page i.fas,
.sr-page i.fa-solid {
    font-weight: 900;
}

.sr-hero {
    background: linear-gradient(135deg, #5b6ee8 0%, #7c4fbd 100%);
    margin: 0 -12px 14px;
    padding: 16px 12px 14px;
    color: #fff;
}

.sr-hero__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff !important;
}

.sr-hero__meta {
    font-size: .82rem;
    opacity: 1;
    color: rgba(255, 255, 255, .95) !important;
    margin: 0 0 12px;
}

.sr-search-form {
    position: relative;
}

.sr-search-input {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 12px 44px 12px 42px;
    font-size: 16px;
    color: var(--sr-text) !important;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    font-family: "Roboto", system-ui, sans-serif !important;
}

.sr-search-input:focus {
    outline: 2px solid rgba(255, 255, 255, .55);
}

.sr-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sr-muted);
    pointer-events: none;
}

.sr-search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #5b6ee8, #7c4fbd);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sr-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-bottom: 14px;
}

.sr-tabs::-webkit-scrollbar {
    display: none;
}

.sr-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--sr-card);
    border: 1px solid #e4e6eb;
    color: var(--sr-muted) !important;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: var(--sr-shadow);
    transition: background .15s, color .15s, border-color .15s;
}

.sr-tab:hover {
    color: var(--sr-primary);
    border-color: #c7d2fe;
}

.sr-tab.active {
    background: linear-gradient(135deg, #5b6ee8, #7c4fbd);
    border-color: transparent;
    color: #fff !important;
}

.sr-tab.active span {
    color: #fff !important;
}

.sr-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    font-size: .68rem;
    font-weight: 700;
}

.sr-tab.active .sr-tab__count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.sr-section {
    margin-bottom: 18px;
}

.sr-section__title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--sr-text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sr-section__title i {
    color: var(--sr-primary);
}

.sr-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--sr-card);
    border-radius: var(--sr-radius);
    border: 1px solid #e4e6eb;
    box-shadow: var(--sr-shadow);
    text-decoration: none !important;
    color: inherit;
    margin-bottom: 10px;
    transition: transform .15s, box-shadow .15s;
}

.sr-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .1);
}

.sr-card__img,
.sr-card__placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: cover;
}

.sr-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    color: var(--sr-primary);
    font-size: 1.2rem;
}

.sr-card__body {
    flex: 1;
    min-width: 0;
}

.sr-card__title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--sr-text) !important;
    margin: 0 0 2px;
    line-height: 1.3;
}

.sr-card__sub {
    font-size: .78rem;
    color: var(--sr-muted) !important;
    margin: 0 0 6px;
}

.sr-card__desc {
    font-size: .8rem;
    color: var(--sr-muted) !important;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: .74rem;
    color: var(--sr-muted) !important;
}

.sr-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sr-card__meta i {
    color: var(--sr-primary);
    font-size: .7rem;
}

.sr-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: .68rem;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

.sr-verified {
    color: #16a34a;
    margin-left: 4px;
}

.sr-empty {
    text-align: center;
    padding: 40px 16px;
    background: var(--sr-card);
    border-radius: var(--sr-radius);
    border: 1px solid #e4e6eb;
}

.sr-empty i {
    font-size: 2.5rem;
    color: #c7d2fe;
    margin-bottom: 12px;
}

.sr-empty h4 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--sr-text);
}

.sr-empty p {
    font-size: .88rem;
    color: var(--sr-muted);
    margin: 0 0 16px;
}

.sr-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.sr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none !important;
}

.sr-btn--primary {
    background: linear-gradient(135deg, #5b6ee8, #7c4fbd);
    color: #fff !important;
}

.sr-btn--ghost {
    background: #fff;
    color: var(--sr-primary) !important;
    border: 1px solid #c7d2fe;
}

.sr-pagination {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.sr-pagination .pagination {
    margin: 0;
    gap: 4px;
}

.sr-pagination .page-link {
    border-radius: 8px;
    font-size: .82rem;
    padding: 6px 10px;
}

@media (min-width: 768px) {
    .sr-page {
        padding: 0 0 32px;
    }

    .sr-hero {
        margin: 0 0 16px;
        border-radius: 16px;
    }
}
