.shimmer {
  text-align: center;
  color: rgba(255, 255, 255, 0.1);
  background: -webkit-gradient(linear, left top, right top, from(#222), to(#222), color-stop(0.5, #fff));
  background: -moz-gradient(linear, left top, right top, from(#222), to(#222), color-stop(0.5, #fff));
  background: gradient(linear, left top, right top, from(#222), to(#222), color-stop(0.5, #fff));
  background-size: 125px 100%;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
  animation-name: shimmer;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  -webkit-animation-timing-function: linear;
  -moz-animation-timing-function: linear;
  animation-direction: alternate;
  -webkit-animation-direction: alternate;
  -moz-animation-direction: alternate;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-color: #222;
}

@keyframes shimmer {
  0% {
    background-position: top left;
  }
  100% {
    background-position: top right;
  }
}

.imageViewerViewport.empty ~ .ViewportOverlay {
  display: none;
}

.ViewportOverlay {
  color: white;
}

.ViewportOverlay .overlay-element {
  position: absolute;
  font-weight: 400;
  text-shadow: 1px 1px #000;
  pointer-events: none;
  z-index: 10;
  font-size: clamp(12px, 1.6vw, 16px);
}

@supports (container-type: inline-size) {
  .card.ViewportContainer {
    container-type: inline-size;
  }
  .card.ViewportContainer .ViewportOverlay .overlay-element {
    font-size: clamp(12px, 2.2cqw, 16px);
  }
}

.ViewportOverlay .top-left {
  top: 25px;
  left: 20px;
}

.ViewportOverlay .top-center {
  top: 20px;
  padding-top: 20px;
  width: 100%;
  text-align: center;
}

.ViewportOverlay .top-right-up {
  top: 5px;
  right: 20px;
  text-align: right;
}

.ViewportOverlay .top-left-up-x2 {
  top: 5px;
  left: 2px;
  text-align: left;
}

.ViewportOverlay .top-right {
  top: 25px;
  right: 20px;
  text-align: right;
}

.ViewportOverlay .bottom-left {
  bottom: 20px;
  left: 20px;
}

.ViewportOverlay .bottom-right {
  bottom: 20px;
  right: 20px;
  text-align: right;
}

.ViewportOverlay.controlsVisible .topright,
.ViewportOverlay.controlsVisible .bottomright {
  right: calc(20px + 19px);
}

.ViewportOverlay svg {
  color: white;
  fill: white;
  stroke: white;
  background-color: transparent;
  margin: 2px;
  width: 18px;
  height: 18px;
}

/* --- Custom Loading Spinner --- */
.ViewportOverlay .top-left-up {
  top: 5px;
  left: 30px;
  text-align: left;
}

.ViewportOverlay .loading-spinner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  color: #3b75c5;
}

.ViewportOverlay .loading-spinner .loading-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.5rem;
  font-weight: bold;
  color: #ffffff;
  pointer-events: none;
}

.ViewportOverlay .loading-spinner .spinner-border {
  width: 1.5rem !important;
  height: 1.5rem !important;
  color: #3b75c5 !important;
}

.viewport-sync-badge {
  position: absolute;
  top: 8px;
  right: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid white;
  color: white;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
  z-index: 10;
  font-size: 12px;
  line-height: 1;
}

/* Table Data Study*/
/* [class^='infoECG-'],
[id^='infoECG-'] {
  height: auto;
}
[class*='divTableRow'],
.divTableRow {
  display: table-row;
}
.divTableHeading {
  background-color: #eee;
  display: table-header-group;
  font-weight: bold;
}
[class*='divTableCell'],
.divTableCell,
.divTableHead {
  display: table-cell;
}
.divTableCell i {
  font-weight: normal;
}
[class^='divTableBody-'],
[id^='divTableBody-'] {
  height: auto;
  background: #f9f8f2;
  width: 100%;
  display: table;
  padding: 10px;
}

[class^='toolsECG-'],
[id^='toolsECG-'] {
  background: #f9f8f2;
  width: 100%;
  display: flow-root;
  border-top: 2px solid rgb(0, 0, 0);
}
[class*='divTools'],
.divTools {
  float: right;
  font-size: 13px;
  font-weight: 700;
  margin-left: 1.5rem;
}
.divTools i {
  font-weight: normal;
}
.divTools button {
  background-color: #dadada;
  color: black;
  padding: 5px 15px;
  margin: 4px 2px;
  border-radius: 10%;
} */

/*Zoom buttons*/
/* [class^='zoomButons-'],
[id^='zoomButons-'] {
  position: absolute;
  width: 30px;
  top: 125px;
  right: 2px;
}
[class^='zoomButons-'],
[id^='zoomButons-'] button {
  background-color: #dadada;
  color: black;
  padding: 5px;
  width: 30px;
  height: 30px;
  margin: 0px 0px 2px 0px;
  border-radius: 10%;
} */

[class^='table-container']::-webkit-scrollbar {
  width: 18px;
  height: 18px;
}

[class^='table-container']::-webkit-scrollbar-track {
  background-color: #1c1c1c;
}

[class^='table-container']::-webkit-scrollbar-thumb {
  background-color: #2c2c2c;
  border-radius: 8px;
}

[class^='table-container']::-webkit-scrollbar-thumb:hover {
  background-color: #221e1e;
}

[class^='table-container'] {
  scrollbar-width: thin;
  scrollbar-color: #2c2c2c transparent;
  border: 1px solid #444444;
  overflow: auto;
}

.table-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: calc(160px * 5 + 32px);
  grid-gap: 8px;
  gap: 8px;
  padding: 5px;
  width: 100%;
  box-sizing: border-box;
}

[id^='infoECG'] {
  display: flex;
  width: 100%;
  background-color: #333333 !important;
}

@media screen and (max-width: 768px) {
  [id^='infoECG'] {
    flex-direction: column;
  }
}

[id^='divTableBody-1'] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  padding: 5px;
  min-width: 270px;
  flex: 25 1;
}

[id^='divTableBody-2'] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  grid-gap: 4px;
  gap: 4px;
  padding: 5px;
  min-width: 380px;
  flex: 55 1;
}

[id^='divTableBody-3'] {
  display: block;
  padding: 5px;
  min-width: 130px;
  flex: 15 1;
}

[id^='divTableBody'] {
  background-color: #333333 !important;
}

[class^='divTableCell'] {
  background-color: #333;
  min-width: 140px;
  color: white;
  font-size: 10px;
  overflow-wrap: break-word;
}

[class^='divTableCell'] > i {
  font-weight: normal;
  color: #ccc;
}

[class^='ecg-viewport-wrapper'] {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

[class^='ecg-sidebar'] {
  display: flex;
  flex-direction: column;
}

[class^='ecg-info-container'],
[class^='ecg-tools-container'] {
  width: 100%;
}

[class^='ecg-canvas-container'] {
  flex: 1 1 auto;
  height: auto;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

[id^='toolsECG'] {
  background-color: #333333 !important;
  border: 0;
  color: white !important;
  display: flex;
  gap: 7%;
  padding: 5px;
}

[class^='divTools'] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 10px;
  color: white;
  width: 100px !important;
  margin: 0 !important;
}

[class^='divTools'] > button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #777777 !important;
  color: white !important;
  border-radius: 10%;
  padding: 3px !important;
  cursor: pointer;
  margin: 0 !important;
}

[id^='zoomButons'] > button {
  background-color: #dadada;
  padding: 5px 17px;
  margin: 0 !important;
  border-radius: 10%;
  cursor: pointer;
  width: auto;
  height: auto;
  font-family: inherit;
}

@media screen and (max-height: 480px) {
  [class^='ecg-viewport-wrapper'] {
    flex-direction: row;
  }

  [class^='ecg-sidebar'] {
    width: 25%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 160px;
  }

  [class^='ecg-info-container'] {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
  }

  [class^='ecg-tools-container'] {
    flex: 0 0 auto;
    margin-top: auto;
    overflow-y: auto;
    padding: 0 !important;
    border: solid 1px #444444;
  }

  [class^='ecg-canvas-container'] {
    width: 75%;
    flex: 1 1;
    height: 100%;
    min-width: 0;
  }

  [id^='infoECG'] {
    flex-direction: column;
  }

  [id^='divTableBody-1'],
  [id^='divTableBody-2'],
  [id^='divTableBody-3'] {
    width: 100%;
    display: block;
    min-width: 0;
    flex: none;
    padding: 5px;
    box-sizing: border-box;
    overflow-y: auto;
  }

  [id^='toolsECG'] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 3px !important;
  }

  [class^='divTools'] {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100% !important;
    box-sizing: border-box;
  }

  [class^='divTools'] > b {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 10px;
    margin: 0 !important;
  }

  [class^='divTools'] > button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 6px 10px;
    font-size: 10px;
    border-radius: 6px;
    min-width: 46px;
    height: 26px;
    background-color: #777777 !important;
    color: white !important;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }
}

