/* FERRER — visual presentation, applied before JavaScript executes. */

/* Let the publication occupy the entire viewport behind the floating toolbar. */
#viewerContainer { top: 0 !important; }

/* The toolbar is 60px tall from the first paint. */
#toolbarContainer {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 60px !important;
  z-index: 100 !important;
  transition: opacity 0.35s ease;
  border-bottom: none !important;
  box-shadow: none !important;
}
#toolbarViewer {
  height: 58px !important;
  display: flex !important;
  align-items: center !important;
}

/* Retain the real views-manager toggle and its nested menu controls. */
#viewFindButton,
#findbar,
#scaleSelectContainer,
#scaleSelect,
#secondaryToolbarToggle,
#secondaryToolbar,
#editorModeButtons,
#editorModeSeparator,
#editorUndoBar,
#printButton,
#pageNumber,
#numPages,
#loadingBar,
#toolbarViewer .verticalToolbarSeparator,
#toolbarViewer .toolbarButtonSpacer,
#toolbarViewer .splitToolbarButtonSeparator {
  display: none !important;
}

.toolbarButton {
aspect-ratio: 0.7 !important;
}

.verticalToolbarSeparator {
display: none !important;
}

/* Hide the now-unused original page-number wrapper. */
#ferrerOriginalPageInput {
  display: none !important;
}

/* The middle area remains in the DOM for PDF.js but has no controls. */
#toolbarViewerMiddle { display: none !important; }

/* Editorial counter. */
#ferrerPageCounter {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.07em;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  line-height: 32px;
  padding: 0 6px 0 16px;
  user-select: none;
  opacity: 0.9;
}

/* Fixed, centered clickable wordmark. */
#ferrerLogoLink {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 75px;
  display: block;
  cursor: pointer;
  z-index: 101;
}

#ferrerWordmark {
  display: block;
  width: 100%;
  height: auto;
  max-height: 26px;
  object-fit: contain;
}

/* JS toggles this class for the established auto-hide behavior. */
#toolbarContainer.ferrer-toolbar-hidden {
  opacity: 0;
  pointer-events: none;
}

#viewsManagerToggleButton {
  display: none !important;
}

#toolbarViewerRight > .hiddenMediumView {
  display: flex !important;
}

#downloadButton {
  display: none !important;
}

/* FERRER — background colors */

#toolbarContainer {
  background-color: #48494c !important;
}

#viewerContainer,
#viewer {
  background-color: #1b1b1d !important;
}

.toolbarButtonWithContainer {
display: none;
}

#viewer {

    padding: 72px 0 36px;
    }

/* FERRER — minimal mobile toolbar */

@media (max-width: 700px) {

  /* Hide page counter */
  #ferrerPageCounter {
    display: none !important;
  }

  /* Hide navigation and zoom controls */
  #previous,
  #next,
  #zoomOutButton,
  #zoomInButton {
    display: none !important;
  }

/* Position logo on the left */
#ferrerLogoLink {
  left: 0px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

  /* Position download button on the right */
  #toolbarViewerRight {
    position: absolute !important;
    right: 24px !important;
    top: 0 !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
  }

  #toolbarViewerRight > .hiddenMediumView {
    display: flex !important;
    align-items: center !important;
  }

  #downloadButton {
    display: none !important;
    flex-shrink: 0 !important;
  }
  
  .verticalToolbarSeparator {
display: none !important;
visibility: hidden;
border-left: 0 !important;

}
 
  #viewerContainer {
    overflow-anchor: none !important;
  }
}