@root-entry-name: 'default';
@import (reference) '~antd/es/style/themes/index.less';

.pro-edit-table {
  .pro-edit-table-tooltip {
    display    : inline-flex;
    align-items: center;

    .icon-tip {
      height        : 16px;
      margin-left   : var(--zaui-space-size-xs, 4px);
      > div {
        height        : 16px;
        svg {
          width         : 16px;
          height        : 16px;
          fill          : var(--zaui-aide-text, #909090);
        }
      }
      svg {
        width         : 16px;
        height        : 16px;
        fill          : var(--zaui-aide-text, #909090);
      }
    }
  }

  .com-empty {
    text-align: center;

    .img {
      width : 80px;
      height: 80px;
    }

    .content {
      display: flex;
      justify-content: center;
      margin-top: var(--zaui-space-size-md, 16px);

      .@{ant-prefix}-btn-link {
        padding: 0;
      }
    }
  }

  .is-hidden {
    position: absolute;
    left    : -9999px;
  }


  .is-cell .@{ant-prefix}-form-item .@{ant-prefix}-form-item-row .@{ant-prefix}-form-item-control .@{ant-prefix}-form-item-control-input {
    border: 1px solid transparent;

    &:hover {
      border       : 1px solid #DEE0E3;
      border-radius: var(--zaui-border-radius, 4px);
      text-indent  : 5px;
    }
  }

  .drag-wrapper {
    display: flex;
    .drag-icon {
      margin-right: var(--zaui-space-size-xs, 4px);
      cursor: pointer;
    }
  }

  &.pro-table-no-stripe {
    .@{ant-prefix}-table-tbody tr:nth-child(n)>td {
      background-color: var(--zaui-base-bg, #fff);
    }
  }

  .@{ant-prefix}-space {
    gap: var(--zaui-space-size-sm, 8px);

    .@{ant-prefix}-btn-link {
      padding: 0 var(--zaui-space-size-xs, 4px);

      &:first-child {
        padding-left: 0;
      }
    }
  }

  .@{ant-prefix}-table-header>table .@{ant-prefix}-table-thead>tr>th.@{ant-prefix}-table-selection-column {
    padding-left: var(--zaui-space-size-md, 16px);
    padding-right: var(--zaui-space-size-md, 16px);
  }

  .@{ant-prefix}-table-header>table .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
    &::after {
      content: "";
    }

    &.is-required-left {
      &::before {
        content: "";
      }
    }
    .pro-edit-table-title {
      &::after {
        width: auto;
        position   : static;
        top        : 0;
        display    : inline-block;
        margin-left: var(--zaui-space-size-xs, 4px);
        color      : #ff5050;
        font-size  : 14px;
        line-height: 1;
        content    : "*";
      }

      &.is-required-left {
        &::after {
          display: none;
        }

        &::before {
          position   : static;
          top        : 0;
          display    : inline-block;
          text-indent: -8px;
          color      : #ff5050;
          font-size  : var(--zaui-font-size-md, 14px);
          line-height: 1;
          content    : "*";
        }
      }
    }
  }

  .@{ant-prefix}-table-scroll-horizontal {
    .@{ant-prefix}-table-cell-fix-right-first {
      &::after {
        box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
      }
    }
  }

  .@{ant-prefix}-table-content {
    >table {
      .@{ant-prefix}-table-summary {
        background-color: var(--zaui-table-header-bg, #f2f3f5);
        color           : var(--zaui-text, #343434);
        font-weight     : 600;

        .@{ant-prefix}-table-cell-fix-left,
        .@{ant-prefix}-table-cell-fix-right {
          background-color: var(--zaui-table-header-bg, #f2f3f5);
          
        }
      }

      th.@{ant-prefix}-table-selection-column {
        width: 48px;
      }

      td {
        .pro-form-view-container_nowrap {
          white-space: normal;
        }
      }

      .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
        &::after {
          content: "";
        }

        &.is-required-left {
          &::before {
            content: "";
          }
        }
        .pro-edit-table-title {
          &::after {
            width: auto;
            position   : static;
            top        : 0;
            display    : inline-block;
            margin-left: var(--zaui-space-size-xs, 4px);
            color      : #ff5050;
            font-size  : var(--zaui-font-size-md, 14px);
            line-height: 1;
            content    : "*";
          }

          &.is-required-left {
            &::after {
              display: none;
            }

            &::before {
              position   : static;
              top        : 0;
              display    : inline-block;
              text-indent: -8px;
              color      : #ff5050;
              font-size  : var(--zaui-font-size-md, 14px);
              line-height: 1;
              content    : "*";
            }
          }
        }
      }
    }
  }

  .@{ant-prefix}-table-cell {
    .@{ant-prefix}-form-item {
      margin-bottom: 0px !important;
    }
  }

  .@{ant-prefix}-table.@{ant-prefix}-table-bordered>.@{ant-prefix}-table-container {
    border: 0;
  }

  .@{ant-prefix}-table-thead>tr>th {
    border          : 0;
    white-space     : nowrap;
    background-color: var(--zaui-table-header-bg, #f2f3f5);
  }

  .@{ant-prefix}-table-thead>tr>th:not(:last-child):not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan])::before {
    height: 0;
  }

  .@{ant-prefix}-table-tbody>tr:not(.@{ant-prefix}-table-placeholder)>td {
    border-bottom: 0;
    border-right : 0;
    border-top   : 0;
  }

  .@{ant-prefix}-table-tbody>.is-editing:not(.@{ant-prefix}-table-measure-row)>td {
    border-bottom : 0;
    vertical-align: top;
  }

  .@{ant-prefix}-table-tbody tr:nth-child(n)>td {
    background-color: var(--zaui-base-bg, #ffffff);
  }

  .@{ant-prefix}-table-tbody tr:nth-child(2n)>td {
    background-color: var(--zaui-table-strip-bg, #FAFAFA);
  }

  .@{ant-prefix}-table-tbody>.@{ant-prefix}-table-placeholder>td {
    background-color: var(--zaui-base-bg, #ffffff);
  }

  .@{ant-prefix}-table-tbody {

    >tr:hover:not(.@{ant-prefix}-table-expanded-row)>td,
    .@{ant-prefix}-table-row-hover,
    .@{ant-prefix}-table-row-hover>td {
      background: #FAFAFA;
    }
    >tr:hover:not(.@{ant-prefix}-table-placeholder)>td,
    .@{ant-prefix}-table-row-hover,
    .@{ant-prefix}-table-row-hover>td {
      background: #FAFAFA;
    }
  }

  .@{ant-prefix}-table-fixed {

    .@{ant-prefix}-table-row-hover,
    .@{ant-prefix}-table-row-hover>td {
      background: #FAFAFA;
    }
  }

  .@{ant-prefix}-table-fixed-header {
    .@{ant-prefix}-table-tbody tr:nth-child(n)>td {
      background-color: #FAFAFA;
    }

    .@{ant-prefix}-table-tbody tr:nth-child(2n)>td {
      background-color: var(--zaui-base-bg, #ffffff);
    }
  }

  .@{ant-prefix}-table-summary>tr>td {
    border-bottom: none;
  }

  .@{ant-prefix}-table-pagination {
    .@{ant-prefix}-pagination-options {
      .@{ant-prefix}-select.@{ant-prefix}-select-in-form-item {
        width: auto;
      }
    }
  }

  .is-new-row, .is-new-row.@{ant-prefix}-table-row:hover {
    td, .@{ant-prefix}-table-cell-row-hover {
      background: var(--ant-primary-2) !important;
    }
  }
}

.pro-edit-table-header {
  margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
}

.pro-edit-table-toolbar-fixed {
  position: absolute;
  bottom: var(--zaui-space-size-md, 16px);
}

.pro-edit-table-toolbar {
  margin-top: var(--zaui-space-size-md, 16px);
  .@{ant-prefix}-space {
    gap: var(--zaui-space-size-sm, 8px);

    .@{ant-prefix}-space-item {
      .@{ant-prefix}-btn-link {
        display: flex;
        align-items: center;
        padding: 0 var(--zaui-space-size-xs, 4px);

        &:first-child {
          padding-left: 0;
        }

        span:nth-child(2) {
          margin-left: var(--zaui-space-size-xs, 4px);
        }
      }
    }
  }
}

.pro-edit-table-drag {
  table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
    text-align: right;
  }
}
