.autocomplete {
  position: relative;

  & ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
  }

  & li + li {
    border-bottom: var(--lightest-gray);
  }

  & .results {
    background-color: white;
    position: absolute;
    width: 100%;
    filter: drop-shadow(rgb(0 0 0 / 0.1) 0 1px 1px);
    z-index: calc(infinity);

    & .selected {
      background-color: var(--medium-blue);
    }

    & .suggestion {
      color: black;
      display: block;
      text-decoration: none;
      cursor: pointer;
      width: 100%;
      padding: 1rem;
    }

    & .suggestion:hover {
      background: var(--light-gray);
    }
  }
}

.dark-mode {
  & .results {
    background: var(--gray-700);
    color: white;

    & .suggestion {
      color: white;
    }

    & a {
      color: white;

      &.selected,
      &:hover {
        color: black;
      }
    }
  }
}
