/* ============================================================
   Soofos — Search page styles
   Class prefix: sf-search-*
   All visual values from tokens.css. No hardcoded hex/font.
   Results layout: design "Heldere lijst" (approved 16 Nov 2026),
   classes sf-sr-*: one white card per block, hairlines between
   rows, one meta line, blue as the only accent.
   ============================================================ */

/* ── Outer wrap ─────────────────────────────────────────────────────────── */

.sf-search-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 40px 48px;
}

/* ── Search form ─────────────────────────────────────────────────────────── */

.sf-search-form {
    position: relative; /* anchors the suggestion list (portal-quicksearch.js) */
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--r-btn);
    padding: var(--soofos-space-xs) var(--soofos-space-xs) var(--soofos-space-xs) var(--soofos-space-lg);
    margin-bottom: 24px;
    cursor: text;
    box-shadow: var(--shadow-soft);
}

/* The field's own outline is suppressed, so the whole box carries the
   visible focus state (WCAG 2.4.7). */
.sf-search-form:focus-within {
    border-color: var(--blue);
    box-shadow: var(--soofos-shadow-focus);
}

/* 16px: iOS Safari zooms into any focused input below 16px. The input fills
   the box height so the whole 44px band is tappable. */
.sf-search-input {
    flex: 1;
    align-self: stretch;
    min-height: var(--soofos-control-min-height);
    border: none;
    outline: none;
    font: 700 var(--soofos-text-lg) var(--font);
    color: var(--ink);
    background: transparent;
    min-width: 0;
}

.sf-search-input::placeholder {
    color: var(--muted-2);
    font-weight: 600;
}

.sf-search-btn {
    flex: none;
    min-height: var(--soofos-control-min-height);
    cursor: pointer;
}

.sf-search-btn[aria-busy="true"] {
    cursor: progress;
    opacity: .85;
}

/* ── AI answer (Plus Pro) ────────────────────────────────────────────────── */

.sf-search-ai {
    background: var(--white);
    border: 1.5px solid var(--blue-border);
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 14px;
    position: relative;
}

.sf-search-ai::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--deep-blue));
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.sf-search-ai__label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: var(--soofos-text-xs); font-weight: 900; color: var(--deep-blue);
    margin-bottom: 8px;
}

.sf-search-ai__icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    color: var(--deep-blue);
}

.sf-search-ai__badge {
    font-size: 11px; font-weight: 900;
    color: var(--on-navy); background: var(--deep-blue);
    border-radius: var(--r-pill); padding: 2px 8px;
}

.sf-search-ai__sentence {
    margin: 0 0 8px;
    font-size: 16px; font-weight: 800; color: var(--ink);
    line-height: 1.45;
}

.sf-search-ai__prov {
    font-size: 12px; font-weight: 700; color: var(--muted-2);
}

/* ============================================================
   Results layout "Heldere lijst" (sf-sr-*)
   ============================================================ */

/* ── Head: visible title + totals ────────────────────────────────────────── */

.sf-sr-head__title {
    margin: 0 0 4px;
    color: var(--ink);
    font-family: var(--font);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
}

.sf-sr-head__sum {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.sf-sr-head {
    margin: 0 0 16px;
}

.sf-sr .sf-sr-form {
    margin-bottom: 8px;
}

/* ── Tabs per kind of result; stick under the site header ────────────────
   --sf-sr-sticky-top is set by the page script to the header's real bottom
   edge; --sf-nav-h (shell.css) is the fallback without script. */

.sf-sr-jump {
    position: sticky;
    top: var(--sf-sr-sticky-top, var(--sf-nav-h, 75px));
    z-index: 30;
    margin: 0 -12px 24px;
    padding: 0 12px;
    background: var(--page);
}

.sf-sr-jump ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    border-bottom: 1px solid var(--card-border);
    scrollbar-width: none;
}

.sf-sr-jump ul::-webkit-scrollbar {
    display: none;
}

.sf-sr-jump__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}

.sf-sr-jump__link span {
    font-weight: 600;
}

.sf-sr-jump__link:hover {
    color: var(--ink);
}

.sf-sr-jump__link.is-current {
    border-bottom-color: var(--blue);
    color: var(--ink);
}

.sf-sr-jump__link:focus-visible,
.sf-sr-row:focus-visible,
.sf-sr-best__card:focus-visible,
.sf-sr-topic:focus-visible,
.sf-sr-link:focus-visible,
.sf-sr-pro__link:focus-visible,
.sf-sr-ai__src a:focus-visible,
.sf-sr-empty a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* Rows fill their card, so the ring sits inside it (the card clips overflow). */
.sf-sr-row:focus-visible {
    outline-offset: -2px;
}

