@font-face {
  font-family: 'PangMenZhengDao';
  src: url(/assets/fonts/PangMenZhengDao.ttf) format('truetype');
  font-weight: normal;
}
@font-face {
  font-family: 'AlibabaPuHuiTi-Heavy';
  src: url(/assets/fonts/AlibabaPuHuiTi-3-105-Heavy.ttf) format('truetype');
  font-weight: normal;
}

.font-pangmen {
  font-family: 'PangMenZhengDao';
}

.font-alibaba-heavy {
  font-family: 'AlibabaPuHuiTi-Heavy';
}

.v-font {
  font-family:
    v-sans,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol';
}

.pure-textarea {
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none;
  background-color: transparent;
  font-size: inherit;
}

.ant-btn > .anticon {
  vertical-align: baseline;
  svg {
    vertical-align: bottom;
    line-height: 22px;
  }
}

.custom-scroll-bar {
  &::-webkit-scrollbar {
    display: block;
    width: 8px;
    height: 8px;
  }
  &::-webkit-scrollbar-thumb {
    background: var(--custom-scrollbar-thumb-color);
    border-radius: 30px;
    box-shadow:
      inset 2px 2px 2px var(--custom-scrollbar-thumb-shadow-color),
      inset -2px -2px 2px var(--custom-scrollbar-thumb-shadow-color);
  }
  &::-webkit-scrollbar-track {
    background: transparent;
  }
}

.cdk-virtual-scrollable {
  .custom-scroll-bar();
}
.ant-dropdown-menu {
  .custom-scroll-bar();
}
.ant-picker-time-panel-column {
  .custom-scroll-bar();
}
textarea {
  .custom-scroll-bar();
}

.ant-tag-blue {
  color: var(--ant-primary-color);
  background: #e6f7ff;
  border-color: #a9c1ff;
}

.page-headline-font {
  font-weight: 500;
  font-size: 24px;
  color: #131523;
  text-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.5);
}

.precaution-button {
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  --ant-error-color: #f43f5e;
}
.precaution-secondary {
  border-radius: 4px;
  --ant-primary-color: #d9e4ff;
  --ant-primary-color-hover: #b2caff;
  --ant-primary-color-active: #839dfd;
  --ant-error-color: #ffd9d9;
  &.ant-btn-dangerous {
    color: #f43f5e;
  }
  &:hover,
  &:active {
    color: #1e5eff;
  }
  color: #1e5eff;
}

.precaution-danger {
  border-radius: 4px;
  --ant-primary-color: rgba(255, 7, 7, 0.22);
  --ant-primary-color-hover: rgba(255, 7, 7, 0.33);
  --ant-primary-color-active: rgba(255, 7, 7, 0.44);
  --ant-error-color: #ffd9d9;
  border-color: transparent !important;
  &.ant-btn-dangerous {
    color: rgba(255, 7, 7, 1);
  }
  &:hover,
  &:active {
    color: rgba(255, 7, 7, 1);
  }
  color: rgba(255, 7, 7, 1);
}

.precaution-green {
  border-radius: 4px;
  --ant-primary-color: #06a561;
  --ant-primary-color-hover: #1cbb76;
  --ant-primary-color-active: #06834d;
  &:hover,
  &:active {
    color: white;
  }
  color: white;
}

.precaution-panel {
  background: #ffffff;
  box-shadow: 0px 1px 4px 0px rgba(21, 34, 50, 0.08);
  border-radius: 4px;
  padding: 14px 24px 14px 24px;
  color: #333333;
}

.precaution-table {
  border-radius: 10px;
  .ant-table-title {
    padding: 0;
  }
  thead {
    border-radius: 10px;
    overflow: hidden;
    > tr {
      border-radius: 10px;
      overflow: hidden;

      > th {
        padding: 18px 18px;
        color: #7d8da6;
        font-weight: 500;
        border-bottom: 1px solid transparent;
        font-size: 16px;
        background-color: #f6f7fa;
        &::before {
          display: none;
        }
        &:last-child {
          border-top-right-radius: 10px !important;
        }
        &:first-child {
          border-top-left-radius: 10px !important;
        }
      }
    }
  }
  tbody {
    tr {
      td {
        color: rgba(22, 23, 54, 0.8);
        border-bottom: 1px solid rgba(151, 151, 151, 0.3);
        padding: 16px;
      }
      &:last-child {
        td {
          border-bottom: none;
        }
      }
    }
  }
  nz-pagination {
    .ant-pagination-item-active {
      border-color: transparent;
      background-color: #ecf2ff;
      border-radius: 4px;
    }
    .ant-pagination-prev {
      margin-right: 8px !important;
    }
    .ant-pagination-next {
      margin-left: 8px !important;
    }
  }
  .ant-table-body {
    .custom-scroll-bar();
  }
  .ant-table-content {
    .custom-scroll-bar();
  }
}

.precaution-input {
  border-color: #d9e1ec;
  border-radius: 4px;
  ::placeholder {
    color: #a1a7c4;
  }
}

.precaution-select {
  .ant-select-selector {
    border-color: #d9e1ec !important;
    border-radius: 4px !important;
  }
  .ant-select-arrow {
    color: #7e84a3;
  }
}

.precaution-pagination {
  .ant-pagination-item-active {
    border-color: transparent;
    background-color: #ecf2ff;
    border-radius: 4px;
  }
  .ant-pagination-prev {
    margin-right: 8px !important;
  }
  .ant-pagination-next {
    margin-left: 8px !important;
  }
}

.precaution-button-group {
  label {
    &:first-child {
      border-radius: 4px 0 0 4px;
    }
    &:last-child {
      border-radius: 0 4px 4px 0;
    }
  }
}

.precaution-select-dropdown {
  .ant-select-item {
    box-sizing: border-box;
    border: 1px solid transparent;
    padding: 4px 12px;
  }
  .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    background-color: var(--ant-primary-1);
    font-weight: normal;
  }
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    font-weight: normal;
    border: 1px solid #d7dbec;
    border-radius: 4px;
    color: var(--ant-primary-color);
  }

  .ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled),
  .ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled):hover {
    background-color: var(--ant-primary-1);
    border: 1px solid #d7dbec;
    font-weight: normal;
    border-radius: 4px;
    color: var(--ant-primary-color);
  }
  .ant-cascader-menu-item {
    box-sizing: border-box;
    border: 1px solid transparent;
    &:hover {
      background-color: var(--ant-primary-1);
    }
  }
}

.precaution-dropdown {
  .ant-dropdown-menu-item {
    &:hover {
      background-color: var(--ant-primary-1);
    }
  }
}
.precaution-modal {
  --ant-error-color: #ff0000;
  .ant-modal-header {
    border-radius: 8px 8px 0 0;
  }
  .ant-modal-content {
    border-radius: 8px;
  }
  .ant-modal-confirm-btns,
  .ant-modal-footer {
    .ant-btn {
      .precaution-button();
    }
  }
}

.rounded-alert {
  .ant-alert {
    border-radius: 4px;
  }
}
