
/* Keep the verification alert's reserved layout space, but show no intermediate
   status text before the Registry returns the real certificate result. */
#verificationAlert[hidden] {
  display: flex !important;
  visibility: hidden !important;
}

/* 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 {
  /* Anchor the loader to the viewport, not the viewer container: the container
     moves when the alert slot is resized for the real message, so a
     container-anchored loader jumps with the green box. Viewport-anchored it
     stays put from page open until the viewer appears. Centred vertically on the viewport (top: 50.7%; measured 50.7% on the
     original screenshot vs 50.1% ours). Horizontally it is NOT centred: the
     original's loader sits left of centre (measured centre 36.4% of viewport
     width) because its margin: 20% (of container width) in the original's
     main.css pushes it from the container's left edge — so left: 36.4% here
     replicates the original's place with viewport anchoring, which keeps it
     put when the alert slot resizes. Centred with negative
     margins (not transform) so the reduced-motion rule (transform: none) can
     never uncentre it. Size stays 64x64.
     The dvh line (dynamic viewport height) keeps the loader centred in the
     visible area on mobile, where the URL bar showing/hiding changes the
     viewport height while scrolling; the % line above it is the fallback
     for browsers without dvh support. */
  position: fixed;
  top: 50.7%;
  top: 50.7dvh;
  left: 36.4%;
  right: auto;
  bottom: auto;
  margin: 0;
  margin-top: -32px;
  margin-left: -32px;
  z-index: 2;
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  transition: opacity .16s ease, visibility .16s ease;
}

#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. */


/* Preserve the original Metronic success-alert layout exactly.
   The shared style.bundle.css remains authoritative for .alert, .alert-icon,
   and .alert-text (including flex alignment, padding, icon spacing and text
   flex-grow). This local rule intentionally sets NO height/margin transition:
   the alert must appear at its final size (its slot is pre-measured in
   index.html) — animating height/margin wobbles the viewer and the fixed
   header on mobile. Only the message text fades, via opacity below. */
#verificationAlert {
  transition: none;
}

/* Fade only the message content; all sizing and wrapping remain native
   Metronic/Poppins behavior from the original site stylesheets. */
#verificationAlert .alert-text {
  transition: opacity 120ms ease;
}

/* Match the original verification sentence's natural inline text flow.
   The recipient name is a safe text span, not a separately sized flex unit;
   the browser may wrap normally at spaces wherever the available line width ends. */
#verificationAlert .certificate-recipient-name {
  display: inline;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

#verificationAlert .alert-text.is-transitioning {
  opacity: 0;
}

/* Keep the existing viewer and loading-indicator fade lifecycle unchanged. */
#documentLoader {
  transition: opacity 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.32s;
}

#documentViewerContainer.is-loaded #documentLoader,
#documentViewerContainer.has-error #documentLoader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#documentViewerContainer.is-loaded #documentViewerFrame {
  transition: opacity 0.32s ease, visibility 0s;
}

#documentViewerError {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

#documentViewerContainer.has-error #documentViewerError {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  #verificationAlert,
  #verificationAlert .alert-text,
  #documentLoader,
  #documentViewerFrame,
  #documentViewerError {
    transition: none !important;
    transform: none !important;
  }
}

/* Prevent scroll anchoring from shifting the outer verification layout when the alert text/slot settles. */
#svpPortlet,
#svpPortlet .kt-portlet__body,
#verificationAlert,
#m_header {
  overflow-anchor: none;
}

/* Reserve the header logo row height from first paint, without changing any
   rendered size: each ratio is the logo's own natural ratio (measured from the
   original files: logo-default.png 193x80, Smart-Verify-Plus-Logo.png 500x182),
   so the final box is identical — only the pre-load collapse is removed. On
   mobile the width is already definite (45% in main.css), so the height is
   reserved before the images arrive and the header row cannot grow or push
   the page down when they load. */
.kt-header__brand-logo-default {
  aspect-ratio: 193 / 80;
}

.kt-header__brand-sublogo-default {
  aspect-ratio: 500 / 182;
}
