/* antdv-next 组件库的一些样式重置 */

.ant-app {
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
  color: inherit;
}

.ant-app .ant-btn {
  height: var(--density-button-height) !important;
  padding-inline: 12px;
  font-size: var(--font-size-base);
}

.ant-btn {
  .anticon {
    display: inline-flex;
  }

  /* * 修复按钮添加图标时的位置问题 */
  > .ant-btn-icon {
    svg {
      display: inline-block;
    }

    svg + span {
      margin-inline-start: 6px;
    }
  }
}

.ant-app .ant-btn-sm {
  height: var(--density-button-sm-height) !important;
  padding-inline: 8px;
}

.ant-app .ant-btn-icon-only {
  width: var(--density-button-height) !important;
  padding-inline: 0;
}

.ant-app .ant-btn-sm.ant-btn-icon-only {
  width: var(--density-button-sm-height) !important;
}

.ant-table-wrapper .ant-table {
  font-size: var(--density-table-body-font-size);
}

.ant-table-wrapper .ant-table-thead > tr > th {
  height: var(--density-table-header-height);
  padding: 8px var(--density-table-cell-padding-x);
  font-size: var(--density-table-header-font-size);
}

.ant-table-wrapper .ant-table-tbody > tr > td {
  height: var(--density-table-row-height);
  padding: 3px var(--density-table-cell-padding-x);
}

.ant-pagination {
  font-size: var(--density-table-body-font-size);
}

.ant-pagination .ant-pagination-item,
.ant-pagination .ant-pagination-next,
.ant-pagination .ant-pagination-prev {
  min-width: var(--density-pagination-height);
  height: var(--density-pagination-height);
  line-height: calc(var(--density-pagination-height) - 2px);
}

.ant-pagination .ant-select-selector {
  min-height: var(--density-pagination-height) !important;
}

.ant-pagination .ant-select-single,
.ant-pagination .ant-select-single .ant-select-selector {
  height: var(--density-pagination-height) !important;
}

.ant-tag {
  > svg {
    display: inline-block;
  }

  > svg + span {
    margin-inline-start: 4px;
  }
}

.form-valid-error {
  /** select 选择器的样式 */

  .ant-select:not(.valid-success) {
    border-color: hsl(var(--destructive)) !important;
  }

  .ant-select-focused {
    box-shadow: 0 0 0 2px rgb(255 38 5 / 6%) !important;
  }

  /** 数字输入框样式 */
  .ant-input-number-focused {
    box-shadow: 0 0 0 2px rgb(255 38 5 / 6%);
  }

  /** 密码输入框样式 */
  .ant-input-affix-wrapper:hover {
    border-color: hsl(var(--destructive));
    box-shadow: 0 0 0 2px rgb(255 38 5 / 6%);
  }

  .ant-input:not(.valid-success) {
    border-color: hsl(var(--destructive)) !important;
  }
}

/** 区间选择器下面来回切换时的样式 */
.ant-app .form-valid-error .ant-picker-active-bar {
  background-color: hsl(var(--destructive));
}

/** 时间选择器的样式 */
.ant-app .form-valid-error .ant-picker-focused {
  box-shadow: 0 0 0 2px rgb(255 38 5 / 6%);
}
