/* === LIST FINDER (FETF items, SFI actions) ===
   Shared by partials/fetf-item-finder and partials/sfi-action-finder. Kept
   in a stylesheet rather than in a
   style attribute: the site runs under a CSP that blocks inline style. */

.finder {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.finder-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

@media (max-width: 720px) {
    .finder-controls { grid-template-columns: 1fr; }
}

.finder-field { display: flex; flex-direction: column; gap: var(--space-xs); }

.finder-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.finder-field input,
.finder-field select {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    width: 100%;
}

.finder-field input:focus,
.finder-field select:focus {
    outline: none;
    border-color: var(--color-primary-400);
}

.finder-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-sm);
}

/* The finder table carries far more rows than an editorial one, so it gets a
   scroll ceiling instead of running the page to several screens. */
.finder .table-wrapper {
    max-height: 34rem;
    overflow-y: auto;
}

.finder .finder-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.finder-table td { vertical-align: top; }

.finder-cat,
.finder-spec {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.finder-cat {
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.finder-spec { margin-top: 4px; max-width: 46ch; }

/* Requirements keep GOV.UK's own shape — a list of lower-case fragments
   continuing "Item must:". Run into prose they read as nonsense; capitalised
   they read as sentences the source never wrote. */
.finder-req {
    margin: 4px 0 0;
    padding-left: 1.1em;
    max-width: 46ch;
    list-style: disc;
}

.finder-req li {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.45;
    margin-bottom: 2px;
}

.finder-notes {
    margin-top: 6px;
    max-width: 46ch;
}

.finder-notes p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.45;
    margin: 0 0 3px;
}

.finder-toggle {
    display: inline-block;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary-500);
    cursor: pointer;
}

.finder-toggle:hover { color: var(--color-primary-600); text-decoration: underline; }

.finder-more {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.finder-empty {
    margin: var(--space-md) 0 0;
    color: var(--color-text-secondary);
}

.finder-synced {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}