@media screen and (max-height: 380px) {
  [id^='toolsECG'] i {
    display: none !important;
  }
}

.scrollbar-custom::-webkit-scrollbar {
  width: 18px;
  height: 18px;
}

.scrollbar-custom::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
  background-color: #2c2c2c;
  border-radius: 8px;
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
  background-color: #221e1e;
}

/* Firefox support */
.scrollbar-custom {
  scrollbar-width: thin;
  scrollbar-color: #2c2c2c transparent;
}

.pdf-viewport-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.pdf-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 2px;
  background: #2c2c2c;
  border-bottom: 1px solid #111827;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  color: #d1d5db;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #444444 transparent;
}

.pdf-toolbar::-webkit-scrollbar {
  width: 18px;
  height: 18px;
}

.pdf-toolbar::-webkit-scrollbar-track {
  background: transparent;
}

.pdf-toolbar::-webkit-scrollbar-thumb {
  background-color: #2c2c2c;
  border-radius: 8px;
}

.pdf-toolbar::-webkit-scrollbar-thumb:hover {
  background-color: #221e1e;
}

.pdf-toolbar button {
  background: #181818;
  color: #f9fafb;
  padding: 8px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.pdf-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.pdf-toolbar span {
  color: #f9fafb;
}

.pdf-page-counter {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pdf-viewer-container {
  width: 100%;
  height: calc(100% - 50px);
  overflow: auto;
  margin-top: 50px;
  position: absolute;
}

#ViewerCorePanel .zoomedInViewport {
  display: block;
}

#ViewerCorePanel .ViewportContainer .overlay-element {
  color: var(--viewport-overlay-info-color);
  max-width: 40%;
}

