/*
 * Hírhányó — search terms block (web/components/search_terms.html): the reader's recent
 * searches (from the browser, search-terms.js) and the terms other readers searched (from the
 * server). A group without terms is not shown; neither is the block without any group.
 * Pair with assets/js/search-terms.js.
 */

.search-terms { min-width: 0; color: var(--text); }
.search-terms[hidden],
.search-terms-group[hidden] { display: none; }
.search-terms-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 16px 16px; }
.search-terms-group { min-width: 0; }

.search-terms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; margin: 0 0 8px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; }
.search-terms-head :is(h2, h3) { overflow: hidden; margin: 0; color: var(--muted); font: inherit; text-overflow: ellipsis; white-space: nowrap; }
.search-terms-clear { flex: none; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; letter-spacing: inherit; cursor: pointer; }
.search-terms-clear:hover,
.search-terms-clear:focus-visible { color: var(--color-primary); }

.search-terms-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.search-terms-list li { min-width: 0; max-width: 100%; }
.search-term { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 9px; border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; }
.search-term span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-term .icon { flex: none; color: var(--muted); font-size: 13px; }
.search-term:hover,
.search-term:focus-visible { border-color: var(--color-primary); color: var(--color-primary); }
.search-term:hover .icon,
.search-term:focus-visible .icon { color: inherit; }

/* Plain: no panel and no heading, e.g. under the message of the error page */
.search-terms.is-plain .search-terms-body { padding: 0; }
