button {
  cursor: pointer;
}

.search-dropdown-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
}

.search-dropdown-label {
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

.search-dropdown-body {
  display: none;
  position: absolute;
  left: 0;
  margin: 1.5rem 0 0;
  min-width: 160px;
  max-height: 50vh;
  overflow: hidden auto;
  background-color: var(--search-bg);
  border: 1px solid var(--search-border-color);
  border-radius: 0.25rem;
  z-index: 1;
  scrollbar-width: thin;
}

.search-dropdown-input {
  position: sticky;
  top: 0;
  outline: none;
  border: none;
  border-bottom: 2px solid var(--search-border-color);
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.25rem;
  width: 100%;
}

.search-dropdown-reset {
  width: 100%;
  border: none;
  padding: 0.25rem 0;
}

.search-dropdown-menu {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.search-dropdown-item {
  color: var(--search-color);
  margin: 0.25rem 0;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.search-dropdown-item.active,
.search-dropdown-item:hover {
  background: color-mix(in srgb, var(--search-primary) 14%, var(--search-bg));
  color: var(--search-color);
}

.search-dropdown-item.hide {
  display: none;
}

.search-dropdown {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.search-dropdown.show .search-dropdown-body {
  display: block;
}

.search-dropdown.active .search-dropdown-toggle {
  color: var(--search-color);
  background: color-mix(in srgb, var(--search-primary) 10%, var(--search-bg));
}

.search-modal-container {
  background: var(--search-container-bg);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 1100;
}

.search-modal-container.active {
  display: flex;
}

.search-modal {
  height: 100%;
  width: 100%;
  flex-direction: column;
  position: fixed;
  display: flex;
  background: var(--search-bg);
  color: var(--search-color);
  overflow: hidden;
  min-height: 360px;
}

@media (width >= 576px) {
  .search-modal {
    border-radius: 0.25rem;
    max-width: 90vw;
    max-height: 600px;
    height: 80%;
    left: calc((100% - 90vw) / 2);
    top: 10%;
  }
}
@media (width >= 1200px) {
  .search-modal {
    max-width: 80vw;
    left: calc((100% - 80vw) / 2);
  }
}
.search-modal-header {
  background: inherit;
  padding: 0.75rem 0.5rem 0;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--search-border-color);
  margin-bottom: 0.5rem;
  z-index: 1;
}

.search-modal-active {
  overflow: hidden !important;
}

.search-modal-close {
  margin-left: 0.25rem;
  min-height: 2.5rem;
  min-width: max-content;
  padding: 0 0.8rem;
  background: var(--control-bg);
  color: var(--search-color);
  border: 1px solid var(--search-border-color);
  border-radius: 0.25rem;
  cursor: pointer;
}

@media (width >= 576px) {
  .search-modal-close {
    display: none;
  }
}
.search-modal-body {
  padding: 0 0.5rem;
  overflow-y: auto;
  height: 100%;
  flex: 1;
}

.search-modal-footer {
  background: inherit;
  position: sticky;
  bottom: 0;
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--search-border-color);
}

@media (width <= 576px) {
  .search-modal-footer {
    display: none;
  }
}
.search-form {
  display: flex;
  flex-flow: column wrap;
  margin-bottom: 0.5rem;
}

.search-input-group-wrapper {
  display: flex;
}

.search-input-group {
  display: flex;
  flex: 1;
  position: relative;
}

.search-input-icon,
.search-spinner,
.search-reset-button {
  background: inherit;
  border: none;
  color: var(--search-primary);
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0.5rem;
  z-index: 1;
}

.search-input-icon.disabled,
.search-spinner.disabled,
.search-reset-button.disabled {
  display: none;
}

.search-input-icon,
.search-spinner {
  left: 0;
}

.search-spinner svg {
  background: var(--search-bg);
  animation-name: search-spin;
  animation-duration: 2000ms;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes search-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.search-reset-button {
  border: 0;
  background: transparent;
  right: 0;
}

.search-input {
  border-radius: 0.25rem;
  border: 1px solid var(--search-primary);
  padding: 0.75rem 1.5rem 0.75rem 2.25rem;
  flex: 1;
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-form-control {
  height: 100%;
  margin-right: 0.25rem;
  outline: none;
  background: var(--search-bg);
  color: var(--search-color);
}

.search-form-control:disabled {
  cursor: progress;
}

.search-form-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.search-panel {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.search-panel-action {
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--search-color);
  display: flex;
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.search-panel-action.active {
  color: var(--search-color);
  background: color-mix(in srgb, var(--search-primary) 10%, var(--search-bg));
}

.search-panel-action-icon {
  display: flex;
}

.search-panel-action-icon svg {
  width: 16px;
  height: 16px;
}

.search-panel-action-label {
  margin-left: 0.25rem;
}

.search-filter-lang {
  border: none;
  appearance: none;
}

.search-expand-toggle {
  padding: 0 0.125rem;
}

.search-modal-close {
  align-items: center;
  justify-content: center;
  gap: 0;
}

.search-modal-close__label--short {
  display: none;
}

@media (width <= 767px) {
  .search-input-group-wrapper {
    align-items: flex-start;
    gap: 0.5rem;
  }
  .search-form-meta {
    align-items: flex-start;
  }
  .search-panel {
    width: 100%;
    flex-wrap: nowrap;
    overflow: auto hidden;
    padding-bottom: 0.2rem;
    margin-bottom: 0.35rem;
    scrollbar-width: none;
  }
  .search-panel::-webkit-scrollbar {
    display: none;
  }
  .search-panel-action {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .search-dropdown {
    position: static;
  }
  .search-dropdown.show .search-dropdown-body {
    position: fixed;
    left: 0.8rem;
    right: 0.8rem;
    top: 4.5rem;
    margin-top: 0;
    max-height: min(48dvh, 24rem);
    border-radius: 0.9rem;
    z-index: 6;
  }
  .search-modal-close {
    min-width: 2.75rem;
    padding-inline: 0.75rem;
  }
  .search-modal-close__label--long {
    display: none;
  }
  .search-modal-close__label--short {
    display: inline;
  }
}
@media (width >= 768px) {
  .search-modal-close__label--long {
    display: inline;
  }
}
.search-result-icon {
  margin: 0.25rem 0.5rem 0 0;
}

.search-result-icon svg {
  vertical-align: middle;
}

.search-result-img {
  width: 86px;
  height: 48px;
  object-fit: cover;
}

@media (width <= 576px) {
  .search-result-img {
    width: 100%;
    height: 120px;
    order: 1;
    margin-top: 0.25rem;
  }
}
.search-result-content {
  display: flex;
  flex: 1;
  margin: 0 0 0.125rem;
  flex-flow: column nowrap;
  overflow: hidden;
}

.search-result-desc {
  margin-top: 0.25rem;
}

.search-result-desc,
.search-result-meta {
  font-size: 0.95rem;
  color: var(--search-result-color-secondary);
}

.search-result-title,
.search-result-desc {
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-title mark,
.search-result-desc mark {
  background: var(--search-result-highlight-bg);
  color: var(--search-result-highlight-color);
  text-decoration: underline;
}

.search-result-meta,
.search-result-content-content {
  text-overflow: ellipsis;
  overflow: hidden;
}

.search-result-meta {
  margin-top: 0.5rem;
  padding: 0 0.25rem;
  white-space: nowrap;
  width: 100%;
  transition: opacity 0.35s linear;
  opacity: 1;
}

.search-result-meta:not(.show) {
  opacity: 0;
  height: 0;
  margin-top: 0;
}

.search-result-meta span {
  margin-right: 0.25rem;
}

.search-result-lang {
  text-transform: uppercase;
}

.search-result-taxonomy::before {
  content: "#";
}

.search-result-headings {
  margin-left: 1rem;
}

.search-result-heading-icon {
  margin-right: 0.25rem;
}

.search-result-heading-icon::before {
  content: "⊢";
  color: var(--search-result-color-secondary);
}

.search-result-actions {
  position: absolute;
  right: 0.5rem;
  top: 0.25rem;
}

.search-result-action {
  padding: 0.25rem;
}

.search-result-content-content {
  margin-top: 0.5rem;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.search-result-action-meta {
  opacity: 0.75;
}

.search-result-action-meta:hover {
  opacity: 1;
}

.search-results {
  margin-bottom: 0.5rem;
}

.search-results.expanded .search-result-meta {
  opacity: 1;
  height: auto;
  margin-top: 0.25rem;
}

.search-results.expanded .search-result-action-meta {
  display: none;
}

.search-result {
  text-decoration: none;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  position: relative;
  border-radius: 0.25rem;
  background: var(--search-result-bg);
  color: var(--search-result-color);
  transition: 0.2s ease-out;
  outline: none;
}

.search-result:first-child {
  margin-top: 0;
}

.search-result[aria-selected=true] {
  background: var(--search-result-bg-active);
  color: var(--search-result-color-active);
}

.search-result[aria-selected=true] .search-result-meta,
.search-result[aria-selected=true] .search-result-desc {
  color: var(--search-result-color-secondary-active);
}

.search-result[aria-selected=true] .search-result-heading-icon::before {
  color: var(--search-result-color-secondary-active);
}

.search-result-heading {
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.search-container {
  background: var(--search-bg);
  color: var(--search-color);
  padding: 0.5rem;
}

.search-container .search-modal-close {
  display: none;
}

.search-header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--search-border-color);
  margin-bottom: 0.5rem;
}

.search-body {
  width: 100%;
  max-height: 600px;
  min-height: 240px;
  overflow-y: auto;
}

.search-footer {
  border-top: 1px solid var(--search-border-color);
  padding-top: 0.5rem;
}

.search-shortcut {
  display: inline-flex;
  margin: 0.25rem 0.5rem 0.25rem 0;
  font-size: 0.875rem;
  align-items: center;
}

.search-shortcut-kbds:not(:first-child)::before {
  content: "+";
  margin-right: 0.125rem;
}

.search-shortcut-kbd {
  background: #3e3e3e;
  border-radius: 0.125rem;
  padding: 0.125rem 0.25rem;
  color: white;
  margin-right: 0.25rem;
}

.search-stat {
  font-size: 0.875rem;
  color: var(--search-color-secondary);
}

.search-stat-results {
  color: var(--search-primary);
}