:host {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.readonly {
  pointer-events: none;
}

.chart-container {
  position: relative;
}

.box {
  cursor: move;
  user-select: none;

  position: absolute;
  z-index: 2;

  overflow: hidden;

  min-width: 100px;
  min-height: 100px;

  opacity: 0.9;
  border: 2px solid var(--color-gray-888);
  border-radius: 6px;

  &:not(.circle) .node {
    margin-top: 25px;
    padding-bottom: 12px;
  }

  &.circle {
    width: 50px;
    height: 50px;
    text-align: center;
    border-radius: 100%;

    .node {
      padding-right: 12px;
    }

    .ep {
      position: absolute;

      width: 10px;
      height: 10px;

      visibility: hidden;
      border-radius: 50%;
    }
  }

  &.jtk-drag-hover {
    outline: 2px solid blue;
  }
}

.ep {
  cursor: grab;
  user-select: none;

  position: absolute;
  z-index: 4;
  top: 5px;
  right: 5px;

  width: 20px;
  height: 20px;
  padding: 0;

  color: #48c038;

  border: 2px solid var(--color-gray-888);
  border-radius: 6px;
}

.ep-disabled {
  pointer-events: none;
  cursor: inherit;
  user-select: none;
  visibility: hidden;
}

.node {
  cursor: move;

  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  height: 100%;
  margin: 0 auto;
  padding: 12px;
  padding-right: 32px;

  font-weight: 600;

  background-clip: border-box;

  transition: background-color 0.3s ease;
}

.node-start {
  cursor: move;

  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 60px;
  height: 60px;
  padding: 12px;

  font-weight: 600;
  color: #fff;

  background-color: #456;
  border-radius: 100%;

  transition: background-color 0.3s ease;
}

/* Нг-дип нужен, чтобы не вешать стили на транзишен */
:host ::ng-deep .n2n-transition {
  cursor: pointer;
  user-select: none;

  z-index: 2;

  max-width: 100px;
  margin: 0 auto;
  padding: 4px;

  font-size: 9pt;
  line-height: 10pt;
  color: #456;

  background: var(--color-gray-fff);
  border: 1px solid #456;
  border-radius: 6px;

  transition: background-color 0.3s ease;

  &:hover {
    z-index: 3;
    background-color: whitesmoke;
  }
}

:host ::ng-deep .jtk-endpoint-connected {
  z-index: 9000;
}

.widget-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;

  padding-top: 10px;
}

:host ::ng-deep .endpoint {
  z-index: 2;
}
