@import url("/css/ns-tokens.css");
@import url("/css/pages/looks-google-path.css");

/* OPUS5-M13 — /agents/category/{slug}
 *
 * Page chrome only. The CARDS are the shelf's own
 * (marketplace-agent-listings-v2.css + marketplace-depth.css, linked by the
 * blade in that order); nothing here redefines an .mp-* rule, so a card on a
 * category page and a card on the shelf stay one design.
 *
 * Dark-shell page: layouts.landing paints the background and this file never
 * sets one on body. Colours go through the estate's --ns-* tokens with the same
 * literal fallbacks agents-directory uses, so the page still reads if the token
 * sheet is late or absent.
 *
 * No position:sticky anywhere: this estate's body carries overflow-x:hidden,
 * which makes body the sticky scroll container and gives a last-child element
 * zero travel. Anything that wants to follow the reader must be fixed +
 * IntersectionObserver instead, and nothing here needs to.
 *
 * Mobile-first: the base rules ARE the 375 layout; the media queries only add
 * room as the viewport earns it.
 */

.ns-cat {
    padding: 1.5rem 0 4rem;
}

/* Line 16225: lit (agents_category_holds_still), the body wears .ns-gp too and takes the page's token ground and
   text, so the site-wide dock's name and "Open" (which inherit the body's colour) are not white on the light page. */
body.ns-gp:has(.ns-cat.ns-gp) {
    background: var(--ns-bg);
    color: var(--ns-text);
}

.ns-cat .container {
    max-width: 1200px;
}

/* ---------- breadcrumb ---------- */

.ns-cat-crumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--ns-text-secondary, #a0a0a0);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.ns-cat-crumbs a {
    color: var(--ns-text-secondary, #a0a0a0);
    text-decoration: none;
}

.ns-cat-crumbs a:hover {
    color: var(--ns-accent, #f59e0b);
    text-decoration: underline;
}

.ns-cat-crumbs [aria-current="page"] {
    color: var(--ns-text-primary, #f1f1f1);
}

/* ---------- head ---------- */

.ns-cat-head {
    max-width: 46rem;
    margin-bottom: 2.5rem;
}

.ns-cat-eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ns-accent, #f59e0b);
    margin: 0 0 0.5rem;
}

.ns-cat-title {
    font-size: 1.875rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--ns-text-primary, #f1f1f1);
    margin: 0 0 0.75rem;
}

/* The count sentence is the page's honesty anchor — it is the paginator's own
   total, so it gets weight rather than being buried in body copy. */
.ns-cat-count {
    font-size: 1rem;
    color: var(--ns-text-secondary, #a0a0a0);
    margin: 0 0 1rem;
}

.ns-cat-count strong {
    color: var(--ns-text-primary, #f1f1f1);
    font-size: 1.25rem;
    font-weight: 800;
}

.ns-cat-intro {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ns-text-secondary, #a0a0a0);
    margin: 0 0 1rem;
}

.ns-cat-caveat {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--ns-text-secondary, #a0a0a0);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(245, 158, 11, 0.5);
    border-radius: 0.5rem;
    padding: 0.75rem 0.875rem;
    margin: 0;
}

.ns-cat-caveat i {
    color: var(--ns-accent, #f59e0b);
    margin-top: 0.15rem;
    flex: 0 0 auto;
}

/* ---------- section headings ---------- */

.ns-cat-h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ns-text-primary, #f1f1f1);
    margin: 0 0 0.375rem;
}

.ns-cat-sub {
    font-size: 0.875rem;
    color: var(--ns-text-secondary, #a0a0a0);
    margin: 0 0 1rem;
}

/* ---------- roles strip ---------- */

.ns-cat-roles {
    margin-bottom: 2.5rem;
}

.ns-cat-rolelist {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.ns-cat-role {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ns-text-primary, #f1f1f1);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
    padding: 0.3125rem 0.75rem;
}

/* ---------- grid ---------- */

.ns-cat-grid-wrap {
    margin-bottom: 3rem;
}

.ns-cat-grid-wrap .ns-cat-h2 {
    margin-bottom: 1rem;
}

.ns-cat-empty {
    color: var(--ns-text-secondary, #a0a0a0);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 2rem 1.25rem;
    text-align: center;
    margin: 0;
}

.ns-cat-empty a {
    color: var(--ns-accent, #f59e0b);
}

.ns-cat-pagination {
    display: flex;
    justify-content: center;
    padding-top: 1.5rem;
}

/* Laravel's default paginator ships .text-gray-700 copy that is near-black and
   unreadable on this surface — the same repair agents-directory.css makes. */
.ns-cat-pagination p,
.ns-cat-pagination .text-gray-700,
.ns-cat-pagination .text-sm {
    color: var(--ns-text-secondary, #a0a0a0);
}

.ns-cat-pagination .page-link {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ns-text-secondary, #a0a0a0);
    border-radius: 0.5rem;
}

.ns-cat-pagination .page-item.active .page-link {
    background: var(--ns-accent, #f59e0b);
    border-color: var(--ns-accent, #f59e0b);
    color: #0d0d0d;
}

/* ---------- where to go next ---------- */

.ns-cat-next {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
}

.ns-cat-others {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    margin: 0 0 1.75rem;
    padding: 0;
}

.ns-cat-other {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.625rem;
    padding: 0.75rem 0.9375rem;
    text-decoration: none;
    /* 44px comfortable tap target at 375 without forcing a height on desktop. */
    min-height: 2.75rem;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.ns-cat-other:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.35);
    text-decoration: none;
}

.ns-cat-other__name {
    font-weight: 700;
    color: var(--ns-text-primary, #f1f1f1);
}

.ns-cat-other__count {
    font-size: 0.8125rem;
    color: var(--ns-text-secondary, #a0a0a0);
    white-space: nowrap;
}

.ns-cat-shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ns-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.6875rem 1.125rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--ns-text-primary, #f1f1f1);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.18s ease, background-color 0.18s ease;
    flex: 1 1 auto;
}

.ns-cat-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--ns-text-primary, #f1f1f1);
    text-decoration: none;
}

.ns-cat-btn--primary {
    background: var(--ns-accent, #f59e0b);
    border-color: var(--ns-accent, #f59e0b);
    color: #0d0d0d;
}

.ns-cat-btn--primary:hover {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #0d0d0d;
}

.ns-cat-foot {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ns-text-secondary, #a0a0a0);
    margin: 0;
}

/* ---------- worded 404 ---------- */

.ns-cat-404 {
    max-width: 42rem;
    padding: 2rem 0 1rem;
}

.ns-cat-others--404 {
    margin-top: 1.5rem;
}

/* ---------- focus ---------- */

/* Explicit ring rather than transition:all — a blanket transition animates the
   outline in, and a screenshot-based focus probe then photographs a moment when
   the ring is not yet painted. */
.ns-cat a:focus-visible,
.ns-cat button:focus-visible {
    outline: 2px solid var(--ns-accent, #f59e0b);
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* ---------- room as the viewport earns it ---------- */

@media (min-width: 576px) {
    .ns-cat-others {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ns-cat-btn {
        flex: 0 0 auto;
    }
}

@media (min-width: 768px) {
    .ns-cat {
        padding: 2.5rem 0 5rem;
    }

    .ns-cat-title {
        font-size: 2.5rem;
    }

    .ns-cat-h2 {
        font-size: 1.375rem;
    }
}

@media (min-width: 992px) {
    .ns-cat-title {
        font-size: 3rem;
    }

    .ns-cat-others {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ns-cat-other,
    .ns-cat-btn {
        transition: none;
    }
}
