@import '../../mixins/config.less';
@ad: ~'@{ns}-ui-adaptation';

.ant-form {
  .ant-form-item {
    // label style
    label {
      font-weight: normal;

      svg {
        color: #0070ff;
      }
    }
  }

  .ant-form-item-control {
    padding-left: 0;
    // error style
    .ant-form-item-explain-error {
      font-size: 12px;
    }
    // Radio style
    // .ant-radio-wrapper .ant-radio {
    //   &.ant-radio-checked {
    //     .ant-radio-inner {
    //       background-color: #ffffff;
    //       border-color: #0070ff;

    //       &::after {
    //         background-color: #0070ff;
    //       }
    //     }
    //   }
    // }
    // Select style
    // .ant-select {
    //   &.ant-select-disabled {
    //     .ant-select-selector {
    //       color: #526a90;
    //       background-color: #f2f6f9;
    //     }
    //   }
    // }
  }
}

// placeholder style
.ant-input::placeholder {
  color: #abb7cc;
}

.ant-select .ant-select-selection-placeholder {
  color: #abb7cc;
}

.ant-picker .ant-picker-input > input::placeholder {
  color: #abb7cc;
}

.ant-input-number .ant-input-number-input-wrap > input::placeholder {
  color: #abb7cc;
}

// input disabled styles
// input.ant-input[disabled] {
//   color: #526a90;
// }

// span.ant-input-affix-wrapper-disabled {
//   background-color: #f2f6f9;
// }

// 兼容 table 里面 过滤器样式
// 新增对sticky表格的样式类型
div[class$='-basic-table-form-container'],
div[class$='-basic-table-form-container ap-table--sticky'] {
  form[class$='-basic-form--compact'] {
    .ant-form-item {
      margin-bottom: 16px;

      /** 适配Aplus UI */
      &.@{ad} {
        border: 1px solid #dee4ed;
        border-radius: 4px;

        .ant-form-item-label {
          padding-left: 12px;

          label {
            height: 30px;
            color: #182948;
          }
        }

        .ant-form-item-control-input {
          min-height: 30px;
          // Select Input InputNumber Picker
          .ant-select-selector,
          .ant-input-affix-wrapper,
          .ant-input-number,
          .ant-picker {
            height: 30px;
            border: none;
            border-color: #dee4ed;
            box-shadow: none;
          }

          .ant-input-number,
          .ant-picker {
            width: 100%;
          }
        }
      }
    }

    // 按钮布局调整
    div.ant-col[tableaction] {
      .ant-form-item-control-input-content {
        button.submit {
          margin-right: 0.5rem;
        }

        button.reset {
          margin-right: 0;
        }

        button.collapse {
          margin-left: 0.5rem;
        }
      }
    }
  }
}
