html, body {
  padding: 0;
  margin:  0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: white;
}

.img-container {
  background-image: linear-gradient(45deg, #ececec 25%, transparent 25%), linear-gradient(-45deg, #ececec 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ececec 75%), linear-gradient(-45deg, transparent 75%, #ececec 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0px;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  height: 100%;
  overflow: auto;
}

.img-container > img,
.img-container > iframe {
  /* Oddly, this is necessary for vertical centering + auto */
  margin: 0 auto;
  position: relative;
  left: 0px;
  top:  0px;
  image-rendering: pixelated;
  flex: 0 0 auto;
}

.toolbar {
  height: 2rem;
  background: #efefef;
  border-bottom: 1px solid #bdbdbd;
  box-shadow: inset 0px 0px 4px 1px #ddd;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  overflow: hidden;
  cursor: default;
}

.toolbar .separator {
  margin-left: 0.6rem;
  width: 0px;
  display: inline-block;
}

.toolbar img {
  height: 0.8rem;
  margin-top: 0.6rem;
  display: inline-block;
  vertical-align: top;

  margin-left: 0.3rem;
}

.toolbar *:first-child {
  margin-left: 0.3rem;
}

.toolbar *:last-child {
  margin-right: 0.3rem;
}

.toolbar button {
  display: inline-block;
  height: 1.4rem;
  width:  1.4rem;
  margin-top: 0.3rem;

  border: none;
  outline: none;
  background-color: #ddd;
}

.toolbar span {
  display: inline-block;
  vertical-align: top;
  height: 2rem;
  line-height: 2rem;
  color: #484545;
}

.toolbar .toolbar-item {
  background-size: 75%;
  background-repeat: no-repeat;
  background-position: center;
}

.toolbar .toolbar-item.pan-center {
  background-image: url('icons/center.svg');
}

.toolbar .toolbar-item.zoom-out {
  background-image: url('icons/out.svg');
}

.toolbar .toolbar-item.zoom-in {
  background-image: url('icons/in.svg');
}

.toolbar .toolbar-item.zoom-reset {
  background-image: url('icons/reset.svg');
}

.toolbar .toolbar-item.zoom-fit {
  background-image: url('icons/fit.svg');
}
