@import "colors";

$info-box-background: rgba(255, 255, 255, 0.9);

body.dark-mode {
  background: black;
  color: white;
}

.force-layout-container {
  position: relative;
}

.highlight-box {
}

.info-box {
  position: absolute;
  top: 0px;
  left: 20px;
  z-index: 2;
  font-size: 12px;
}

.info-box-section-header {
  background: $info-box-background;
  display: inline;

  &:after {
    content: "\A";
    white-space: pre;
  }
}

#info-box-input {
  width: 300px;
  border: 0;
  border-bottom: 1px solid #ccc;
  font-size: 16px;
  outline-width: 0;

  &::placeholder {
    color: #ccc;
  }
}

#info-box-header {
  margin-bottom: 8px;
}

.info-box-section-header {
  font-weight: bold;
  letter-spacing: 0.4px;
  line-height: 1.6;
}

.info-box .total-files-container {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.3px;
}

.info-box-file-list-container {
}

.highlight-box {
  // Shown via javascript
  display: none;
}

.info-box-file-list {
  line-height: 1.5;
}

.inline-item {
  // We want each item to only take up it's exact width so that pointer events
  // fall back to the SVG
  display: inline;
  pointer-events: auto;
  line-height: 1.4;
  // Background is transparent so we can still see the graph behind the item,
  // but partially obscured so that we can still read the text
  background: $info-box-background;

  &:after {
    content: "\A";
    white-space: pre;
  }

  &:last-child {
    padding-bottom: 0;
  }
}

svg.main {
  position: relative;
  z-index: 1;
  // border: 1px solid #eee;

  body.dark-mode & {
    background: black;
  }
}

svg line {
}

.node-type-view {
  fill: lightblue;
}

.node-type-controller {
  fill: blue;
}

.node-type-live {
  fill: 'green';
}

// SVG animation inspired by https://codepen.io/AmeliaBR/pen/kjnoz
path.direction-animate, line.direction-animate {
  stroke-dasharray: 5 1;
  animation: movedash 1s infinite linear;
}

// Note: the specific values used here are important for the animation to not
// appear "jumpy"
@keyframes movedash {
  0% {stroke-dashoffset: 12;}
  100% {stroke-dashoffset:0;}
}

.ui-header {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: $ui-purple;
}

.glossary-box {
  position: absolute;
  z-index: 2;
  top: 0px;
  right: 10px;
  font-size: 12px;

  .box {
    height: 8px;
    width: 8px;
  }
}

.tab-bar {
  display: flex;
  pointer-events: auto;

  .tab {
    opacity: 0.7;
    margin-right: 8px;
    cursor: pointer;
    font-size: 14px;
    color: $ui-purple;
    text-transform: uppercase;
    padding-bottom: 3px;

    &.active {
      opacity: 1;
      font-weight: bold;
      border-bottom: 1px solid $ui-purple;
    }
  }
}

.project-name {
  font-size: 2.4em;
}

.explain-text {
  font-size: 14px;
}

.mode-switcher .explain-text-container {
  opacity: 0;
  transition: opacity ease-in-out 0.3s;
}

.mode-switcher .controls:hover .explain-text-container {
  opacity: 1
}

svg.selected-node-indicator, svg.file-indicator {
  width: 20px;
  height: 20px;
}

svg.line-indicator {
  width: 20px;
  height: 20px;
}

svg.dep-type-indicator {
  width: 40px;
  height: 20px;
}

.key-box table tr td:first-child {
  width: 30px;
}

.dep-box table tr td:first-child {
  width: 50px;
}
