/* Page styles extracted from search/index.php. */

.search-page {
    padding: 30px 0 58px;
    background: linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
    min-height: calc(100vh - 120px);
}

.search-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.search-card,
.result-card,
.empty-state {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.search-card {
    position: relative;
    overflow: hidden;
    padding: 26px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)),
        url('/assets/images/hero-grid-pattern.svg');
    background-size: auto, 180px;
}

.search-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.search-card h1 {
    margin: 0 0 8px;
    font-size: clamp(1.65rem, 2.2vw, 2.2rem);
    line-height: 1.12;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.search-card p {
    max-width: 760px;
    margin: 0 0 20px;
    color: #64748b;
    line-height: 1.65;
}

.search-form-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(160px, 0.9fr) minmax(160px, 0.9fr) minmax(150px, 0.75fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    background: rgba(255,255,255,0.82);
}

.search-form-grid label {
    display: block;
    font-weight: 760;
    margin-bottom: 6px;
    color: #334155;
    font-size: 0.86rem;
}

.search-form-grid input,
.search-form-grid select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(148,163,184,0.26);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: #0f172a;
    outline: none;
}

.search-form-grid input:focus,
.search-form-grid select:focus {
    border-color: rgba(37, 99, 235, 0.48);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.search-form-grid .btn {
    min-height: 44px;
    border-radius: 8px;
}

.search-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.search-actions-row .btn,
.empty-actions .btn {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.search-results-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    margin: 6px 0 16px;
}

.search-results-head h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    letter-spacing: -0.02em;
}

.search-results-head p {
    margin: 0;
    color: #64748b;
}

.results-grid {
    display: grid;
    gap: 12px;
}

.result-card {
    position: relative;
    padding: 18px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075);
}

.result-card-top {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: flex-start;
}

.result-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.02em;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.result-card h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.result-card h3 a:hover {
    color: #1d4ed8;
}

.result-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f8fafc;
}

.result-meta a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
}

.result-meta a:hover {
    text-decoration: underline;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #166534;
    font-weight: 850;
    white-space: nowrap;
}

.result-card.is-business {
    border-color: rgba(217, 119, 6, 0.34);
    background: linear-gradient(90deg, rgba(255,251,235,0.72), #ffffff 28%);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.10);
}

.result-card.is-business .result-avatar {
    background: linear-gradient(135deg, #7a4f10, #d99a18 52%, #f3c451);
    color: #111827;
}

.result-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.74rem;
    font-weight: 850;
    white-space: nowrap;
    margin: 0 0 8px;
}

.empty-state {
    padding: 22px;
    border-style: dashed;
    color: #475569;
}

.empty-state p {
    margin: 0;
    line-height: 1.7;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .search-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .search-page {
        padding: 22px 0 42px;
    }

    .search-card {
        padding: 20px;
    }

    .search-form-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .result-card-top {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .rating-badge {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    .search-results-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form-grid .btn,
    .search-actions-row .btn,
    .empty-actions .btn {
        width: 100%;
    }
}
