:root,
.neeto-ui-theme--light,
.neeto-ui-theme--dark {
  --neeto-ui-table-header-font-size: 0.8125rem;
  --neeto-ui-table-header-font-weight: 600;
  --neeto-ui-table-header-text-transform: uppercase;
  --neeto-ui-table-header-border-bottom-width: 1px;
  --neeto-ui-table-resize-handle-width: 10px;
  --neeto-ui-table-resize-handle-hover-bg-color: rgb(var(--neeto-ui-gray-300));
}

.ant-table-wrapper {
  .ant-table {
    font-size: 0.875rem;
  }
  table {
    font-family: var(--neeto-ui-body-font-family) !important;
    thead {
      tr {
        th {
          font-size: var(--neeto-ui-table-header-font-size);
          font-weight: var(--neeto-ui-table-header-font-weight) !important;
          text-transform: var(--neeto-ui-table-header-text-transform);
          border-bottom-width: var(
            --neeto-ui-table-header-border-bottom-width
          ) !important;

          .ant-table-column-sorters {
            .ant-table-column-title {
              flex-grow: 0;
              flex-shrink: 0;
              flex-basis: auto;
              max-width: calc(100% - 20px);
            }
            justify-content: flex-start !important;
            gap: 8px;

            .ant-table-column-sorter-inner {
              .anticon-caret-up {
                opacity: 0;
                visibility: hidden;

                &.active {
                  opacity: 1;
                  visibility: visible;
                  position: relative;
                  top: 4px;
                }
              }

              .anticon-caret-down {
                opacity: 0;
                visibility: hidden;

                &.active {
                  opacity: 1;
                  visibility: visible;
                  position: relative;
                  top: -4px;
                }
              }
            }
          }
        }

        th.ant-table-cell.ant-table-column-has-sorters {
          cursor: auto;
        }

        [data-text-align="center"] {
          .ant-table-column-sorters {
            justify-content: center !important;
          }
        }

        [data-text-align="right"] {
          .ant-table-column-sorters {
            justify-content: flex-end !important;
          }
        }
      }
    }
  }
}

.react-resizable {
  position: relative;
  background-clip: padding-box;
}

.react-resizable-handle {
  position: absolute;
  width: var(--neeto-ui-table-resize-handle-width);
  height: 100%;
  bottom: 0;
  right: -5px;
  cursor: col-resize;
  z-index: 1;
}

.react-resizable-handle:hover {
  background-color: var(--neeto-ui-table-resize-handle-hover-bg-color);
}

.neetix-table {
  --neeto-ui-table-header-font-size: var(--neeto-ui-text-sm);
  --neeto-ui-table-header-text-transform: capitalize;
}

.ant-table-wrapper {
  .ant-table-cell {
    .neeto-ui-btn--icon-only {
      flex-shrink: 0;
    }
    .neeto-ui-btn--style-link {
      white-space: normal;
      text-align: left;
    }
  }
}

.neeto-ui-table__column-description {
  width: 288px;
}
