/*
  Publication wrapper CSS
  Purpose: make a fixed-width exported publication fit the browser width.

  This file replaces:
  publication-web-resources/css/main.css
*/

:root {
  --publication-source-width: 640;
  --publication-source-height: 2440;
  --publication-scale: 1;
  --publication-rendered-height: 2440px;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #ffffff;
}

body {
  overflow-x: hidden;
}

#publicationShell {
  position: relative;
  width: 100vw;
  min-height: var(--publication-rendered-height);
  overflow: hidden;
  background: #ffffff;
}

.contentIframeClass {
  position: absolute;
  top: 0;
  left: 0;

  /*
    The iframe keeps the exported publication's native canvas size.
    JavaScript scales the iframe visually to fill the browser width.
  */
  width: calc(var(--publication-source-width) * 1px);
  height: calc(var(--publication-source-height) * 1px);

  border: 0;
  display: block;
  background: transparent;

  transform-origin: top left;
  transform: scale(var(--publication-scale));
}

.dummyFrameClass {
  display: none;
  width: 0;
  height: 0;
  border: 0;
}

/* Existing arrow controls, cleaned up. Hide unless main.js enables them. */
.navArrow,
.prev,
.next {
  display: none;
}

.navArrow.is-visible,
.prev.is-visible,
.next.is-visible {
  display: flex;
}

.navArrow {
  position: fixed;
  z-index: 20;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 64px;
  align-items: center;
  justify-content: center;

  border: 0;
  cursor: pointer;

  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
}

.navArrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.prev {
  left: 0;
}

.next {
  right: 0;
}

@media (max-width: 767px) {
  .navArrow {
    width: 36px;
    height: 54px;
    font-size: 26px;
  }
}
