@use "@befe/brick-style/src/themes/base";

.brick-table {
  // Table 滚动条保留「可见（近原生）轨道」：覆盖 reset() 默认的透明轨道为浅灰，仍 thin + 统一灰滑块。
  // 先试 color-gray(3)(#F5F5F5)，接近原生轨道；待眼看定。
  // 用后代选择器 `.brick-table .brick-table-xxx`（特异性 0,2,0）稳压 reset 的 `.brick-table *`（0,1,0），
  // 不赌源序（实测单类 `&-main-body-wrap` 与 `.brick-table *` 等特异性，bundle 里 reset 反而靠后会盖掉覆盖）。
  // 覆盖 Table 全部滚动容器：主体 + fixedHead 的表头/固定列内层（后两者 overflow:scroll，见 _fixed.scss）。
  // 这些后代本已被 Table 自己 reset() 的 `.brick-table *` 命中（拿到默认透明轨道），只是默认 track 透明看不见；
  // 非「继承自祖先」——改可见 gray-3 必须整条重写 scrollbar-color（shorthand 无法只改 track）。
  & &-head-wrap-inner,
  & &-fixed-body-wrap-inner,
  & &-main-body-wrap {
    @include base.scrollbar($track: base.color-gray(3));
  }

  &-normal-scrollbar {
    &.brick-table-scroll-x-position-leave-right,
    &.brick-table-scroll-x-position-leave-left,
    &.brick-table-with-fixed-head.brick-table-with-fixed-head {
      .brick-table-main-body-wrap > table tbody tr:last-child td {
        border-bottom: none;
      }
    }
    &.brick-table-with-fixed-head.brick-table-with-fixed-head {
      .brick-table-head-wrap-inner > table thead tr:first-child th:last-child,
      .brick-table-main-body-wrap > table tbody td:last-child {
        border-right: none;
      }
    }
  }

}
