.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Allow chart interaction through the overlay div*/
  pointer-events: none;
}

/* Includes the toolbar and snapshot preview image */
.static-overlay {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overlay-toolbar {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
}

/* Enable pointer events on the toolbar controls themselves */
.overlay-toolbar * {
  pointer-events: auto;
  z-index: 500;
}

/* Enable cursor overriding while hovering the chart */
.cursor-pointer canvas {
  cursor: pointer !important;
}

/* Radio Controls used for nav controls
   and annotation container setting  */
.switch {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide the radio input and only
   show the label as an icon  */
.switch input {
  display: none !important;
}

.switch label {
  display: flex !important;
  font-size: 17px;
  user-select: none;
  align-items: center !important;
  justify-content: center !important;
  background-image: none;
}

.switch label:first-of-type {
  border-radius: 6px 0px 0px 6px;
}

.switch label:last-of-type {
  border-radius: 0px 6px 6px 0px;
}

#nav-controls label {
  width: 38px;
  height: 38px;
  background-color: rgb(248, 248, 248);
  color: black;
}

#nav-controls :checked + label {
  background-color: rgb(0, 163, 255);
}

#nav-controls :not(:checked) + label:hover {
  background-color: rgba(84, 193, 255, 1);
}

.switch :not(:checked) + label {
  cursor: pointer !important;
}

#nav-controls > .ci-icon-cursor {
  font-size: 12px;
}

#nav-controls > .ci-icon-marquee {
  font-size: 22px;
}

.overlay-button {
  background-color: rgb(0, 163, 255);
  border: none;
  cursor: pointer !important;
  color: black;
  &:hover {
    background-color: rgb(84, 193, 255);
  }

  &:not(:disabled):hover {
    background-color: rgb(84, 193, 255) !important;
    > span {
      color: rgb(0, 0, 0);
    }
  }

  &:disabled {
    background-color: rgba(0, 163, 255);
    border: none;
    cursor: not-allowed !important;
    color: black !important;

    &:hover {
      border: none;
      background-color: rgba(0, 163, 255);
    }
  }

  &:focus {
    background-color: rgba(0, 163, 255) !important;
    color: black !important;
  }
}

.static-overlay-button {
  font-size: 16px;
  padding: 8px 16px 8px 16px;
  border-radius: 6px !important;
}

#snapshot-button {
  width: 38px;
  height: 38px;
  padding: 2px 1px 0px 0px;
  font-size: 14px;
}

/* Overlay button (position (top/left) is updated from JS) */
#annotate-button {
  position: absolute;
  z-index: 1000;
  width: 32px;
  height: 32px;
  border-radius: 20px 20px 20px 0px !important;
  padding: 0px;
  pointer-events: auto;
  display: none;
}

/* Preview overlay*/
#annotation-preview {
  display: none; /* Initially none otherwise flex */
  position: absolute;
  flex-direction: column;
  padding: 10px;
  border-radius: 3px;
  width: 274px;
  max-width: 274px;
  gap: 4px;
  background-color: rgb(255, 255, 255);
  z-index: 499;
  box-sizing: border-box;
  pointer-events: auto;
}

#annotation-upper {
  display: flex;
  align-items: center;
}

#annotation-toolbar {
  display: none;
  justify-content: space-between;
  gap: 50px;
  padding: 0px;
  width: 100%;
}

#edit-controls {
  display: flex;
  gap: 6px;
}

#edit-controls > button {
  background-color: rgb(248, 248, 248);
  cursor: pointer;
  border: none;
  width: 26px;
  height: 26px;
  padding: 0px;
  border-radius: 6px !important;

  &:hover {
    background-color: (84, 193, 255);
  }
}

#annotation-text {
  resize: none;
  border: none;
  font-family: 'Muli';
  width: 100%;
  height: auto;
  overflow: hidden;
  line-height: 16px;
  font-size: 14px;
  background-color: rgb(255, 255, 255);
  &:focus {
    outline: none;
  }
}

#text-measure {
  font-family: 'Muli';
  line-height: 15px;
  font-size: 14px;
  padding: 2px;
  visibility: hidden;
}

/* Place holder disabled button for when we first
   create an empty annotation */
#ghost-done-button {
  width: 26px;
  height: 26px;
  padding: 0px;
  background-color: #213d450d;
  border: none;
  border-radius: 6px;
  cursor: auto;

  &:disabled > span {
    color: black !important;
  }
}

.ci-icon-check {
  font-size: 10px;
  margin-top: 4px;
}

.ci-icon-bin {
  font-size: 13px;
  margin-top: 2px;
}

#container-controls label {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

#container-controls :checked + label {
  background-color: rgb(206, 234, 251);
}

#container-controls :not(:checked):hover + label {
  background-color: rgb(84, 193, 255);
}

#snapshot-preview {
  display: none;
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(0, 0, 0) !important;
  border-radius: 3px;
  width: 348px;
  height: 214px;
  align-self: flex-end;
  pointer-events: auto;
  z-index: 1001;
  box-sizing: content-box;
}

.fade-in-out {
  opacity: 1;
  animation: fade 2s ease-out;
}

@keyframes fade {
  0%,
  100% {
    opacity: 0;
  }
  20%,
  75% {
    opacity: 1;
  }
}

.snapshot-row {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  height: 96px;
  text-align: left;
  margin: 0px;

  &:hover {
    cursor: pointer;
    background-color: rgba(0, 153, 104, 0.1);

    .snapshot-img-container {
      padding: 4px 9px 4px 4px;
    }
  }
}

#snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snapshot-img-container img {
  height: 100%;
  object-fit: contain;
  background-color: rgb(255, 255, 255);
}

.snapshot-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0px 8px 0px;
}

#snapshot-controls {
  display: flex;
  gap: 20px;

  > button {
    padding: 4px !important;
    width: 26px;
    height: 26px;
    border: none;
    background-color: transparent !important;

    span {
      color: rgb(0, 153, 104);
    }

    &:hover {
      background-color: rgba(255, 255, 255, 0.4) !important;
    }
  }
}

.cicontent > p > span {
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: bottom;
  pointer-events: none;
  background-color: rgb(234, 234, 234);

  &:hover {
    background-color: initial;
  }

  > i {
    font-size: 10px;
  }
}

.inline-snapshot-button {
  border-radius: 2px;
  margin: 0px 5px 0px 4px;
}

.inline-edit-button {
  margin: 0px 6px 0px 4px;
}

.inline-annotate-button {
  border-radius: 20px 20px 20px 0px;
  margin: 0px 4px 0px 5px;
}

/* Playground specific styling */
#demorhscontent {
  top: 74px !important;
}

.snapshot-preview-playground {
  align-self: flex-start !important;
}
