@import "../../../assets/less/variable";

.filtersComponent {
  width: 100%;
  height: 100%;
  // padding-bottom: 40px;
  position: relative;

  .buttons {
    position: absolute;
    right: 0;
    bottom: 0;

    button {
      margin-left: 8px;
    }
  }
}

.filterFormComponent {
  width: 100%;
  height: 100%;
  overflow: auto;

  .empty {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
  }

  .filterBlock {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .filterRel {
    width: 105px;
    margin: 0 5px;
    flex-shrink: 0;
    position: relative;

    &:after{
      width: 10px;
      height: 0;
      border-top: 1px solid @primary-color;
      position: absolute;
      top: 50%;
      right: -10px;
      content: '';
    }
  }

  .filterList {
    padding-left: 5px;
    margin-left: 5px;
    border-left: 1px solid @primary-color;
    display: flex;
    flex-direction: column;
  }

  .filterItem {
    padding: 4px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;

    & > *:not(.filterBlock) {
      margin: 0 4px;
    }

    &:before {
      width: 10px;
      height: 0;
      border-top: 1px solid @primary-color;
      position: absolute;
      top: 50%;
      left: -5px;
      content: '';
    }

    &.root:before {
      width: 0;
      display: none;
    }

    &.noPadding {
      padding: 0;
    }

    &:first-child,
    &:last-child {
      &:after {
        width: 3px;
        background-color: @white-bg;
        position: absolute;
        left: -7px;
        content: '';
      }
    }

    &:first-child {
      &:after {
        height: 50%;
        top: 0;
      }
    }

    &:last-child {
      &:after {
        height: 50%;
        bottom: -1px;
      }
    }
  }

  .filterFormItem {
    margin-bottom: 0 !important;

    .inputNumber {
      width: 100%;
    }
  }

  .filterFormKey {
    min-width: 100px;
  }

  .filterFormOperator {
    min-width: 100px;
  }
}
