@import "../../styles/variables";

::ng-deep .jsontree_tree {
  margin: 0;
  font-family: $monospace;
  list-style: none;
  padding: 0;

  ::ng-deep b {
    font-weight: normal;
  }

  ::ng-deep .jsontree_node {
    display: list-item;
    font-size: 12px;
    line-height: 28px;
    padding-bottom: 0;

    ::ng-deep .jsontree_expand-button {
      top: -7px;
      left: -16px;
      background: transparent;
      background-image: none;

      &:before {
        font: normal normal normal 12px/1 'Material Icons';
        content: '\e145';
      }
    }

    ::ng-deep .jsontree_node_expanded > .jsontree_label-wrapper > .jsontree_label > .jsontree_expand-button {
      background: transparent;
      background-image: none;

      &:before {
        content: '\e15b';
      }
    }

    ::ng-deep .jsontree_child-nodes {
      margin-bottom: 0;
      padding: 0;
      list-style: none;
      margin-left: 18px;
    }

    ::ng-deep .jsontree_value_string, .jsontree_value_number, .jsontree_value_boolean  {
      color: $chef-primary-dark;
    }
  }

  ::ng-deep .jsontree_label {
    color: $chef-primary-bright;
    font-size: 12px;
  }

  ::ng-deep > .jsontree_tree > .jsontree_node > .jsontree_value-wrapper > .jsontree_value > b {
    display: none;
  }

  ::ng-deep .highlight {
    background-color: lighten($chef-yellow, 28%);
    border-radius: 3px;
    padding: 3px;
  }
}

::ng-deep .jsontree_bg {
  background: $chef-white;
}

/* Styles for the container of the tree (e.g. fonts, margins etc.) */
::ng-deep .jsontree_tree {
  margin-left: 30px;
  font-family: 'PT Mono', monospace;
  font-size: 12px;
}

/* Styles for a list of child nodes */
::ng-deep .jsontree_child-nodes {
  display: none;
  margin-left: 35px;
  margin-bottom: 5px;
  line-height: 2;
}

::ng-deep .jsontree_node_expanded > .jsontree_value-wrapper > .jsontree_value > .jsontree_child-nodes {
  display: block;
}

/* Styles for labels */
::ng-deep .jsontree_label-wrapper {
  float: left;
  margin-right: 8px;
}

::ng-deep .jsontree_label {
  font-weight: normal;
  vertical-align: top;
  color: #000;
  position: relative;
}

/* Styles for values */
::ng-deep .jsontree_value-wrapper {
  display: block;
  overflow: hidden;
}

::ng-deep .jsontree_node_complex > .jsontree_value-wrapper {
  overflow: inherit;
}

::ng-deep .jsontree_value {
  display: inline;
  vertical-align: top;
}

::ng-deep .jsontree_value_null {
  color: #777;
  font-weight: bold;
}

::ng-deep .jsontree_value_string {
  color: #025900;
  font-weight: bold;
}

::ng-deep .jsontree_value_number {
  color: #000E59;
  font-weight: bold;
}

::ng-deep .jsontree_value_boolean {
  color: #600100;
  font-weight: bold;
}

/* Styles for active elements */
::ng-deep .jsontree_expand-button {
  display: block;
  position: absolute;
  top: 5px;
  left: -15px;
  width: 9px;
  height: 9px;
  background: #777;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUBFAsKjLIEkwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAQElEQVQI14WPyw0AMAhCrenOMAJb24OHNvb3ThiFYIsIkrYhyQDECQC+3pYAtzu9OFJImrscSKb4Z3rtvdAe/w3I7C/CeujfAgAAAABJRU5ErkJggg==");
}

::ng-deep .jsontree_node_expanded > .jsontree_label-wrapper > .jsontree_label > .jsontree_expand-button {
  background: $chef-white;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUBFAwe2SlGKQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAARUlEQVQI132PwQ3AMAwCjdWd8QhMbfrIo1Ga5D4IYYEM21UVPyQFSe8gmfOt7dlmnHmGLJOSvmyY7s7MfSeA496S4fLfC/74Ll1MLvV+AAAAAElFTkSuQmCC");
}

::ng-deep .jsontree_show-more {
  cursor: pointer;
}

::ng-deep .jsontree_node_expanded > .jsontree_value-wrapper > .jsontree_value > .jsontree_show-more {
  display: none;
}

::ng-deep .jsontree_node_empty > .jsontree_label-wrapper > .jsontree_label > .jsontree_expand-button,

::ng-deep .jsontree_node_empty > .jsontree_value-wrapper > .jsontree_value > .jsontree_show-more {
  display: none;
}

::ng-deep .jsontree_node_complex > .jsontree_label-wrapper > .jsontree_label {
  cursor: pointer;
}

::ng-deep .jsontree_node_empty > .jsontree_label-wrapper > .jsontree_label {
  cursor: default;
}
