#BookView {
  user-select: none;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--BookView-transition-time, 0.3s);
  will-change: transform;
}

.overlay-image {
  position: absolute;
  top: 0;
  bottom: 0;
  transition: var(--content-transition, transform 0.5s);
  transform: var(--content-transform, none);
  width: var(--content-width, auto);
  pointer-events: none;
  will-change: transform;
}

.overlay-image.ltr {
  left: 0;
}

.overlay-image.rtl {
  right: 0;
}

.overlay-image .image {
  transition: opacity ease-out;
  transition-duration: var(--image-transition-duration, 0s);
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  opacity: 0;
}

.overlay-image.ltr .image {
  left: var(--image-offset, 0);
}

.overlay-image.rtl .image {
  right: var(--image-offset, 0);
}

.overlay-image .image img {
  width: 100%;
  height: 100%;
}

#ImageMagnifier {
  display: none;
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#ImageMagnifier > iframe {
  pointer-events: none;
  border: none;
  width: 100%;
  height: 100%;
}

.ReadingOrderView {
  transition: var(--content-transition, transform 0.5s);
  transform: var(--content-transform, none);
  opacity: var(--content-opacity, 1);
  height: 100%;
  transform-origin: 0 0;
  will-change: transform, opacity;
}

.ReadingItem {
  position: absolute;
  overflow: hidden;
}

.VerticalWritingMask {
  position: absolute;
  height: 100%;
  top: 0px;
  background-color: white;
}

.ReadingItem > .svgContainer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ReadingItem > .svgContainer > svg {
  max-width: 100%;
  max-height: 100%;
}

.ReadingItem > iframe {
  border: 0;
}

/*
 * The following media query ensures that the content iframe does not
 * interfere with event handling. For example, if the user "transitions"
 * from the content container into the content iframe while doing some
 * interaction like a pan, the iframe would start capturing the events.
 * We don't want that, all events should be handled in the container.
 * Only applies to non-touch devices.
 * Tickets: KWA-14190
 */
@media (hover: hover) {
  .ReadingItem iframe:first-of-type {
    touch-action: none
  }
}

.ReadingItem > iframe,
.ReadingItem > canvas,
.ReadingItem > .svgContainer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.ReadingItem.left > iframe,
.ReadingItem.left > canvas,
.ReadingItem.left > .svgContainer {
  right: 0;
  left: auto;
  transform: translate(0%, -50%) scale(var(--scale, 1));
  transform-origin: right center;
  will-change: transform;
}

.ReadingItem.left.lonely > iframe,
.ReadingItem.left.lonely > canvas,
.ReadingItem.left.lonely > .svgContainer {
  right: 50%;
  left: auto;
}

.ReadingItem.right > iframe,
.ReadingItem.right > canvas,
.ReadingItem.right > .svgContainer {
  left: 0;
  transform: translate(0%, -50%) scale(var(--scale, 1));
  transform-origin: left center;
  will-change: transform;
}

.ReadingItem.right.lonely > iframe,
.ReadingItem.right.lonely > canvas,
.ReadingItem.right.lonely > .svgContainer {
  left: 50%;
  will-change: transform;
}

.ReadingItem > .loading {
  position: absolute;
  z-index: 2;
  transition: opacity 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ReadingItem > .loading > img {
  max-width: 80%;
}

.reading-item-debug-overlay {
  position: absolute;
  height: 100%;
  top: 0px;
  width: 100%;
  right: 0px;
}

.FXLSpreadWrapper {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 0;
}

#FXLImageContainer {
  /* We apply a 2px y-axis transformation to make sure the image is */
  /* centered; making up for any rounded calculations leading to half */
  /* pixels. */
  transform: scale(var(--fxl-image-container-scale, 1)) translateY(2px);
  will-change: transform;
}
