/**
 * @file
 * Sizes the catalog viewer. PDFlipbook fills the height it is given.
 */

.js .spiewak-catalog__book {
  height: 80vh;
  /* Fit the screen below the site header, but no taller than a letter-size
     page and the controls need on a narrow screen. */
  height: min(100svh - 220px, 130vw + 100px);
  min-height: 420px;
  min-height: min(420px, 100svh);
  max-height: 1100px;
  --fb-bg: #ececec;
}

/* Some WebKit builds draw the back of a page even with
   backface-visibility: hidden, so the next page shows through mirrored.
   Hide the face that points away from the reader on pages that are not
   turning. */
.spiewak-catalog__book .fb-sheet[style*="rotateY(0deg)"] > .fb-face-back,
.spiewak-catalog__book .fb-sheet[style*="rotateY(-180deg)"] > .fb-face-front {
  visibility: hidden;
}

/* PDFlipbook removes the outline, but the book takes keyboard focus. */
.spiewak-catalog__book:focus-visible {
  outline: 2px solid;
  outline-offset: 2px;
}
