.directive-jmp {
  position: relative;
  border: 1px solid var(--color-nav-border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 300px;
}

.directive-jmp java-memory-playground {
  display: block;
  width: 100%;
  height: 100%;
}

/* Bottom right is the one corner the playground leaves alone: the sidebar sits
   top left, undo/save top right, the zoom controls bottom left and the step bar
   bottom centre. */
.directive-jmp .buttons {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  z-index: 5;
}

/* The playground's canvas is always light, whatever theme the book is read in,
   so this button is coloured like the playground's own panels rather than like
   the page around it — in a dark book the book's colours would be invisible
   here. The values are the playground's `--jmp-*` tokens, which are scoped to
   the element and so cannot be referred to from outside it. */
.directive-jmp .buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background-color: #f5f5f5;
  color: #3c3c3c;
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
  cursor: pointer;
}

.directive-jmp .buttons button:hover {
  background-color: #d6d6d6;
}

.directive-jmp .buttons button .icon {
  width: 18px;
  height: 18px;
  display: block;
}
