/**
 * Upcuan v3.3.0.55 — OJS 3.3 PDF/galley viewer compatibility.
 *
 * The bundled pdfJsViewer template expects the active theme to provide the
 * full-viewport .galley_view rules. Upcuan's Tailwind/Material layer did not
 * include OJS Default Theme's viewPdf.less, leaving the iframe at its inline
 * min-height of 500px. These rules restore that behaviour without modifying
 * OJS core or the pdfJsViewer plugin.
 */

/* Lightweight galley header (PDF and HTML viewers). */
.header_view {
  z-index: 2 !important;
  position: relative !important;
  height: 2.143rem !important;
  min-height: 2.143rem !important;
  overflow: hidden !important;
  background-color: var(--upc-header-color, #006798) !important;
  background-image: linear-gradient(
    to right,
    var(--upc-gradient-header-start, rgba(39,70,133,.96)) 0%,
    var(--upc-gradient-header-end, rgba(61,179,197,.96)) 100%
  ) !important;
}

.header_view a {
  line-height: 2.143rem !important;
  text-decoration: none !important;
}

.header_view .return {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 2.143rem !important;
  height: 2.143rem !important;
  background: rgba(255,255,255,.96) !important;
  color: var(--upc-header-color, #006798) !important;
  text-align: center !important;
  font-size: 0 !important;
}

.header_view .return::before {
  font-family: FontAwesome !important;
  content: "\f060" !important;
  font-size: 14px !important;
}

.header_view .title {
  display: block !important;
  height: 2.143rem !important;
  padding: 0 8rem 0 3rem !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: .93rem !important;
  font-weight: 400 !important;
  color: var(--upc-nav-text-color, #fff) !important;
}

.header_view .download {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  min-width: 2.143rem !important;
  height: 2.143rem !important;
  padding: 0 .8rem !important;
  background: rgba(255,255,255,.96) !important;
  color: var(--upc-header-color, #006798) !important;
  text-align: center !important;
  font-size: .93rem !important;
}

.header_view .download::before {
  font-family: FontAwesome !important;
  content: "\f019" !important;
  margin-right: .35rem !important;
}

/* Full-viewport viewer. This is the key fix for the half-height PDF. */
.galley_view,
#pdfCanvasContainer.galley_view {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: #e9eaed !important;
}

.galley_view > iframe,
#pdfCanvasContainer > iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  padding: 2.143rem 0 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.galley_view.galley_view_with_notice > iframe {
  padding-top: 6.429rem !important;
}

.galley_view .galley_view_notice {
  position: absolute !important;
  z-index: 3 !important;
  top: 2.143rem !important;
  left: 0 !important;
  width: 100% !important;
  height: 4.286rem !important;
  background: #a80000 !important;
}

.galley_view .galley_view_notice_message {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 100% !important;
  padding: 0 1rem !important;
  transform: translate(-50%, -50%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.galley_view .galley_view_notice_message a {
  color: #fff !important;
  text-decoration: underline !important;
}

@media (max-width: 767px) {
  .header_view .title {
    padding-right: 3rem !important;
  }
  .header_view .download {
    width: 2.143rem !important;
    min-width: 2.143rem !important;
    padding: 0 !important;
    font-size: 0 !important;
  }
  .header_view .download::before {
    margin: 0 !important;
    font-size: 14px !important;
  }
  .header_view .download .label {
    display: none !important;
  }
}
