/* ant-design-vue 组件库的一些样式重置 */

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

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

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

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

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

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

.ant-message-notice-content,
.ant-notification-notice {
  @apply dark:border-border/60 dark:border;
}

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

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

  .ant-select-focused .ant-select-selector {
    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%);
}

/** 全屏Modal样式 **/
.full-modal {
  .ant-modal {
    max-width: 100%;
    top: 0;
    padding-bottom: 0;
    margin: 0;
  }
  .ant-modal-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh);
  }
  .ant-modal-body {
    flex: 1;
  }
}

/** card 标签title 跟随card尺寸 **/
.ant-card-small {
  .ant-card-head {
    min-height: 38px;
    padding: 0 12px;
    
    .ant-card-head-title {
      font-size: 14px;
      padding: 6px 0;
      line-height: 1.5;
    }
    
    .ant-tabs {
      margin: 0 0 -2px 0;
      
      .ant-tabs-nav {
        margin-bottom: 0;

        &::before {
          border-bottom: 0;
        }
        
        .ant-tabs-tab {
          font-size: 14px;
          padding: 6px 0;
          margin: 0 16px 0 0;
        }
      }
    }
  }
}
