@import "./vars.less";

body {
  height: 100%;
  overflow-y: hidden;
  background-color: #F4F6FA;
}

hr {
  border: none;
  background: #F4F6FA;
  height: 2px;
}

::-webkit-scrollbar-thumb {
  //background-color: #e6e6e6;
  background-color: #e9e9e9;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

:global {
  .ant-cascader-picker {
    width: 100%;
  }

  .ant-modal-wrap {
    z-index: 1000;
  }

  .ant-modal-mask {
    z-index: 1000;
    background-color: rgba(55, 55, 55, 0.2);
  }

  .ant-breadcrumb {
    & > span {
      &:last-child {
        color: #999;
        font-weight: normal;
      }
    }
  }

  .ant-breadcrumb-link {
    .anticon + span {
      margin-left: 4px;
    }
  }

  .ant-checkbox-disabled + span {
    color: black;
  }

  // .ant-select-selection,
  // .ant-input {
  //   border-color: @input-line-color;
  // }

  .ant-table {

    .ant-table-body {
      //&::-webkit-scrollbar-thumb {
      //  //background-color: #e6e6e6;
      //  background-color: #7F7F7F !important;
      //}
      //
      //&::-webkit-scrollbar {
      //  width: 12px;
      //  height: 12px;
      //}
    }

    //.ant-table-row:nth-of-type(odd) {
    //background-color: #f2f2f2;
    //}
    .ant-table-fixed > colgroup {
      col:first-child, col:nth-child(2) {
        width: 1%;
      }
    }

    .ant-radio-wrapper, .ant-checkbox-wrapper, .ant-table-row-expand-icon {
      -ms-transform: scale(1.3); /* IE 9 */
      -webkit-transform: scale(1.3); /* Chrome, Safari, Opera */
      transform: scale(1.3);
    }

    .ant-table-tbody > tr.table-stripe-odd > td {
      background-color: #f2f2f2;
    }

    .ant-table-tbody > tr > td.alignLeft {
      text-align: left;
    }

    .ant-table-tbody > tr > td.alignRight {
      text-align: right;
      white-space: nowrap;
    }

    .ant-table-tbody > tr > td.noWrap {
      white-space: nowrap;
    }

    .ant-table-tbody > tr > td.alignCenter {
      text-align: center;
    }

    .ant-table-tbody > tr:hover > td {
      background: @primary-1;
    }

    .ant-table-tbody > tr.ant-table-row-hover > td {
      background: @primary-1;
    }

    .ant-table-thead > tr > th {
      text-align: center;

      border-right: 1px solid #e8e8e8;

      // border-right: 1px solid @table-line-color;
      // border-top: 1px solid @table-line-color;
      // border-bottom: 1px solid @table-line-color;
      //background: #f7f7f7 !important;

      padding: 6px;

      &:first-child {
        // border-left: 1px solid @table-line-color;
      }
    }

    .ant-table-thead > tr > th > span {
      //white-space: nowrap;
    }

    .ant-table-tbody > tr > td {
      border-right: 1px solid #e8e8e8;

      // border-bottom: 1px solid @table-line-color;

      &:first-child {
        // border-left: 1px solid @table-line-color;
      }

      cursor: pointer;
      text-align: center;
      //white-space: nowrap;
    }

    &.ant-table-small {
      .ant-table-thead > tr > th {
        background: #dddddd !important;
      }
    }
  }

  .ant-table-pagination {
    float: none !important;
    display: table;
    margin: 6px auto 0 auto !important;
  }

  .ant-popover-inner {
    border: none;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(100, 100, 100, 0.2);
  }

  /* use css to set position of modal */
  .vertical-center-modal {
    text-align: center;
    //white-space: nowrap;
    .ant-modal {
      top: 1vh;
      display: inline-block;
      vertical-align: middle;
      //top: 0;
      text-align: left;

      .ant-modal-body {
        max-height: 80vh;
        overflow-y: auto;
        padding: 12px;
      }
    }
  }

  .vertical-center-modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    width: 0;
  }

  .ant-form-item {
    margin-bottom: 0px;
  }

  .ant-form-item-with-help {
    margin-bottom: 0;
  }

  .ant-form-explain {
    margin-top: -2px;
    font-size: 10px;
    line-height: 1;
  }

  .ant-form-item-control {
    vertical-align: middle;
  }

  .ant-modal-content {
    box-shadow: none;
  }

  .ant-card {
    box-shadow: @shadow-12;
    margin-bottom: 16px;

    &:hover {
      overflow: auto;
    }

    .ant-card-body {
      padding: 24px;
    }
  }

  .ant-card-wider-padding .ant-card-head {
    padding: 0 20px;
  }

  .ant-card-wider-padding .ant-card-body {
    padding: 16px 16px;
  }

  .ant-card-head {
    min-height: 40px
  }

  .ant-card-head-title {
    padding: 8px 0;
  }

  .ant-select-dropdown-menu-item {
    padding: 12px 16px !important;
  }

  .margin-right {
    margin-right: 16px;
  }

  // .ant-checkbox-wrapper {
  //   padding: 10px 2px;
  // }

  a:focus {
    text-decoration: none;
  }
}

@media (min-width: 1600px) {
  :global {
    .ant-col-xl-48 {
      width: 20%;
    }

    .ant-col-xl-96 {
      width: 40%;
    }
  }
}

@media (max-width: 767px) {
  :global {
    .ant-card {
      .ant-card-head {
        padding: 0 12px;
      }

      .ant-card-body {
        padding: 12px;
      }
    }
  }
}
