/*
 * sources.css — the Sources RIGHT RAIL (sources-rail.php). BASELINE-loaded (Assets::VIEW_CSS) so the
 * rail is styled when the nav swaps it into #app-list. The People rail's shape: head + search pinned,
 * only the rows scroll; one compact line per source — code | name (truncates, tooltip when cut) | count.
 * Tokens only.
 */
.sources-rail {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    font-family: var(--foliale-font-family);
    font-size: var(--foliale-font-size-base);
}

.sources-rail-search {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

.sources-rail-search input[type="search"]::-webkit-search-cancel-button {
    display: none;   /* our own clear button */
}

.sources-rail-search .form-control:placeholder-shown ~ .sources-rail-clear {
    display: none;   /* clear shown only when the box has a value */
}

.sources-rail-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;   /* only the rows scroll */
}

.sources-rail-list {
    margin: 0;
}

/* The People row's compact line: same padding + line height. */
.sources-rail-row {
    padding: 0.05rem 0.25rem;
    line-height: 1.3;
}

.sources-rail-row a {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;   /* a name is data, not blue link text */
}

/* THE TRUNCATING COLUMN (min-width:0 lets it shrink); code and count are never cut. */
.sources-rail-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--foliale-text-color);
}

.sources-rail-code,
.sources-rail-cites {
    flex: 0 0 auto;
    white-space: nowrap;
}

.sources-rail-code {
    font-weight: 600;
}