/* ── Blocks ──────────────────────────────────────────────────────────────── */

.sf-sr-block {
    margin: 0 0 36px;
    scroll-margin-top: calc(var(--sf-sr-sticky-top, var(--sf-nav-h, 75px)) + 64px);
}

.sf-sr-blockhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.sf-sr-h {
    margin: 0 0 10px;
    color: var(--ink);
    font-family: var(--font);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: normal;
}

.sf-sr-blockhead .sf-sr-h {
    margin: 0;
}

.sf-sr-h__count {
    margin-left: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.sf-sr-link,
.sf-sr-pro__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.sf-sr-link:hover,
.sf-sr-pro__link:hover {
    text-decoration: underline;
}

/* Catalogue link without a course list to head. */
.sf-sr-browse {
    margin: -20px 0 24px;
}

/* ── One calm meta line ──────────────────────────────────────────────────── */

/* The dot belongs to the part after it and sits in that part's left padding.
   The line is pulled left by the same amount and clipped there, so the first
   part of every line (also after a wrap) shows no dot and no line ends with
   one. */
.sf-sr-meta {
    --sf-sr-dot: 17px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin-left: calc(var(--sf-sr-dot) * -1);
    clip-path: inset(0 0 0 var(--sf-sr-dot));
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
}

.sf-sr-meta > :not(.sf-sr-meta__dot) {
    position: relative;
    min-width: 0;
    padding-left: var(--sf-sr-dot);
}

.sf-sr-meta > :not(.sf-sr-meta__dot)::before {
    content: "\00b7";
    position: absolute;
    left: 0;
    width: var(--sf-sr-dot);
    color: var(--faint);
    text-align: center;
}

.sf-sr-meta__dot {
    display: none;
}

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

.sf-sr-meta__rating strong {
    color: var(--ink);
}

/* Two classes: the icon's own size class (.sf-icon--sm) must not win. */
.sf-sr-meta .sf-sr-star {
    width: 14px;
    height: 14px;
    color: var(--star);
    fill: var(--star);
}

/* ── Price ───────────────────────────────────────────────────────────────── */

.sf-sr-price {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--ink);
    text-align: right;
    white-space: nowrap;
}

.sf-sr-price .sf-card-price-main,
.sf-sr-price__main {
    color: var(--ink);
    font-size: 17px;
    font-weight: 800;
}

.sf-sr-price .sf-card-price-original {
    margin-left: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: line-through;
}

.sf-sr-price__plus {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

/* ── Best results: three equal cards ─────────────────────────────────────── */

.sf-sr-best {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-sr-best li {
    display: flex;
    min-width: 0;
}

.sf-sr-best__card {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .15s;
}

.sf-sr-best__card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.sf-sr-best__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--blue-fill);
}

.sf-sr-best__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-sr-best__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px 16px 16px;
}

.sf-sr-best__title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sf-sr-best__body .sf-sr-price {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin-top: auto;
    padding-top: 8px;
    text-align: left;
    white-space: normal;
}

/* ── Lists: one white card, rows divided by a hairline ───────────────────── */

.sf-sr-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
    overflow: hidden;
}

.sf-sr-list > li {
    margin: 0;
    min-width: 0;
}

.sf-sr-list > li + li {
    border-top: 1px solid var(--card-border);
}

.sf-sr-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px 14px 14px;
    color: var(--ink);
    text-decoration: none;
    transition: background-color .15s;
}

.sf-sr-row:hover {
    background: var(--blue-tint);
}

.sf-sr-row__thumb {
    flex: none;
    width: 120px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--r-btn);
    background: var(--blue-fill);
}

.sf-sr-row__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Kinds without art (a program without image, an instructor without photo). */
.sf-sr-row__thumb--icon {
    display: grid;
    place-items: center;
    color: var(--deep-blue);
}

.sf-sr-row__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sf-sr-row__title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sf-sr-row--article .sf-sr-row__thumb {
    width: 96px;
    aspect-ratio: 900 / 471;
}

.sf-sr-row--article .sf-sr-row__title {
    font-size: 15px;
}

.sf-sr-row--person .sf-sr-row__thumb {
    width: 48px;
    aspect-ratio: 1;
    border-radius: var(--r-pill);
}

.sf-sr-row--program .sf-sr-price__plus {
    color: var(--deep-blue);
    font-size: 13.5px;
    font-weight: 700;
}

.sf-sr-list--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sf-sr-list--two > li + li {
    border-top: 0;
}

.sf-sr-list--two > li:nth-child(n+3) {
    border-top: 1px solid var(--card-border);
}

