$element-link-color: #2c4f9e;
$element-border-color: #b6b6b6;
$element-hover-border-color: #CFE0FC;
$element-selected-border-color: #4285F4;
$element-background-color: #ffffff;
$element-hover-background-color: #F0F6FF;
$element-selected-background-color: #E1EBFD;
$element-shadow-color: rgba(0, 0, 0, 0.4);
$element-selected-shadow-color: rgba(44, 79, 158, 0.4);

$knot-background-color: transparent;
$edge-description-background-color: transparent;

$sbgn-background-color-selected: #d67614;
$sbgn-color: #000;
$sbgn-border-color: #555;
$sbgn-background-color: #F6F6F6;

// TODO: make export from SCSS to JS
/*:export {
  'color': $sbgn-color;
  'border-color': $sbgn-border-color;
  'background': $sbgn-background-color;
  'font-weight': 'normal';
}
*/

.internal-pathway-node-container {
  width: 100%;
  height: 100%;
  background-color: $edge-description-background-color;
  font-size: 10px;
  text-align: left;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;

  .internal-pathway-node-title {
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

.noIcon .internal-pathway-node-container {
  line-height: 10px;
  font-size: 10px;
}

.knot {
  .internal-pathway-node-container {
    width: 100%;
    height: 100%;
    min-width: 0;
    background-color: $knot-background-color;
    font-size: 12px;
    line-height: 12px;
    text-align: left;
    position: relative;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
  }
}

.cpd {
  border-radius: 16px;
  background-color: $element-background-color;
  border: 1px solid $element-border-color;

  .internal-pathway-node-container {
    width: 20px;
    height: 20px;
    min-width: 0;
    font-size: 12px;
    line-height: 12px;
    text-align: center;
    position: relative;
    cursor: pointer;
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;

    .internal-pathway-node-title {
      font-weight: bold;
      display: inline-flex;
      white-space: nowrap;
      text-align: center;
      align-items: center;
      justify-content: center;
    }

    .internal-pathway-node-desc {
      font-size: smaller;
    }
  }
}

.internal-pathway-node-link {
  color: $element-link-color;
  text-decoration: underline;
  cursor: pointer;
}

.internal-pathway-units-of-information {
  display: inline-flex;
  flex-direction: row;
  width: 100%;
  position: absolute;
  bottom: -2px;
  margin: 0 -8px;

  .middle-line {
    flex-grow: 1;
    border-width: 0;
    border-top: 2px solid $sbgn-border-color;
  }

  .middle-line-left {
    margin: auto 0 auto -8px;
  }

  .middle-line-right {
    margin: auto -5px auto 0;
  }

  .unit-of-information-label {
    border: 2px solid $sbgn-border-color;
    border-top: 1px solid $sbgn-border-color;
    padding: 2px;
    background-color: #FFFFFF;
  }
}

.internal-pathway-sbgn.nucleic.acid.feature {
  border-radius: 0 0 10% 10%;
  border: 2px solid $sbgn-border-color;
  background-color: $sbgn-background-color;
  height: 48px;
  width: 96px;
  padding: 8px;

  .internal-pathway-node-container.selected {
    border-radius: 0 0 1% 1%;
  }

  .internal-pathway-node-title {
    font-family: Helvetica Neue, Helvetica, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: normal;
  }
}

.internal-pathway-sbgn.macromolecule {
  border-radius: 10%;
  border: 2px solid $sbgn-border-color;
  background-color: $sbgn-background-color;
  height: 48px;
  width: 96px;
  padding: 8px;
  .internal-pathway-node-container.selected {
    border-radius: 1%;
  }

  .internal-pathway-node-title {
    font-family: Helvetica Neue, Helvetica, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: normal;
  }
}

.internal-pathway-sbgn.simple.chemical {
  border-radius: 50%;
  border: 2px solid $sbgn-border-color;
  background-color: $sbgn-background-color;
  height: 48px;
  width: 48px;
  padding: 8px;

  .internal-pathway-node-container.selected {
    border-radius: 50%;
  }

  .internal-pathway-node-title {
    font-family: Helvetica Neue, Helvetica, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: normal;
  }
}

.internal-pathway-collage {
  .internal-pathway-node-container.selected {
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10%;
  }
}

.internal-pathway-sbgn {
  .internal-pathway-node-container.selected {
    background-color: $sbgn-background-color-selected;
    box-shadow: 0 0 0 8px $sbgn-background-color-selected;
  }
}

.internal-pathway-node-label-container {
  position: relative;
  flex: 1;
  .internal-pathway-gene-name {
    position: absolute;
    top: calc(50% - 0.5em);
    left: 0;
    display: none;
  }
}

.cytoscape-container.annotated {
  .internal-pathway-gene-name {
    display: initial;
  }
  .internal-pathway-node-label {
    visibility: hidden;
  }
}

.noIcon ngb-pathway-annotation-mark {
  margin-left: 0 !important;
}
