/* NewPrompt — search.css
   Ecosystem Search (/search). Reuses the platform's calm dark surfaces, tier
   accents (resource indigo / playbook green / blueprint gold / tool neutral),
   badge language, and the stretched-link card pattern. Scoped to .np-srch-. */

.np-srch-page {
    max-width: 880px;
    margin-inline: auto;
    padding: 3rem 1.5rem 5rem;
}

/* ── Hero ── */
.np-srch-hero { margin-bottom: 1.5rem; }
.np-srch-hero-title {
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.np-srch-hero-sub {
    color: var(--np-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 60ch;
}

/* ── Search form ── */
.np-srch-form { margin-bottom: 2rem; }
.np-srch-visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.np-srch-inputwrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.35rem 0.35rem 0.9rem;
    border: 1px solid var(--np-border);
    border-radius: 12px;
    background: var(--np-bg-card);
    transition: border-color 0.15s;
}
.np-srch-inputwrap:focus-within { border-color: rgba(99,91,255,0.5); }
.np-srch-icon { display: inline-flex; color: var(--np-text-muted); flex-shrink: 0; }
.np-srch-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--np-text-primary);
    font-size: 0.95rem;
    padding: 0.5rem 0;
    outline: none;
}
.np-srch-input::placeholder { color: var(--np-text-muted); }
.np-srch-submit {
    flex-shrink: 0;
    border: 0;
    border-radius: 9px;
    padding: 0.55rem 1.1rem;
    background: var(--np-accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.15s;
}
.np-srch-submit:hover { background: var(--np-accent-light, #7c75ff); }

/* ── Empty / no-results state ── */
.np-srch-state {
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius-lg, 18px);
    background: var(--np-bg-card);
    padding: 2.25rem 1.75rem;
    text-align: center;
}
.np-srch-state-title { font-size: 1.05rem; font-weight: 750; letter-spacing: -0.015em; margin-bottom: 0.45rem; }
.np-srch-state-sub { color: var(--np-text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.25rem; }
.np-srch-hublinks { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.np-srch-hub {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--np-border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 650;
    text-decoration: none;
    color: var(--np-text-secondary);
    transition: border-color 0.15s, color 0.15s, transform 0.12s;
}
.np-srch-hub:hover { transform: translateY(-1px); text-decoration: none; }
.np-srch-hub--resource:hover  { border-color: rgba(99,91,255,0.5);  color: var(--np-accent-light, #7c75ff); }
.np-srch-hub--playbook:hover  { border-color: rgba(34,197,94,0.55); color: #6ee7a8; }
.np-srch-hub--blueprint:hover { border-color: rgba(245,183,60,0.55); color: var(--np-bp-accent, #f5b73c); }
.np-srch-hub--tool:hover      { border-color: rgba(255,255,255,0.28); color: var(--np-text-primary); }

/* ── Result count ── */
.np-srch-count {
    color: var(--np-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ── Result list ── */
.np-srch-list { display: flex; flex-direction: column; gap: 0.7rem; }

.np-srch-card {
    position: relative;            /* stretched-link anchor */
    border: 1px solid var(--np-border);
    border-left-width: 3px;
    border-radius: var(--np-radius, 12px);
    background: var(--np-bg-card);
    padding: 1.05rem 1.25rem;
    transition: border-color 0.15s, transform 0.12s;
}
.np-srch-card:hover { transform: translateY(-1px); }

/* Tier accent on the left edge + hover border */
.np-srch-card--tool      { border-left-color: rgba(255,255,255,0.25); }
.np-srch-card--resource  { border-left-color: var(--np-accent, #635bff); }
.np-srch-card--playbook  { border-left-color: #34d77b; }
.np-srch-card--blueprint { border-left-color: var(--np-bp-accent, #f5b73c); }
.np-srch-card--tool:hover      { border-color: rgba(255,255,255,0.22); }
.np-srch-card--resource:hover  { border-color: rgba(99,91,255,0.45); }
.np-srch-card--playbook:hover  { border-color: rgba(34,197,94,0.5); }
.np-srch-card--blueprint:hover { border-color: rgba(245,183,60,0.5); }

/* Type badge */
.np-srch-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.np-srch-badge--tool      { color: var(--np-text-secondary); background: rgba(255,255,255,0.06); border-color: var(--np-border); }
.np-srch-badge--resource  { color: var(--np-accent-light, #7c75ff); background: rgba(99,91,255,0.12); border-color: rgba(99,91,255,0.3); }
.np-srch-badge--playbook  { color: #6ee7a8; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.32); }
.np-srch-badge--blueprint { color: var(--np-bp-accent, #f5b73c); background: rgba(245,183,60,0.12); border-color: rgba(245,183,60,0.32); }

.np-srch-card-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; margin-bottom: 0.3rem; }
.np-srch-card-link { color: var(--np-text-primary); text-decoration: none; }
.np-srch-card-link:hover { text-decoration: none; }
/* Stretched link: the title anchor covers the whole card */
.np-srch-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.np-srch-card-summary {
    color: var(--np-text-secondary);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}

/* "Open in {Tool}" sits above the stretched link so it stays separately clickable */
.np-srch-open {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--np-accent-light, #7c75ff);
    text-decoration: none;
}
.np-srch-open:hover { text-decoration: none; color: var(--np-accent, #635bff); }

/* ── Responsive ── */
@media (max-width: 520px) {
    .np-srch-page { padding-inline: 1rem; }
    .np-srch-submit { padding: 0.55rem 0.85rem; }
}
@media (max-width: 380px) {
    /* keep the input usable; let the button shrink to its label */
    .np-srch-inputwrap { padding-left: 0.7rem; gap: 0.35rem; }
    .np-srch-hub { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
}
