html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #111;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow: hidden;
}

.document-viewer {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.document-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 8px 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .86);
}

.document-back {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.document-back:hover,
.document-back:focus {
  background: #fff;
  color: #111;
}

.document-counter {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.document-filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.document-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  background: #1a1a1a;
}

.document-stage {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 72px 72px 28px;
}

.document-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: none;
  object-fit: contain;
  margin: auto;
  background: #fff;
  box-shadow: 0 0 18px rgba(0, 0, 0, .55);
}

.document-pdf-wrap {
  width: min(1100px, calc(100vw - 150px));
  height: calc(100vh - 105px);
}

.document-pdf {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.document-pdf-fallback {
  margin: 8px 0 0;
  text-align: center;
}

.document-pdf-fallback a {
  color: #fff;
}

.document-arrow {
  position: fixed;
  top: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 72px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: rgba(0, 0, 0, .64);
  color: #fff;
  text-decoration: none;
  font-size: 56px;
  line-height: 1;
  user-select: none;
}

.document-arrow:hover,
.document-arrow:focus {
  background: rgba(255, 255, 255, .92);
  color: #111;
}

.document-arrow--previous {
  left: 10px;
}

.document-arrow--next {
  right: 10px;
}

@media (max-width: 640px) {
  .document-toolbar {
    gap: 8px;
    padding: 6px 10px;
  }

  .document-filename {
    display: none;
  }

  .document-stage {
    padding: 64px 48px 20px;
  }

  .document-pdf-wrap {
    width: calc(100vw - 96px);
    height: calc(100vh - 90px);
  }

  .document-arrow {
    width: 38px;
    height: 58px;
    font-size: 44px;
  }

  .document-arrow--previous {
    left: 4px;
  }

  .document-arrow--next {
    right: 4px;
  }
}
