/*
 * fhrviewer.css — self-contained styles for the vanilla FHRViewer.
 * Bootstrap rules dropped; the whole widget sits on a white background.
 */

.fhr-viewer {
  display: block;
  height: 600px;
  box-sizing: border-box;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.fhr-viewer * {
  box-sizing: border-box;
}

.fhr-viewer .graph {
  position: relative;
  min-width: 100px;
  min-height: 80px;
  height: calc(100% - 94px);
  cursor: pointer;
  overflow: hidden;
  background: #fff;
}

/* bottom drag handle to resize the viewer height: a uniform light-grey bar
   with a centred grip (a striped gradient read as "transparent" on ward
   screens), set apart from the buttons by a small margin */
.fhr-viewer .resizebar {
  position: relative;
  width: 100%;
  height: 12px;
  margin-top: 6px;
  background: #e9edec;
  border-top: 1px solid #dde5e1;
  border-radius: 0 0 6px 6px;
  cursor: row-resize;
}
.fhr-viewer .resizebar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 36px;
  height: 5px;
  margin-left: -18px;
  border-top: 1px solid #9aa8a3;
  border-bottom: 1px solid #9aa8a3;
}
.fhr-viewer .resizebar:hover {
  background: #d6e4ff;
}

.fhr-viewer .graph .background-canvas,
.fhr-viewer .graph .frontground-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.fhr-viewer .eventTextEdit {
  display: none;
  position: absolute;
  width: auto;
  height: auto;
  z-index: 2;
  font: 16px Arial;
  border: 1px solid #888;
  resize: none;
  overflow: hidden;
}

/* --- controllers: full-width scrollbar row on top, button row below ----- */
.fhr-viewer .controllers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 6px 0;
  background: #fff;
}

/* the scrollbar row: the track, then the "follow live" control at its right end */
.fhr-viewer .fhr-viewer-scrollbar {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 22px;
  margin: 0;
}

.fhr-viewer .scrollbarTrack {
  position: relative;
  flex: 1 1 auto;
  min-width: 40px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.05);
  box-shadow: inset 1px 1px 16px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.fhr-viewer .scrollbarDragger {
  position: absolute;
  min-width: 30px;
  display: block;
  width: 10%;
  max-width: 100%;
  left: 0;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.fhr-viewer .scrollbarDraggerBar {
  background-color: #777;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.4), inset -1px 0 0 rgba(0, 0, 0, 0.2);
  height: 18px;
  margin: 2px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 8px;
}

/* --- button row -------------------------------------------------------- */
.fhr-viewer .controller-icons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.fhr-viewer .btn-fhr-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  min-width: 38px;
  height: 38px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #f6f6f6;
  cursor: pointer;
  color: #333;
  line-height: 1.05;
}

.fhr-viewer .btn-fhr-icons.text {
  font-size: 12px;
  font-weight: bold;
  padding: 0 6px;
}

.fhr-viewer .btn-fhr-icons.icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.fhr-viewer .btn-fhr-icons:hover {
  background: #e8e8e8;
}

.fhr-viewer .btn-fhr-icons.active {
  background: #cde6ff;
  border-color: #5a9bd4;
}

/* --- "follow live" control, at the right end of the scrollbar row --------- */
.fhr-viewer .btn-fhr-icons.btn-follow {
  flex: 0 0 auto;
  height: 100%;
  min-width: 34px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 10px;
}

.fhr-viewer .btn-fhr-icons.btn-follow svg {
  width: 18px;
  height: 18px;
}