.viewport-wrapper {
  min-height: 80% !important;
  touch-action: none;
  -webkit-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
}

#ViewerCorePanel .ViewportContainer .viewport-wrapper .bottom-right,
#ViewerCorePanel .ViewportContainer .viewport-wrapper .top-right {
  text-align: right;
}

#ViewerCorePanel .ViewportContainer .viewport-wrapper .bottom-left,
#ViewerCorePanel .ViewportContainer .viewport-wrapper .top-left {
  text-align: left;
}

.ViewportOrientationMarkers .top-mid {
  top: 5px;
  left: 50%;
}
.ViewportOrientationMarkers .left-mid {
  top: 47%;
  left: 5px;
}

.ViewportOrientationMarkers .right-mid {
  top: 47%;
  left: 97%;
}

.ViewportOrientationMarkers .bottom-mid {
  top: 97%;
  left: 47%;
}

.viewport-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.cine-overlay {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  isolation: isolate;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  flex: none !important;
}

.cine-overlay--below-selector {
  top: 48px !important; /* adjust to match OrientationSelector height */
}

.cine-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.cine-overlay--visible ~ .viewport-wrapper .orientation-container {
  margin-top: 48px;
}

.cine-overlay__row {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(45, 45, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 6px;
}

/* ── Buttons (play/pause, close) ── */
.cine-overlay__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #888888;
  font-size: 13px;
  cursor: pointer;
  transition: all 100ms ease;
  flex-shrink: 0;
}

