/* viewer.arxova.health — the label and the no-session message. */
#arxova-label {
  /* Centered without a transform, so its "ID" / "©" children can be fixed-positioned on phones. */
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  max-width: calc(100vw - 16px);
  bottom: 10px;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e5e7eb;
  font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.arxova-message {
  max-width: 520px;
  margin: 18vh auto 0;
  padding: 0 24px;
  color: #e5e7eb;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}
html, body { background: #000; }
.arxova-form { max-width: 420px; margin: 14vh auto 0; padding: 0 24px; color: #e5e7eb; font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.arxova-form h1 { font-size: 20px; font-weight: 700; margin: 0 0 18px; }
.arxova-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.arxova-form input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; border: 1px solid #374151; background: #111827; color: #fff; font-size: 15px; }
.arxova-form button { margin-top: 14px; width: 100%; padding: 11px; border: 0; border-radius: 8px; background: #4aabf7; color: #0a0e1a; font-weight: 700; font-size: 15px; cursor: pointer; }
.arxova-small { font-size: 12px; color: #9ca3af; margin-top: 6px; }
[hidden] { display: none !important; }
#arxova-credits, #arxova-studyid {
  color: #9ca3af; font: 500 11px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
#arxova-credits:hover, #arxova-studyid:hover { color: #e5e7eb; }
.arxova-credits-page { max-width: 760px; margin: 48px auto; padding: 0 24px; color: #e5e7eb; font: 400 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.arxova-credits-page pre { white-space: pre-wrap; background: #0f172a; border: 1px solid #1f2937; border-radius: 8px; padding: 16px; font-size: 12px; color: #cbd5e1; }
#arxova-studyid-box {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 40px; z-index: 2147483000; max-width: min(92vw, 560px); padding: 8px 10px; border-radius: 8px;
  background: rgba(10, 18, 32, 0.94); border: 1px solid rgba(255, 255, 255, 0.18); color: #e5e7eb;
  font: 400 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; user-select: all;
}

/* ---- OHIF header: no overlap at any width (JD 2026-11-18) -----------------
   OHIF 3.13 lays the header out as absolutely positioned layers (logo left,
   toolbar centered, undo/patient/settings right), so a toolbar wider than the
   gap draws over the logo and the right-hand buttons. Here the row becomes a
   flex row: the logo and the right-hand group keep their own slots, and the
   toolbar takes what is left, scrolling sideways when it does not fit
   instead of colliding. The row is found by OHIF's own data-cy marker. */
div:has(> div > [data-cy="return-to-work-list"]) {
  display: flex !important;
  align-items: center;
  gap: 6px;
}
div:has(> div > [data-cy="return-to-work-list"]) > div {
  position: static !important;
  transform: none !important;
  translate: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
}
div:has(> div > [data-cy="return-to-work-list"]) > div:has(> [data-cy="return-to-work-list"]) {
  flex: 0 0 auto;
}
div:has(> div > [data-cy="return-to-work-list"]) > div[class*="left-[250px]"] {
  display: none !important;
}
div:has(> div > [data-cy="return-to-work-list"]) > div[class*="left-1/2"] {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
div:has(> div > [data-cy="return-to-work-list"]) > div[class*="left-1/2"]::-webkit-scrollbar { display: none; }
div:has(> div > [data-cy="return-to-work-list"]) > div[class*="left-1/2"] > div {
  width: max-content;
  margin: 0 auto;
}
div:has(> div > [data-cy="return-to-work-list"]) > div[class*="right-0"] {
  flex: 0 0 auto;
}

/* Narrow screens: the label sits above the "Study ID" / "Credits" corner
   links instead of on the same line. */
@media (max-width: 759px) {
  /* Phones: the label alone at the bottom center; "Study ID" and "Credits"
     become "ID" and "©" in the empty strip at the far left. */
  #arxova-label { bottom: 4px; padding: 2px 8px; font-size: 10.5px; }
  #arxova-studyid, #arxova-credits { position: fixed; left: 2px; width: 24px; text-align: center; font-size: 11px; }
  #arxova-credits { bottom: 8px; }
  #arxova-studyid { bottom: 30px; }
  #arxova-studyid-box { left: 30px; right: 8px; bottom: 30px; width: auto; margin: 0; }
}
