/* ================================
   HIDE EVERYTHING NON-ESSENTIAL
   ================================ */

html,
body,
#viewerContainer,
#mainContainer,
#outerContainer,
#viewer {
  height: 100% !important;
  padding-bottom: 5rem !important;
}

/* Hide: open file, download, print, bookmark */
#openFile,
#print,
#download,
#viewBookmark {
  display: none !important;
}

/* Hide: presentation mode, rotate, editor tools, attachments */
#pageRotateCcw,
#pageRotateCw,
#editorModeButtons,
#viewAttachments {
  display: none !important;
}

#spreadOdd,
#printButton,
#editorModeSeparator {
  display: none !important;
}

/* Hide: sidebar “attachments” tab */
#attachmentsView,
#attachmentsToggle {
  display: none !important;
}

/* Hide: document properties */
#documentProperties {
  display: none !important;
}

#downloadButton {
  display: none !important;
}

/* Hide: attachments-related stuff in secondary toolbar */
#secondaryOpenFile,
#secondaryViewBookmark,
#secondaryPrint,
#secondaryDownload,
#secondaryViewAttachments {
  display: none !important;
}

/* Hide scrollModeButton */
#scrollModeButtons {
  display: none !important;
}

/* ================================
   KEEP ONLY ESSENTIALS
   ================================ */

/* options in the find bar */
#findbarOptionsOneContainer .toggleButton.toolbarLabel:nth-child(2) {
  display: none !important;
}

#findbarOptionsTwoContainer,
#toolbarSidebar {
  display: none;
}

#findbar {
  min-width: auto !important;
}

/* Sidebar toggle stays */
#sidebarToggle {
  display: inline-flex !important;
}

/* Remove separators that sobram */
.toolbarButtonSpacer,
.toolbarButtonSeparator {
  display: none !important;
}

#secondaryToolbarButtonContainer .horizontalToolbarSeparator,
#firstPage,
#lastPage {
  display: none !important;
}

/* Remove numeros de páginas de revistas para navegação */
#toolbarViewerLeft .toolbarHorizontalGroup #pageNumber,
#toolbarViewerLeft .toolbarHorizontalGroup #numPages {
  display: none !important;
}

#sidebarContent {
  margin-top: -32px !important;
}

.pdfjs-back-button {
  height: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--main-color);
  outline: none;
  border-radius: 2px;
  box-sizing: border-box;
  font: message-box;
  flex: none;
  position: relative;
  padding: 0;
}

.pdfjs-back-button:hover {
  background-color: var(--button-hover-color);
}

.pdfjs-back-button svg {
  color: var(--toolbar-icon-bg-color);
  opacity: var(--toolbar-icon-opacity);
}

/* Mobile styles */
@media (max-width: 768px) {
  .pdfjs-back-button {
    padding: 1rem !important;
  }
  .pdfjs-back-button svg {
    transform: scale(1.4) !important;
  }
  button {
    padding: 1rem !important;
  }
  button::before {
    transform: scale(1.4) !important;
  }
  #toolbarContainer {
    height: 50px !important;
  }
  #viewerContainer,
  #loadingBar,
  #sidebarContainer {
    top: 50px !important;
  }
}
