@import '../../style/themes/index';
@divider-prefix-cls: ~'@{gantt-prefix}-divider';

.@{divider-prefix-cls} {
  position: absolute;
  top: 0;
  bottom: 0;
  cursor: col-resize;

  &:hover {
    hr {
      border-color: #3b88f4;

      &:before {
        background: #3b88f4;
      }
    }

    .@{divider-prefix-cls}-icon-wrapper {
      background-color: #3b88f4;
      border-color: #3b88f4;
      border-top: 0;
      border-bottom: 0;
      cursor: pointer;

      &:after {
        content: '';
        right: -3px;
        position: absolute;
        width: 2px;
        height: 30px;
        background-color: transparent;
      }

      .@{divider-prefix-cls}-arrow:after,
      .@{divider-prefix-cls}-arrow:before {
        background-color: #fff;
      }
    }
  }

  & > hr {
    margin: 0;
    height: 100%;
    width: 0;
    border: none;
    border-right: 1px solid transparent;
  }

  & > &-icon-wrapper {
    position: absolute;
    left: 1px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 30px;
    border-radius: 0 4px 4px 0;
    border: 1px solid #f0f0f0;
    border-left: 0;
    background-color: #fff;
  }

  &-arrow:before {
    bottom: -1px;
    transform: rotate(30deg);
  }

  &-arrow:after {
    top: -1px;
    transform: rotate(-30deg);
  }

  &-arrow:after,
  &-arrow:before {
    content: '';
    display: block;
    position: relative;
    width: 2px;
    height: 8px;
    background-color: #bfbfbf;
    border-radius: 1px;
  }

  &-arrow&-reverse:before {
    transform: rotate(-30deg);
  }

  &-arrow&-reverse:after {
    transform: rotate(30deg);
  }
}

.@{divider-prefix-cls}_only > hr:before {
  content: '';
  position: absolute;
  border-top: 7px solid white;
  border-bottom: 7px solid white;
  background: #a7add0;
  z-index: 2;
  height: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
}

.@{divider-prefix-cls}_only > hr {
  border-color: #a7add0;
}