.sf-sr-list--two > li:nth-child(odd) {
    border-right: 1px solid var(--card-border);
}

.sf-sr-more {
    margin: 12px 0 0;
}

.sf-sr-more .btn {
    min-height: var(--soofos-control-min-height);
}

/* ── AI answer (Plus Pro): the site's own block, plus source links ───────── */

.sf-sr .sf-sr-ai {
    margin-bottom: 28px;
}

.sf-sr-ai__src {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0 0 10px;
    font-size: 13.5px;
}

.sf-sr-ai__src span {
    color: var(--muted);
}

.sf-sr-ai__src a {
    color: var(--deep-blue);
    font-weight: 700;
    text-decoration: none;
}

.sf-sr-ai__src a:hover {
    text-decoration: underline;
}

/* ── Plus Pro teaser (no answer): one quiet line ─────────────────────────── */

.sf-sr-pro {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -12px 0 36px;
    padding: 4px 0;
    color: var(--body);
    font-size: 14px;
}

.sf-sr-pro__icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    color: var(--deep-blue);
}

.sf-sr-pro__copy {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
}

.sf-sr-pro__copy strong {
    color: var(--ink);
}

/* ── Topics and categories: one pill per term ────────────────────────────── */

.sf-sr-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-sr-topic {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink);
    font-size: 15px;
    text-decoration: none;
    transition: border-color .15s;
}

.sf-sr-topic:hover {
    border-color: var(--blue);
}

.sf-sr-topic span {
    color: var(--muted);
    font-size: 13.5px;
}

.sf-sr-topic .sf-icon {
    color: var(--deep-blue);
}

.sf-sr-trust {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
}

/* ── No results ──────────────────────────────────────────────────────────── */

.sf-sr-empty {
    margin: 8px 0 0;
    padding: 32px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
}

.sf-sr-empty__title {
    margin: 0 0 6px;
    color: var(--ink);
    font-family: var(--font);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

.sf-sr-empty__did {
    margin: 0 0 16px;
    color: var(--body);
    font-size: 17px;
}

.sf-sr-empty__did a {
    color: var(--deep-blue);
    font-weight: 800;
}

.sf-sr-empty__tips {
    margin: 10px 0 20px;
    padding-left: 20px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.sf-sr-empty__did + .sf-sr-empty__tips {
    margin-top: 0;
}

.sf-sr-empty__sub {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
}

.sf-sr-empty__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.sf-sr-empty__cats a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--deep-blue);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.sf-sr-empty__cats a:hover {
    text-decoration: underline;
}

.sf-sr-empty .btn {
    min-height: var(--soofos-control-min-height);
}

/* ── Tablet and phone ────────────────────────────────────────────────────── */

@media (max-width: 760px) {
    .sf-sr-best {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .sf-sr-best__card {
        flex-direction: row;
    }

    .sf-sr-best__media {
        flex: 0 0 38%;
        aspect-ratio: auto;
    }

    .sf-sr-blockhead {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .sf-sr-list--two {
        grid-template-columns: minmax(0, 1fr);
    }

    .sf-sr-list--two > li + li {
        border-top: 1px solid var(--card-border);
    }

    .sf-sr-list--two > li:nth-child(odd) {
        border-right: 0;
    }
}

@media (max-width: 640px) {
    .sf-search-wrap {
        padding: 20px 16px 36px;
    }

    .sf-sr-jump {
        margin: 0 -16px 20px;
        padding: 0 16px;
    }
}

@media (max-width: 600px) {
    .sf-sr-row {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px 12px;
        padding: 12px;
    }

    .sf-sr-row__thumb {
        width: 88px;
    }

    .sf-sr-row--person .sf-sr-row__thumb {
        width: 44px;
    }

    .sf-sr-row__info {
        flex: 1 1 0;
    }

    .sf-sr-row .sf-sr-price {
        flex: 1 1 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: flex-start;
        gap: 2px 10px;
        padding-left: 100px;
        text-align: left;
        white-space: normal;
    }

    .sf-sr-pro {
        flex-wrap: wrap;
    }

    .sf-sr-pro__link {
        flex: 1 1 100%;
        padding-left: 30px;
    }

    .sf-sr-empty {
        padding: 22px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-sr-best__card,
    .sf-sr-row,
    .sf-sr-jump__link,
    .sf-sr-topic {
        transition: none;
    }

    .sf-sr-best__card:hover {
        transform: none;
    }
}

/* Without the tab row (no query yet, or a single kind of result) the first
   block keeps its distance from the search field. */
.sf-sr-form + .sf-sr-block,
.sf-sr-form + .sf-sr-ai {
    margin-top: 24px;
}
