input[type="search"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}
input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

body.DocSearch--active::before {
  z-index: 99;
  content: "";
  position: fixed;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-color: rgba(0, 0, 0, 0.5);
}

body.DocSearch--active > *:not(.DocSearch-Container) {
  filter: blur(5px);
}

.DocSearch-NoResults {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-style: italic;
}

.DocSearch-NoResults-Prefill-List {
  display: block;
  width: 100%;
  margin-top: 1em;
}

.DocSearch-NoResults-Prefill-List li {
  display: block;
  margin-left: 1em;
  margin-bottom: 0.5em;
}
.DocSearch-NoResults-Prefill-List li::before {
  content: "•";
  margin-left: -1em;
  margin-right: 0.5em;
}
.DocSearch-NoResults-Prefill-List li button {
  text-decoration: underline;
  text-decoration-color: #888;
}
.DocSearch-NoResults-Prefill-List li button:hover {
  text-decoration-color: #555;
}
.DocSearch-NoResults svg {
  width: 1em;
  height: auto;
  margin-right: 0.5em;
}

button.DocSearch-Button {
  @apply flex bg-white mb-2 p-3 border border-slate-100 shadow-sm rounded-md items-center w-full;
  @apply dark:bg-purple-900 dark:border-purple-800;
}
.DocSearch-Button-Container {
  @apply flex flex-grow gap-2 text-slate-400 items-center;
  @apply dark:text-purple-500;
}
.DocSearch-Button-Keys {
  @apply text-sm px-2 text-slate-400 border rounded space-x-1;
  @apply dark:text-purple-400 dark:border-purple-500;
}
.DocSearch-Search-Icon {
  @apply text-slate-800;
  @apply dark:text-purple-400;
}
.DocSearch-Container[role="button"] {
  cursor: default;
}
.DocSearch-Container {
  position: fixed;
  cursor: default;
  width: calc(100% - 4em);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  z-index: 100;
  border-radius: 0.6em;
  max-width: 700px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);

  @apply dark:bg-purple-950 dark:border dark:border-purple-900;
}
.DocSearch-SearchBar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;

  @apply dark:border-purple-900;
}
.DocSearch-Cancel {
  display: block;
  overflow: hidden;
  text-indent: -999px;
  width: 3em;
  height: 2em;
  margin-right: 1em;
  position: relative;
  font-size: 0.75rem;
}
.DocSearch-Cancel::before {
  content: "esc";
  flex-grow: 1;
  align-items: center;
  jusityfy-content: center;
  position: absolute;
  left: 0;
  top: 0;
  text-align: center;
  text-indent: 0;
  width: 3em;
  height: 2em;
  color: #555;
  border: 1px solid #e0e0e0;
  border-radius: 0.5em;
  line-height: 1.8em;

  @apply dark:border-purple-800 dark:text-purple-400;
}
.DocSearch-SearchBar form {
  flex-grow: 1;
  display: flex;
  gap: 0.25em;
  align-items: center;
  padding: 0.75em 1em;
  border-radius: 0.5em;
}

.DocSearch-SearchBar form input {
  appearance: none;
  padding: 0.25em;
  flex-grow: 1;
  background: transparent;

  @apply dark:text-purple-100 dark:placeholder:text-purple-700;
}

.DocSearch-Dropdown {
  padding: 0.5em 1em;
  overflow: auto;
  max-height: clamp(200px, 50vh, 800px);
  @apply dark:text-purple-200;
}

.DocSearch-Dropdown:empty::before {
  content: "Start typing to search — for example 'format', or 'parse'.";
  padding: 1em 0;
  display: block;
  font-style: italic;
}

.DocSearch-Hit {
  @apply dark:bg-white/5;
}
.DocSearch-Hit-Container {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.DocSearch-Hit-content-wrapper {
  flex-grow: 1;
  margin-left: 0.5em;
}
.DocSearch-Hit-Container svg {
  width: 1em;
  height: auto;
  fill: #888;
}
.DocSearch-Hit-source {
  font-weight: bold;
  margin-bottom: 1em;
  padding-left: 0.5em;
}
.DocSearch-Hit-title {
  display: block;
  font-size: 15px;
  font-weight: bold;
}
.DocSearch-Hit {
  margin-bottom: 0.5em;
  padding: 0.5em;
  border-radius: 0.5em;
}
.DocSearch-Hit[aria-selected="true"] {
  @apply bg-slate-100 dark:bg-purple-900;
}

.DocSearch-Hit-action-button {
  @apply block p-1 hover:bg-slate-200;
}

.DocSearch-Hit-path {
  display: block;
  font-size: 14px;
  color: #888;
}

.DocSearch-SearchBar form input:focus {
  outline: none;
}
.DocSearch-Footer {
  display: none;
}