.cine-overlay__btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.cine-overlay__btn--active {
  color: #cccccc;
}

.cine-overlay__fps-control {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 2px;
}

.cine-overlay__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 26px;
  border: none;
  background: transparent;
  color: #aaaaaa;
  font-size: 10px;
  cursor: pointer;
  transition: color 100ms ease;
  padding: 0;
}

.cine-overlay__arrow:hover {
  color: #ffffff;
}

.cine-overlay__fps-value {
  font-size: 12px;
  font-weight: 600;
  color: #dddddd;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  min-width: 46px;
  text-align: center;
  -webkit-user-select: none;
          user-select: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.cine-overlay__slider-row {
  display: flex;
  justify-content: center;
  padding: 4px 8px 6px;
  background: rgba(45, 45, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.cine-overlay__slider {
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #cccccc 0%,
    #cccccc 40%,
    rgba(255, 255, 255, 0.15) 40%,
    rgba(255, 255, 255, 0.15) 100%
  );
  background: linear-gradient(
    to right,
    #cccccc 0%,
    #cccccc var(--slider-pct, 40%),
    rgba(255, 255, 255, 0.15) var(--slider-pct, 40%),
    rgba(255, 255, 255, 0.15) 100%
  );
  outline: none;
  cursor: pointer;
}

.cine-overlay__slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e8e8e8;
  border: 2px solid rgba(45, 45, 45, 0.95);
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(200, 200, 200, 0.2);
  -webkit-transition: box-shadow 100ms ease;
  transition: box-shadow 100ms ease;
}

.cine-overlay__slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(200, 200, 200, 0.3);
}

.cine-overlay__slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e8e8e8;
  border: 2px solid rgba(45, 45, 45, 0.95);
  cursor: pointer;
}

#root,
body,
html {
  background-color: #000;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.FlexboxLayout {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.custom-range::-webkit-slider-thumb {
  background-color: #181818 !important;
}

.custom-range::-moz-range-thumb {
  background-color: #181818 !important;
}

.custom-range {
  height: 0 !important;
}

.orientation-container {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 1;
  pointer-events: auto;
}

