.disableevents {
  pointer-events: none;
}

.tiles {
  position: absolute;
}

.tile {
  box-sizing: border-box;
  margin: 10px;
  border: 3px solid black;
  border-radius: 5px;
  opacity: 0.01;
  cursor: pointer;
}

.popup {
  position: absolute;
  border: 2px solid black;
  border-radius: 5px;
  z-index: 2;
  overflow: hidden;
  cursor: move;
}

.popup.selected {
  z-index: 4;
}

.tools {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 40px;
  height: 40px;
  z-index: 1;
  display: none;
}

.tools.selected {
  z-index: 3;
  display: block;
}

svg {
  display: inline-block;
}

.closebutton {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
}
.closebutton > .bw-icon-small {
}
.selected .closebutton {
  display: block;
}

.draghandle {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 40px;
  height: 40px;
  cursor: move;
  -webkit-user-drag: none;
  user-drag: none;
}

circle {
  stroke: black;
  stroke-width: 1;
  fill: orange;
}

.ibw-platform-ipad-bookwidgets .tools.selected,
.ibw-platform-ipad-other .tools.selected,
.ibw-platform-android-chrome .tools.selected,
.ibw-platform-android .tools.selected {
  display: none;
}

.toolbar {
  width: 100%;
  position: absolute;
  bottom: 0px;
  overflow: hidden;
  text-align: center;
  padding: 0px;
  margin: 0px;
  border: none;
  display: none;
}

.selected .toolbar {
  display: block;
}

.toolbutton {
  display: inline-block;
  padding: -5px;
  margin: 5px;
  border-radius: 50%;
  /* workaround for iOS 12 bug */
  transform: translate3d(0px, 0px, 0px);
}

.toolbutton > .bw-icon-small {
  font-size: 32px;
  width: 32px;
  height: 32px;
}

.description {
  box-sizing: border-box;
  padding: 10px;
  position: absolute;
  bottom: 0px;
  text-align: center;
  color: white;
  transform-origin: left bottom;
  -ms-transform-origin: left bottom;
  -webkit-transform-origin: left bottom;
  opacity: 0.01;
  max-height: 100%;
  overflow: auto;
}

.description:not(.displayed) {
  pointer-events: none;
}

.videodiv {
  box-sizing: border-box;
  padding: 20px;
  padding-top: 40px;
  position: absolute;
  bottom: 0px;
  box-sizing: border-box;
  background: black;
  transform-origin: left bottom;
  -ms-transform-origin: left bottom;
  -webkit-transform-origin: left bottom;
  opacity: 0.01;
}
.videodiv:not(.displayed) {
  pointer-events: none;
}

.videodiv div {
  width: 100%;
  height: 100%;
}

.linkbutton {
  position: relative;
  top: -8px;
}

.linkbutton .bw-icon-small {
  font-size: 24px;
  position: relative;
  top: 3px;
}

.description.displayed,
videodiv.displayed {
  pointer-events: initial;
}

audio {
  position: absolute;
  width: 0px;
  height: 0px;
  overflow: hidden;
}

.videodiv .closebutton {
  position: absolute;
  display: inline-block;
  top: 5px;
  right: 5px;
  width: auto;
  height: auto;
}

@media only screen and (max-width: 400px), only screen and (max-height: 400px) {
  div.popup .description {
    font-size: 14px;
  }
}
