@import "/src/App/variables";

.graphContainer {
  position: relative;
  flex: 1;
}

.zoomContainer {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 15px;
  border-radius: 15px;
  background: $blueDark;
}

.zoomText {
  text-align: center;
  border-bottom: 1px solid $white30;
  padding: 4px 0;
}

.zoomButton, .zoomButtonDisabled {
  padding: 7px;
}

.zoomButtonDisabled, .zoomButtonDisabled:hover {
  color: $white20;
}

.graph {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: auto;
  cursor: move;
}

.nodeStage, .nodeStageSelected {
  position: relative;
  cursor: pointer;
  background: $blueDark;
  border: 1px solid $blue;
  border-radius: 5px;
  margin: 0px 7px;
  width: 66px;
  height: 66px;
}

.nodeStage *, .nodeStageSelected * {
  pointer-events: none;
}

@each $name, $colorLight, $colorDark in $colors {
  .nodeStage.#{$name} {
    background: $colorDark;
    border: 1px solid $colorLight;
  }
}

.nodeStageDragOver {
  border: 1px solid $orange;
}

.nodeStageSelected {
  background: $orange;
  border: 1px solid $orange;
}

.nodeStageAutoplay:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  border: 10px solid transparent;
  border-top-color: $blue;
}

@each $name, $colorLight, $colorDark in $colors {
  .nodeStageAutoplay.#{$name}:before {
    border-top-color: $colorLight;
  }
}

.nodeStageSelected.nodeStageAutoplay:before {
  border-top-color: $orange;
}

.icons {
  position: absolute;
  z-index: 1;
  right: 3px;
  top: 3px;
  display: flex;
}

.icon, .iconText, .redIcon {
  width: 16px;
  height: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  line-height: 15px;
  text-align: center;
  color: $purple;
  background: $blue;
  border: 1px solid $purple;
  pointer-events: initial;
}

.icon, .redIcon {
  font-family: icons;
  font-size: 10px;
}

@each $name, $colorLight, $colorDark in $colors {
  .nodeStage.#{$name} .icon,
  .nodeStage.#{$name} .iconText {
    background: $colorLight;
  }
}

.nodeStageSelected .icon,
.nodeStageSelected .iconText {
  background: $orange;
}

.redIcon {
  background-color: $red;
}

.nodeStageImg, .nodeStageImg img {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  width: 64px;
  height: 48px;
}

.nodeStageImg {
  overflow: hidden;
  background: $black;
}

.nodeStageTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: $white;
  font-weight: normal;
  text-align: center;
}

.nodeActionContainer {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nodeAction {
  cursor: pointer;
  min-width: 10px;
  min-height: 10px;
  background: $white;
  border-radius: 5px;
}

.nodeActionCondition {
  padding: 2px 4px;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: $black;
  overflow: hidden;
}

.line {
  fill: none;
  stroke-width: 2px;
  stroke: $white30;
}

.text {
  font-size: 10px;
  fill: $white40;
  dominant-baseline: central;
  padding-right: 50px;
}

.contextMenu {
  margin-top: 10px;
  position: relative;
}

.contextMenu:before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -10px;
  border: 10px solid transparent;
  border-bottom-color: $purple4;
}