.orientation-btn {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid #fff5;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

@media (pointer: coarse) and (min-width: 768px) {
  .orientation-container {
    gap: 6px;
    top: 14px;
  }
  .orientation-btn {
    font-size: 15px;
    padding: 6px 12px;
    border-radius: 6px;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .orientation-btn {
    font-size: 15px;
    padding: 6px 12px;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .orientation-btn {
    font-size: 16px;
    padding: 7px 14px;
  }
}

.orientation-btn.active {
  background: rgba(0, 0, 0, 0.4);
  font-weight: 600;
}

.orientation-btn.cross {
  color: red;
}

.dicom-value {
  -webkit-user-select: text;
          user-select: text;
  white-space: pre-wrap;
}

:root {
  /* Toolbar */
  --toolbar-color: #fff;
  --toolbar-border-color: #11508e;
  --toolbar-btn-color: #fff;
  --toolbar-btn-hover-color: #d27519;
  --toolbar-btn-activeTool-color: #1976d2;

  /* Viewport */
  --viewport-overlay-info-color: #8b8b8b;
}

.simplebar-track.simplebar-vertical .simplebar-scrollbar:before {
  filter: contrast(50%);
  background-color: #2c2c2c;
}

.buttonNav {
  border-left: transparent !important;
  border-right: transparent !important;
  border-bottom: transparent !important;
  border-top: transparent !important;
  background: transparent !important;
  width: 80px;
  height: 60px;
}

.borderNav {
  border-bottom: 2px solid white !important;
  border-radius: 1px !important;
}

.activeSerie {
  border-color: #1976d2 !important;
}

.serie-card .thumbOverlay {
  color: white;
}

.serie-card .thumbOverlay .overlay-element {
  position: absolute;
  font-weight: 400;
  text-shadow: 1px 1px #000;
  pointer-events: none;
}

.serie-card .thumbOverlay .top-right {
  top: 10px;
  right: 10px;
  text-align: right;
}

.serie-card .thumbOverlay .top-left {
  top: 10px;
  left: 10px;
}

.serie-card img {
  width: auto;
  max-width: 98%;
  height: auto;
  -webkit-user-drag: none;
}

.ThumbnailsPanel {
  flex: 1 1;
  height: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.ThumbnailsPanel .card {
  background-color: transparent;
  background-color: initial;
}

.ThumbnailsPanel .serie-card {
  position: relative;
  background-color: black;
  color: white;
  min-width: max(200px, 10vw);
  width: 100%;
  min-height: 10vw;
  margin-bottom: 0.5rem;
  display: inline-table;
  border: 1px solid transparent;
  border-color: #ccc;
  border-radius: 4px;
}
.ThumbnailsPanel .card-body,
.ThumbnailsPanel .card-header {
  padding: 0.75rem 0rem;
}

.ThumbnailsPanel .card-body button {
  background: transparent;
  box-shadow: 0px 0px 0px transparent;
  border: 0px solid transparent;
  text-shadow: 0px 0px 0px transparent;
}

.ThumbnailsPanel .card-body button:hover {
  background: transparent;
  box-shadow: 0px 0px 0px transparent;
  border: 0px solid transparent;
  text-shadow: 0px 0px 0px transparent;
}

.ThumbnailsPanel .card-body button:active {
  outline: none;
  border: none;
}

.ThumbnailsPanel .card-body button:focus {
  outline: 0;
}

.borderColorCustom {
  --cui-border-color: #3a3b3d;
  border-color: #3a3b3d;
}

.borderColorWhite {
  --cui-border-color: #ffffff;
  border-color: #ffffff;
}

button.accordion-button[aria-expanded='false'] {
  background-color: #2c2c2c;
  color: white;
  border-radius: 0px !important;
  box-shadow: none;
  padding-left: 20px;
  padding-right: 10px;
}
button.accordion-button[aria-expanded='true'] {
  color: white;
  background-color: #1f1f1f;
  border-radius: 0px !important;
  box-shadow: none;
  padding-left: 20px;
  padding-right: 10px;
}
button.accordion-button > button.acordion-button::after {
  color: white !important;
  background-color: white !important;
}

button.accordion-button.collapsed::after {
  background-image: url(/externalviewer/static/media/Arrow-White.4dd5701565f2ef97f908.svg) !important;
  margin-top: auto !important;
}

button.accordion-button::after {
  background-image: url(/externalviewer/static/media/Arrow-White.4dd5701565f2ef97f908.svg) !important;
  margin-top: auto !important;
}

.padding {
  padding-bottom: 2px;
  font-size: 12px;
}

.bold {
  font-weight: bold;
}

.styleText {
  font-size: 13px;
  font-weight: bold;
  padding-bottom: 2px;
}

.styleTextMenu {
  font-size: 12px;
  color: white !important;
}

.ThumbnailsPanel,
.ThumbnailsPanel .accordion-item,
.ThumbnailsPanel .accordion-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ThumbnailsPanel .accordion-collapse {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ThumbnailsPanel .accordion-body {
  overflow: auto;
}

