@use 'mixins/mixins' as *;
@use 'common/var' as *;

@include b(resizable-columns) {
  height: 100%;
  width: 100%;
  position: relative;

  @include b(resizable-column) {
    height: 100%;
    position: absolute;
    /* 很重要 */
    overflow: hidden;
  }

  .resizer {
    position: absolute;
    background-color: #D4D7DE;
    height: 100%;
    width: 1px;
    z-index: 1;
    cursor: ew-resize;

    &.collapsed {
      cursor: auto;
    }

    .left, .right {
      position: absolute;
      top: calc(50% - 12px);
      padding: 2px 1px;
      z-index: 1001;
      color: getCssVar('color-primary');
      box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    }

    .left {
      right: 1px;
      border-bottom-right-radius: 0;
      border-top-right-radius: 0;
      border-right: none;
    }

    .right {
      left: 1px;
      margin-left: 0;
      border-bottom-left-radius: 0;
      border-top-left-radius: 0;
      border-left: none;
    }
  }

  .resizer::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    width: 100%;
    transform: translateX(-50%);
    min-width: 12px !important;
    z-index: 1000;
  }
}
