@import './token.less';

@edit-table-prefix-cls: ~'@{prefix}-edit-table';

.@{edit-table-prefix-cls} {
  &.arco-table-size-large,
  &.arco-table-size-medium,
  &.arco-table-size-small {
    .@{edit-table-prefix-cls}-edit-td {
      .arco-table-cell {
        min-height: 22px;
      }
    }
  }

  &.arco-table-size-mini {
    .@{edit-table-prefix-cls}-edit-td {
      .arco-table-cell {
        min-height: 19px;
      }
    }
  }

  &-edit-td {
    &-bg.arco-table-td {
      background-color: rgb(var(--orange-1)) !important;
    }
    &-is-error.arco-table-td {
      background-color: rgb(var(--red-1)) !important;
      &:hover {
        background-color: rgb(var(--red-2)) !important;
      }
    }
    &-active.arco-table-td {
      &,
      &:hover {
        background-color: rgb(var(--color-bg-2)) !important;
      }
    }
    &-active.arco-table-td,
    &:hover {
      position: relative;
      z-index: 999;
      // box-shadow: 0 0 1px 1px rgb(var(--primary-6));
      &::after {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 10;
        border: 2px solid rgb(var(--primary-6));
        content: '';
        pointer-events: none;
      }
    }
  }

  &-cell-spin {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding-right: 12px;
    line-height: 1;
    background-color: var(--color-spin-layer-bg);
  }
}

@input-editor-prefix-cls: ~'@{prefix}-input-editor';

.@{input-editor-prefix-cls} {
  &.arco-input-wrapper,
  & .arco-input-wrapper {
    padding-right: 16px;
    padding-left: 16px;
  }

  &.arco-input-wrapper {
    background-color: inherit !important;
    border: none !important;
  }

  &.arco-input-outer {
    .arco-input-wrapper {
      background-color: inherit !important;
      border: none !important;
    }

    .arco-input-append,
    .arco-input-prepend {
      background-color: inherit;
      border-right: none;
      border-left: none;
    }
  }
}

@number-editor-prefix-cls: ~'@{prefix}-number-editor';

.@{number-editor-prefix-cls} {
  &.arco-input-wrapper,
  & .arco-input-wrapper {
    padding-right: 16px;
    padding-left: 16px;
  }

  &.arco-input-wrapper {
    background-color: inherit !important;
    border: none !important;
  }

  &.arco-input-outer {
    .arco-input-wrapper {
      background-color: inherit !important;
      border: none !important;
    }

    .arco-input-append,
    .arco-input-prepend {
      background-color: inherit;
      border-right: none;
      border-left: none;
    }
  }
}

@select-editor-prefix-cls: ~'@{prefix}-select-editor';

.@{select-editor-prefix-cls} {
  &.arco-select-view-single {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@date-editor-prefix-cls: ~'@{prefix}-date-editor';

.@{date-editor-prefix-cls} {
  &.arco-picker-focused {
    background-color: inherit !important;
    border: none !important;
  }
  &.arco-picker {
    width: 100%;
    input {
      padding-left: 12px;
    }
  }
}
