
/* 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 {
  /* Container-anchored, matching the original's in-flow loader (Issues 3+4).
     The original's loader is an in-flow <img class="loader"> inside
     #documentViewerContainer with margin: 20% (of container width) in
     main.css — its top edge sits at the container's top edge and its left
     edge is pushed in by 20% of the container width, at every viewport.
     Measured live on the authoritative original
     (very.iosh.com/?reference=93548623-01-MYX8): loader top == container
     top at 390/768/1366px, and the loader travels with the container on
     scroll (loader Δ == container Δ). The old position: fixed + 36.4% /
     50.7dvh viewport percentages only coincided with the original at one
     viewport (up to +144px right and ~90–115px high at 1366×768), and glued
     the loader to the viewport while the container scrolled away (loader
     Δ == 0 while the container moved −27/−192px). Absolute positioning
     against the already position: relative container reproduces the
     original's place exactly — margin-top: 20% replicates the original's
     collapsing top margin (the original's in-flow loader has margin: 20%
     on all sides; its top margin, 20% of container width, collapses
     through the container and pushes it down 72px @390px / 251px @1366px,
     so the original's loader sits at 288/467 during loading, not at the
     container's settled top 216). margin-left: 20% of the container width
     — while staying out of flow, so it never pushes the
     from-first-paint invisible iframe down and never jumps when it hides.
     The container itself stays at its settled top (216) the whole time;
     only the loader sits at the original's pushed-down place.
     The alert slot is pre-measured (index.html) and appears at its final
     size, so the container does not move when the alert arrives. Size is 100x100, matching the original's gif byte-for-byte
     (the original's loading.gif is 100x100; ours was 64x64, which put
     the loader's centre 18px up-left of the original's). The gif file
     itself is now the original's 100x100 asset. */
  position: absolute;
  top: 0;
  left: 0;
  margin: 20% 0 0 20%;
  z-index: 2;
  display: block;
  width: 100px;
  height: 100px;
  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;
}
