body.site-search-visible {
  overflow: hidden;
}

.sidebar .search-box {
  margin: 1.25rem 26px;
}

.sidebar .search-box kbd {
  margin-top: 2px;
}

/* Site search */
.site-search {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.site-search[hidden] {
  display: none;
}

.site-search__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--sl-overlay-background-color);
  z-index: -1;
}

.site-search__panel {
  display: flex;
  flex-direction: column;
  max-width: 460px;
  max-height: calc(100vh - 20rem);
  background-color: var(--sl-color-neutral-50);
  border-radius: var(--sl-border-radius-large);
  box-shadow: var(--sl-shadow-x-large);
  margin: 10rem auto;
}

@media screen and (max-width: 900px) {
  .site-search__panel {
    max-width: 100%;
    max-height: calc(92vh - 120px); /* allow iOS browser chrome */
    margin: 4vh var(--sl-spacing-medium);
  }
}

.site-search__input::part(base) {
  border: none;
  background: transparent;
  border-radius: var(--sl-border-radius-large);
}

.site-search__input:focus-within::part(base) {
  outline: none;
  box-shadow: none;
}

.site-search__input {
  --sl-input-height-large: 4rem;
}

.site-search__body {
  flex: 1 1 auto;
  overflow: auto;
}

.site-search--has-results .site-search__body {
  border-top: solid 1px var(--sl-color-neutral-200);
}

.site-search__results {
  display: none;
  line-height: var(--sl-line-height-dense);
  list-style: none;
  padding: var(--sl-spacing-x-small) 0;
  margin: 0;
}

.site-search--has-results .site-search__results {
  display: block;
}

.site-search__results a {
  display: block;
  text-decoration: none;
  padding: var(--sl-spacing-x-small) var(--sl-spacing-large);
}

.site-search__results li a:hover,
.site-search__results li a:hover small {
  background-color: var(--sl-color-neutral-100);
}

.site-search__results li[aria-selected='true'] a,
.site-search__results li[aria-selected='true'] a small,
.site-search__results li[aria-selected='true'] a sl-icon {
  outline: none;
  color: var(--sl-color-neutral-0);
  background-color: var(--sl-color-primary-600);
}

.site-search__results h3 {
  font-weight: var(--sl-font-weight-semibold);
  margin: 0;
}

.site-search__results small {
  display: block;
  color: var(--sl-color-neutral-600);
}

.site-search__result {
  padding: 0;
  margin: 0;
}

.site-search__result a {
  display: flex;
  align-items: center;
  gap: var(--sl-spacing-medium);
}

.site-search__result-icon {
  flex: 0 0 auto;
  display: flex;
  color: var(--sl-color-neutral-400);
  font-size: var(--sl-font-size-x-large);
}

.site-search__result-description {
  flex: 1 1 auto;
}

.site-search__empty {
  display: none;
  border-top: solid 1px var(--sl-color-neutral-200);
  text-align: center;
  padding: var(--sl-spacing-x-large);
}

.site-search--no-results .site-search__empty {
  display: block;
}

.site-search__footer {
  display: flex;
  justify-content: center;
  gap: var(--sl-spacing-large);
  border-top: solid 1px var(--sl-color-neutral-200);
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  padding: var(--sl-spacing-medium);
}

.site-search__footer small {
  color: var(--sl-color-neutral-700);
}

@media screen and (max-width: 900px) {
  .site-search__footer {
    display: none;
  }
}
