/* Keep the study modality and instance count together in the OHIF study browser. */
.text-muted-foreground.mr-2.flex.flex-col.items-end.text-\[12px\] {
  align-items: center !important;
  flex-direction: row !important;
  gap: 0.375rem;
  white-space: nowrap;
}

/* Pacsivo image-loading status. Kept compact so it never obscures the viewport. */
#pacsivo-load-status {
  align-items: center;
  background: rgba(7, 25, 48, 0.94);
  border: 1px solid #25648c;
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.35);
  color: #e7f3ff;
  display: none;
  gap: 0.625rem;
  bottom: 1.5rem;
  max-width: min(25rem, calc(100vw - 2rem));
  min-width: min(21rem, calc(100vw - 2rem));
  padding: 0.55rem 0.75rem 0.7rem;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
}

#pacsivo-load-status[data-visible="true"] {
  display: flex;
}

#pacsivo-load-status[data-state="ready"] {
  border-color: #167a68;
}

.pacsivo-load-spinner {
  animation: pacsivo-spin 0.8s linear infinite;
  border: 2px solid rgba(83, 197, 240, 0.25);
  border-radius: 50%;
  border-top-color: #53c5f0;
  flex: 0 0 auto;
  height: 1rem;
  width: 1rem;
}

#pacsivo-load-status[data-state="ready"] .pacsivo-load-spinner {
  animation: none;
  background: #31d0aa;
  border: 0;
  height: 0.625rem;
  width: 0.625rem;
}

.pacsivo-load-copy {
  display: grid;
  flex: 1;
  gap: 0.15rem;
  min-width: 0;
}

.pacsivo-load-title {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.15;
}

.pacsivo-load-detail {
  color: #92bad2;
  font-size: 0.6875rem;
  line-height: 1.2;
}

.pacsivo-load-progress {
  background: rgba(83, 197, 240, 0.18);
  border-radius: 999px;
  bottom: 0.25rem;
  height: 0.1875rem;
  left: 0.75rem;
  overflow: hidden;
  position: absolute;
  right: 0.75rem;
}

.pacsivo-load-progress::after {
  background: #53c5f0;
  border-radius: inherit;
  content: '';
  display: block;
  height: 100%;
  transition: width 160ms ease-out;
  width: var(--pacsivo-load-progress, 8%);
}

#pacsivo-load-status[data-state="ready"] .pacsivo-load-progress::after {
  background: #31d0aa;
}

#pacsivo-exit-viewer {
  align-items: center;
  background: #0b2c55;
  border: 1px solid #25648c;
  border-radius: 0.375rem;
  color: #e7f3ff;
  cursor: pointer;
  display: flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 2rem;
  left: 10.25rem;
  padding: 0 0.75rem;
  position: fixed;
  top: 0.375rem;
  z-index: 10001;
}

#pacsivo-exit-viewer:hover,
#pacsivo-exit-viewer:focus-visible {
  background: #124171;
  border-color: #53c5f0;
  outline: none;
}

.pacsivo-preferences-root,
.pacsivo-preferences-root * {
  scrollbar-width: none !important;
}

.pacsivo-preferences-root::-webkit-scrollbar,
.pacsivo-preferences-root *::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

@media (min-height: 850px) {
  .pacsivo-preferences-root {
    height: calc(100vh - 1.5rem) !important;
    max-height: calc(100vh - 1.5rem) !important;
  }

  .pacsivo-preferences-root .pacsivo-preferences-scroll-region {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
}

@keyframes pacsivo-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pacsivo-load-spinner { animation: none; }
}

@media (max-width: 720px) {
  #pacsivo-exit-viewer {
    left: auto;
    right: 3.25rem;
  }
}
