/* Fixaro VisionPACS — OHIF customization styles. */

/* 1 · Branded loading overlay (shows loading.html while a study opens) */
#fixaro-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
#fixaro-loading-overlay.visible { opacity: 1; visibility: visible; }
#fixaro-loading-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 4 · Branded patient-name bar (shown while viewing a study) */
#fixaro-patient-bar {
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 2147482000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 70vw;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(16, 30, 60, 0.25);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #12203f;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
#fixaro-patient-bar.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
#fixaro-patient-bar .fx-ico { font-size: 14px; line-height: 1; }
#fixaro-patient-bar .fx-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fixaro-patient-bar .fx-sep { width: 1px; height: 14px; background: #c7d2e8; }
#fixaro-patient-bar .fx-sep:empty + .fx-id:empty { display: none; }
#fixaro-patient-bar .fx-id { color: #4a5a7a; white-space: nowrap; }

/* 3 · Belt-and-braces hide for any "About" item we tagged */
[data-fixaro-removed="1"] { display: none !important; }

/* Best-effort: keep OHIF's own patient info row visible if the build collapses it */
.PatientInfo, [data-cy="patientInfo"], [data-cy="PatientInfo"] { visibility: visible !important; }

/* 5 · Boot overlay — covers OHIF's cold-load (black screen, 404 flash, spinner)
   with a Fixaro loading screen. Static in index.html so it paints on the first
   frame; fixaro-customize.js removes it once the real UI is on screen. */
#fixaro-boot {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.35s ease;
}
#fixaro-boot.fx-hide { opacity: 0; visibility: hidden; pointer-events: none; }
#fixaro-boot img { width: min(320px, 70vw); height: auto; }
#fixaro-boot .fx-sp {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid #e6ecf7; border-top-color: #1b4fd1; border-right-color: #17a24a;
  animation: fxspin 0.9s linear infinite;
}
#fixaro-boot .fx-lb { font: 15px "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #6b7793; letter-spacing: .04em; }
@keyframes fxspin { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) {
  #fixaro-boot { background: #0b1220; }
  #fixaro-boot .fx-lb { color: #9fb0cc; }
}
