body {
  font-family: -apple-system, sans-serif;
}
.node-adder {
  position: absolute;
  box-sizing: border-box;
  z-index: 998;

  .adder-handle {
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 5px;
    border: 1px solid #aaa;
    background-color: #fdda31;
    cursor: pointer;

    &.handle-left {
      left: -5px;
      top: 50%;
      margin-top: -5px;
    }
    &.handle-top {
      top: -5px;
      left: 50%;
      margin-left: -5px;
    }
    &.handle-right {
      right: -5px;
      top: 50%;
      margin-top: -5px;
    }
    &.handle-bottom {
      bottom: -5px;
      left: 50%;
      margin-left: -5px;
    }

    &:hover::after {
      content: attr(data-title);
      position: absolute;
      bottom: 10px;
      left: -50px;
      background-color: rgba(0, 0, 0, 0.5);
      padding: .5em 1em;
      color: #fff;
      font-size: 12px;
      white-space: nowrap;
      border-radius: 4px;
      z-index: 99;
    }
  }
}

.node-editer {
  position: absolute;
  box-sizing: border-box;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;

  input {
    background: #fff;
    border: 0;
    width: 100%;
    text-align: center;
    line-height: 28px;
  }
}

.js-mind-dialog {
  display: block;
  position: fixed;
  top: 100px;
  bottom: 100px;
  left: 100px;
  right: 100px;
  text-align: left;
  background-color: #FFFFFF;
  border: 0;
  border-radius: 5px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  z-index: 999;
  animation: 0.3s modal-animate ease-out 1 forwards;

  .mind-dialog-header {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    line-height: 18px;
    font-weight: bold;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;

    .mind-dialog-close {
      cursor: pointer;
      z-index: 1;
      font-size: 14px;
      margin-top: 10px;
      font-family: inherit;
      display: block;
      width: 20px;
      height: 20px;
      font-size: 24px;
      line-height: 18px;
      text-align: center;
      color: #000;
      transition: all .3s ease-out;

      &:hover {
          transform: rotate(180deg);
      }
    }
  }
  .mind-dialog-body {
    width: 100%;
    height: 480px;
    padding: 20px;
    overflow-y: auto;
    background-color: #F4F4F4;
    box-sizing: border-box;
  }
}

.toolbar {
  position: fixed;
  left: 50%;
  top: 0;
  display: flex;
  justify-content: center;
  z-index: 9;
  user-select: none;

  ul {
    border: 1px #ddd solid;
    border-top: 0;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    list-style: none;
    display: flex;
    padding: 0 18px;

    li {
      height: 36px;
      width: 36px;
      text-align: center;
      line-height: 36px;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;

      &.tool-item {
        &.active, &:hover {
          // background-color: #f3f3f3;
          svg {
            path {
              fill: #888;
            }
          }
        }
        &.enabled {
          svg {
            path {
              fill: #888;
            }
          }
        }
      }

      svg {
        z-index: 0;
        path {
          fill: #ddd;
        }
      }

      &.item-btn {
        &:active {
          opacity: 0.8;
        }
        &:hover {
          cursor: pointer;
          svg {
            path {
              fill: #3982fc;
            }
          }
        }
      }

      &.tool-item:hover::after, &.tool-item:hover .help-info {
        position: absolute;
        display: inline-block;
        top: 110%;
        left: 0;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 0 1em;
        color: #fff;
        font-size: 12px;
        white-space: nowrap;
        border-radius: 4px;
      }

      &.tool-item:hover::after {
        content: attr(data-title);
      }

      &.tool-item .help-info {
        display: none;
        line-height: 1.5;
        padding: 1em !important;
        text-align: left;

        dt {
          font-weight: bold;
        }
      }

      &.opened {
        .pick-color, .setter {
          display: block;
        }
      }
    }

    .zoom-texter {
      font-size: 12px;
      padding: 0 .5em;
    }

    .pick-color, .setter {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      padding: 5px;

      div {
        display: flex;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: #fff;
        padding: 6px;
        min-width: 240px;

        p {
          padding-left: 10px;
          text-align: left;
        }

        label {
          font-size: 12px;
          white-space: nowrap;

          input {
            vertical-align: middle;
          }
        }

        span {
          display: block;
          width: 16px;
          height: 16px;
          margin: 1px;
          border-radius: 3px;
        }
      }
    }
  }
}
