/* Local additions for the original outer layout and PDF lifecycle. */
.local-status-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #fff;
}

.local-scrolltop-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: #fff;
  stroke: none;
}

/* V5.5: preserve the original IOSH outer iframe flow.
   The source uses a normal-flow <iframe class="w-100 h-100"> inside
   .report-viewer-container; do not absolutely position, clip, or recolor it. */
#documentViewerContainer {
  position: relative; /* only anchors the loading/error overlays */
}

#documentLoader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  z-index: 2;
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  transition: opacity .16s ease, visibility .16s ease;
}

/* V5.6: the original IOSH desktop page applies
   .report-viewer-container .loader { margin: 20%; }.
   Keep the mobile loader centered, but reproduce that left-offset desktop
   placement without changing the loader asset, size, or animation. */
@media (min-width: 1025px) {
  #documentLoader {
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    margin: 20%;
  }
}

#documentViewerFrame {
  /* width/height come from the original w-100 h-100 classes in index.html.
     Keep native UA inset border and normal document flow exactly as IOSH. */
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease;
}

#documentViewerContainer.is-loaded #documentViewerFrame {
  opacity: 1;
  visibility: visible;
}

#documentViewerContainer.is-loaded #documentLoader {
  opacity: 0;
  visibility: hidden;
}

#documentViewerError {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px;
  color: #8b1e1e;
  background: #fff;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

#documentViewerError[hidden],
#documentLoader[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #documentViewerFrame,
  #documentLoader {
    transition: none;
  }
}

/* Exact Font Awesome 5 Regular check-circle glyph geometry, embedded as SVG. */
/* Keep the inline SVG on the original Font Awesome 5 Regular fa-lg metrics.
   The source page inherits 13px body text, so fa-lg resolves to ~17.33px. */
.source-check-circle {
  display: inline-block;
  width: 1em;
  height: 1em;
  color: #fff;
  flex: 0 0 auto;
  overflow: visible;
  vertical-align: middle;
}


/* V5.11: no author-defined iframe border. The source IOSH iframe leaves
   the frame to the browser-native iframe presentation. */
