/* Keep the search control useful in production and visually present in Hugo's
   development server, where the generated Pagefind assets are unavailable. */
#header-inner {
  overflow: visible;
}

#search-form-wrap {
  padding: 13px 15px;
  position: relative;
  top: 0;
  width: 220px;
  z-index: 20;
}

pagefind-searchbox:not(:defined) {
  display: none;
}

.site-search-fallback {
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #777;
  font: inherit;
  opacity: 1;
}

pagefind-searchbox:defined + .site-search-fallback {
  display: none;
}

pagefind-searchbox {
  --pagefind-ui-primary: #111;
  --pagefind-ui-text: #111;
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: #ddd;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 4px;
  --pagefind-ui-font: "PT Serif", Georgia, serif;
  --pf-searchbox-dropdown-max-height: min(520px, 70vh);
}

@media screen and (max-width: 839px) {
  #search-form-wrap {
    box-sizing: border-box;
    margin: 0 auto;
    width: min(100%, 360px);
  }
}
