@import "./NodeButtons/NodeButton.module.less";
@import "./NodeButtons/AddChildNodeButton/AddChildNodeButton.module.less";
@import "./NodeButtons/InsertParentButton/InsertParentButton.module.less";
@import "./NodeButtons/AddSiblingBeforeButton/AddSiblingBeforeButton.module.less";
@import "./NodeButtons/AddSiblingAfterButton/AddSiblingAferButton.module.less";
@import "./NodeButtons/AddWorkItemButton/AddWorkItemButton.module.less";
@import "./NodeButtons/DeleteButton/DeleteButton.module.less";

.nodeWrapper {
  display: inline-grid;
  grid-gap: 2px;
  min-width: 80px;
  max-width: 200px;

  &:hover {
    .amendHierarchyMenu {
      position: relative;
      display: inline-block;
      background-color: white;
    }
  }
  .nodeWrapperTop {
    display: flex;
    justify-content: center;
    grid-column: 2;
    grid-row: 1;
  }
  .nodeWrapperTopRight {
    grid-column: 3;
    grid-row: 1;
  }
  .nodeWrapperBottomRight {
    grid-column: 3;
    grid-row: 3;
  }
  .nodeWrapperLeft {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 1;
    grid-row: 2;
  }
  .nodeWrapperCenter {
    grid-column: 2;
    grid-row: 2;
  }
  .nodeWrapperRight {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 3;
    grid-row: 2;
  }
  .nodeWrapperBottom {
    display: flex;
    justify-content: center;
    grid-column: 2;
    grid-row: 3;
  }
}

.nodeBoxWrapper {
  text-align: left;
  position: relative;
  display: inline-flex;
  background-color: white;
  border-radius: 3px;
}

.nodeBox {
  padding: 3px 6px 3px 6px;
  //min-width: 0px; // seems to shrink when adding a non "fit in screen" node. solve that with styles in JS, calculating right width.
  /*   margin: 0 auto; */
  background-color: white;
  border-radius: 7px;
  border: 4px solid #4285f4;
  p {
    margin: 0px;
  }
  &:hover {
    border: 4px solid rgb(11, 182, 25);
  }
  &:focus {
    &:extend(.nodeBox:hover);
  }
}

.leafNode {
  &:extend(.nodeBoxWrapper);
  .nodeBox {
    border: 1px solid rgb(96, 152, 241);
    &:hover {
      box-shadow: 0px 0px 0px 2px rgb(11, 182, 25);
      border: 1px solid rgb(11, 182, 25);
    }
    &:focus {
      &:extend(.leafNode .nodeBox:hover);
    }
  }
}

.amendHierarchyMenu {
  // position: relative;
  // display: inline-block;
  // background-color: white;
  display: none;
}
