/* SPDX-License-Identifier: MIT

   The panel of the search field (web/panel.tcl) and the groups of the
   search page. The colors are the variables of the style, with the
   system colors when a style does not have them. */

form.search { position: relative; }
.fm-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  width: min(34rem, calc(100vw - 1rem)); max-height: min(70vh, 34rem); overflow-y: auto;
  padding: .25rem 0; text-align: left; font-size: .95rem; line-height: 1.35;
  background: var(--surface, var(--bg, Canvas)); color: var(--text, CanvasText);
  border: 1px solid var(--line-strong, var(--line, GrayText)); border-radius: 8px;
  box-shadow: 0 10px 28px rgb(0 0 0 / .2);
}
.fm-panel[hidden] { display: none; }
.fm-group-label {
  margin: 0; padding: .55rem .8rem .2rem; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted, var(--text-3, GrayText));
}
.fm-option {
  display: block; padding: .4rem .8rem .4rem calc(.8rem - 3px); color: inherit; text-decoration: none;
  border-left: 3px solid transparent;
}
.fm-option:hover { background: var(--code-bg, Field); }
.fm-option[aria-selected="true"] {
  background: var(--accent-soft, var(--code-bg, Highlight));
  border-left-color: var(--accent, var(--link, Highlight));
}
.fm-title { display: block; font-weight: 600; }
.fm-line {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: .85rem; color: var(--muted, var(--text-3, GrayText));
}
.fm-line.fm-usage { font-family: var(--mono, ui-monospace, monospace); }
.fm-panel mark, #search-results mark {
  background: none; color: inherit; font-weight: 700; text-decoration: underline;
}
.fm-none, .fm-keys {
  margin: 0; padding: .45rem .8rem; font-size: .8rem; color: var(--muted, var(--text-3, GrayText));
}
.fm-keys { border-top: 1px solid var(--line, GrayText); }
.fm-keys kbd { font: inherit; font-family: var(--mono, ui-monospace, monospace); }
/* On a phone the panel has the width of the screen. */
@media (max-width: 40rem) {
  .fm-panel { position: fixed; left: .5rem; right: .5rem; top: 3.5rem; width: auto; }
  .fm-keys { display: none; }
}
.fm-results-group h2 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
.fm-results-group ol { padding-left: 1.25rem; }
#search-results.fm-grouped { list-style: none; padding-left: 0; }
.fm-hidden { display: none !important; }
.fm-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
