/* The transit library — loaded by templates/transit_library*.html and by the panel on a line's page.
   The site's pixel face is for headings; lists of hundreds of titles are set in VT323, which reads. */

.lib-text,
.lib-facts,
.lib-docs,
.lib-places,
.lib-search,
.lib-filter,
.lib-group summary {
    font-family: 'VT323', 'Noto Sans SC', monospace;
    font-size: 1.3rem;
    line-height: 1.3;
}
.lib-text { margin: 0.5rem 0; color: var(--text-body); }
.lib-soft { color: #6b6b80; }
.lib-counts strong { color: var(--forest-green); }

.lib-search,
.lib-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.9rem;
}
.lib-search input[type="text"],
.lib-filter input[type="text"] {
    flex: 1 1 14rem;
    min-width: 0;
    max-width: 30rem;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    margin: 0;
}
.lib-search label,
.lib-filter label {
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    color: var(--text-body);
    margin: 0;
}
.lib-search .btn { margin-top: 0; }

/* The corridors and shelves on the front page */
.lib-places {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: 0.6rem 1.25rem;
}
.lib-places li {
    border-left: 4px solid var(--forest-green);
    padding: 0.1rem 0 0.2rem 0.7rem;
    min-width: 0;
}
.lib-place-name { font-size: 1.45rem; font-weight: bold; }
.lib-place-n {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0 0.4rem;
    border-radius: 3px;
    background: var(--cream-dark);
    color: var(--text-dark);
    font-size: 1.1rem;
}
.lib-place-also { display: block; color: #6b6b80; font-size: 1.15rem; line-height: 1.2; }

/* Names and values: a corridor's names, a document's particulars */
.lib-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem 1.5rem;
    margin: 0.5rem 0 0;
}
.lib-facts dt { color: var(--forest-green); font-weight: bold; }
.lib-facts dd { margin: 0; color: var(--text-body); min-width: 0; overflow-wrap: anywhere; }
.lib-mono { font-family: 'VT323', monospace; }
.lib-sha { font-size: 1.05rem; }
.lib-url { overflow-wrap: anywhere; }
.lib-doc-heading { font-size: 1.05rem; line-height: 1.5; margin-top: 0; }

/* A list of documents */
.lib-docs { list-style: none; margin: 0.4rem 0 0.9rem; padding: 0; }
.lib-doc {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0 0.9rem;
    padding: 0.3rem 0;
    border-top: 1px solid var(--cream-dark);
}
.lib-doc:first-child { border-top: 0; }
.lib-doc[hidden] { display: none; }
.lib-doc-date { color: var(--text-dark); white-space: nowrap; }
.lib-doc-date--soft { color: #8a8a9c; font-style: italic; }
.lib-doc-main { min-width: 0; }
.lib-doc-title { font-size: 1.4rem; overflow-wrap: anywhere; }
.lib-doc--missing .lib-doc-title { color: #6b6b80; }
.lib-doc-meta { display: block; color: #6b6b80; font-size: 1.1rem; line-height: 1.25; }
.lib-doc-meta a { color: #6b6b80; }
.lib-tag {
    display: inline-block;
    padding: 0 0.35rem;
    border-radius: 3px;
    font-size: 1.05rem;
    background: var(--cream-dark);
    color: var(--text-dark);
}
.lib-tag--missing { background: #f1d5d5; color: #7a1f1f; }
.lib-tag--warn { background: #f6e7b4; color: #6b5200; }

/* The kinds of document on a corridor's page, each folding */
.lib-group { margin: 0.6rem 0; }
details.lib-group > summary {
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--forest-green);
    padding: 0.2rem 0;
}
.lib-group[hidden] { display: none; }
.lib-year {
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    margin: 0.7rem 0 0;
    padding-bottom: 0.1rem;
    border-bottom: 2px solid var(--gold-dark);
    color: var(--text-dark);
}
.lib-year[hidden] { display: none; }
.lib-foot .lib-text { font-size: 1.15rem; }
.lib-lines a { white-space: nowrap; }

@media (max-width: 560px) {
    .lib-doc { grid-template-columns: 1fr; }
    .lib-doc-date { font-size: 1.1rem; }
    .lib-facts { grid-template-columns: 1fr; gap: 0 0; }
    .lib-facts dd { margin-bottom: 0.5rem; }
    .lib-places { grid-template-columns: 1fr; }
}
