dialog {
  background-color: transparent;
  border: none;
  padding-block-end: 3rem;

  &::backdrop {
    backdrop-filter: blur(5px);
  }
}

.docs-search-container {
  width: 750px;
  max-width: 90vw;
  background-color: var(--page-background);
  border: 1px solid var(--senary-contrast);
  border-radius: 0.25rem;
  box-sizing: border-box;

  .docs-search-input {
    border-radius: 0.25rem 0.25rem 0 0;
    border: none;
    border-block-end: 1px solid var(--senary-contrast);
    height: 2.6875rem; // 43px;
    padding-inline-start: 1rem;
    position: relative;

    &::after {
      content: 'Esc';
      position: absolute;
      right: 1rem;
      color: var(--gray-400);
      font-size: 0.875rem;
    }
  }

  ul {
    max-height: 50vh;
    overflow-y: auto;
    list-style-type: none;
    padding-inline: 0;
    padding-block-start: 1rem;
    margin: 0;
    border-block-end: 1px solid var(--senary-contrast);

    li {
      border-inline-start: 2px solid var(--senary-contrast);
      margin-inline-start: 1rem;
      padding-inline-end: 1rem;
      padding-block: 0.25rem;

      mark {
        background: #e62600;
        background: var(--red-to-orange-horizontal-gradient);
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
      }

      a {
        color: var(--secondary-contrast);
        display: flex;
        justify-content: space-between;
        gap: 0.5rem;

        .docs-search-result-icon {
          i {
            display: flex;
            align-items: center;
            font-size: 1.2rem;
          }
        }
      }

      &.active {
        background-color: var(--septenary-contrast); // stylelint-disable-line
      }

      &:hover,
      &.active {
        background-color: var(--octonary-contrast); // stylelint-disable-line
        border-inline-start: 2px solid var(--primary-contrast);
        a {
          span:not(.docs-result-page-title),
          .docs-search-results__type {
            color: var(--primary-contrast);
            i {
              color: var(--primary-contrast);
            }
          }
        }
      }
    }

    .docs-search-result-icon,
    .docs-search-results__type,
    .docs-result-page-title {
      color: var(--quaternary-contrast);
      display: inline-block;
      font-size: 0.875rem;
      transition: color 0.3s ease;
      padding: 0.75rem;
      padding-inline-end: 0;
    }

    .docs-search-results__lvl2 {
      display: inline-block;
      margin-inline-start: 2rem;
      padding-block-start: 0;
    }

    .docs-search-results__lvl3 {
      margin-inline-start: 2rem;
      padding-block-start: 0;
    }
  }

  .docs-result-page-title {
    font-size: 0.875rem;
    font-weight: 400;
  }
}

.docs-search-results__start-typing,
.docs-search-results__no-results {
  padding: 0.75rem;
  color: var(--gray-400);
}

.docs-result-icon-and-type {
  display: flex;

  .docs-search-results__type {
    padding-inline-start: 0;
  }
}

.docs-algolia {
  display: flex;
  align-items: center;
  justify-content: end;
  color: var(--gray-400);
  padding: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.25rem;
  background-color: var(--page-background);
  border-radius: 0 0 0.25rem 0.25rem;

  docs-algolia-icon {
    display: inline-flex;
    margin-block-start: 0.12rem;
    margin-inline-start: 0.15rem;
    width: 4rem;
  }
}
