@import './index.less';

body {

  touch-action: none;
  font-size: 12px;
}

#app {
  height: 100%;

  &.colorWeak {
    filter: invert(80%);
  }

  &.userLayout {
    overflow: auto;
  }
}

.layout.ant-layout {
  height: auto;
  overflow-x: hidden;

  &.mobile,
  &.tablet {
    .ant-layout-content {
      .content {
        margin: 24px 0 0;
      }
    }

    /**
     * ant-table-wrapper
     * 覆盖的表格手机模式样式，如果想修改在手机上表格最低宽度，可以在这里改动
     */
    .ant-table-wrapper {
      .ant-table-content {
        overflow-y: auto;
      }

      .ant-table-body {
        min-width: 800px;
      }
    }

    .topmenu {

      /* 必须为 topmenu  才能启用流式布局 */
      &.content-width-Fluid {
        .header-index-wide {
          margin-left: 0;
        }
      }
    }
  }

  &.mobile {
    .sidemenu {
      .ant-header-fixedHeader {

        &.ant-header-side-opened,
        &.ant-header-side-closed {
          width: 100%;
        }
      }
    }
  }

  &.ant-layout-has-sider {
    flex-direction: row;
  }

  .trigger {
    font-size: 20px;
    line-height: 50px;
    padding: 0 24px;
    cursor: pointer;
    transition: color 0.3s;

    &:hover {
      background: rgba(0, 0, 0, 0.025);
    }
  }

  .topmenu {
    .ant-header-fixedHeader {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 9;
      width: 100%;
      transition: width 0.2s;

      &.ant-header-side-opened {
        width: 100%;
      }

      &.ant-header-side-closed {
        width: 100%;
      }
    }

    /* 必须为 topmenu  才能启用流式布局 */
    &.content-width-Fluid {
      .header-index-wide {
        max-width: unset;

        .header-index-left {
          flex: 1 1 950px;

          .logo {
            margin-left: 5px;
          }

          .ant-menu.ant-menu-horizontal {
            max-width: calc(100vw - 150px  - 250px);
            flex: 1 1 calc(100vw - 150px - 250px);
          }
        }

        .header-index-right {
          margin-right: 5px;
        }
      }

      .page-header-index-wide {
        max-width: unset;
      }
    }
  }
  .layout.ant-layout .topmenu.content-width-Fluid .header-index-wide .header-index-left .logo {
    margin-left: 0px !important;
}
  .sidemenu {
    .ant-header-fixedHeader {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 9;
      width: 100%;
      transition: width 0.2s;

      &.ant-header-side-opened {
        width: calc(100% - 256px);
      }

      &.ant-header-side-closed {
        width: calc(100% - 80px);
      }
    }
  }

  .header {
    height: 50px;
    padding: 0 12px 0 0;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: relative;
  }

  .header,
  .top-nav-header-index {
    .user-wrapper {
      float: right;
      height: 100%;

      .action {
        cursor: pointer;
        padding: 0 12px;
        display: inline-block;
        transition: all 0.3s;
        height: 100%;
        color: rgba(0, 0, 0, 0.65);

        &:hover {
          background: rgba(0, 0, 0, 0.025);
        }

        .avatar {
          margin: 20px 8px 20px 0;
          color: #1890ff;
          background: hsla(0, 0%, 100%, 0.85);
          vertical-align: middle;
        }

        .icon {
          font-size: 16px;
          padding: 4px;
        }
      }
    }

    &.dark {
      .user-wrapper {
        .action {
          color: rgba(255, 255, 255, 0.85);

          a {
            color: rgba(255, 255, 255, 0.85);
          }

          &:hover {
            background: rgba(255, 255, 255, 0.16);
          }
        }
      }
    }
  }

  &.mobile,
  &.tablet {
    .top-nav-header-index {
      .header-index-wide {
        .header-index-left {
          .trigger {
            color: rgba(255, 255, 255, 0.85);
            padding: 0 12px;
          }

          .logo.top-nav-header {
            flex: 0 0 56px;
            text-align: center;
            line-height: 58px;

            h1 {
              display: none;
            }
          }
        }
      }

      &.light {
        .header-index-wide {
          .header-index-left {
            .trigger {
              color: rgba(0, 0, 0, 0.65);
            }
          }
        }

        //
      }
    }
  }

  &.tablet {

    // overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
    .top-nav-header-index {
      .header-index-wide {
        .header-index-left {
          .logo>a {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }

        .ant-menu.ant-menu-horizontal {
          flex: 1 1 auto;
          white-space: normal;
        }
      }
    }
  }

  .top-nav-header-index {
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: relative;
    transition: background 0.3s, width 0.2s;

    .header-index-wide {
      max-width: 1200px;
      margin: auto;
      padding-left: 0;
      display: flex;
      height: 50px;

      .ant-menu.ant-menu-horizontal {
        max-width: 835px;
        flex: 0 1 835px;
        border: none;
        height: 50px;
        line-height: 50px;
      }

      .header-index-left {
        flex: 0 1 1000px;
        display: flex;

        .logo.top-nav-header {
          flex: 0 0 130px;
          width: 130px;
          height: 50px;
          position: relative;
          line-height: 50px;
          transition: all 0.3s;
          overflow: hidden;

          img,
          svg {
            display: inline-block;
            vertical-align: middle;
            height: 32px;
            width: 32px;
          }

          h1 {
            color: #fff;
            display: inline-block;
            vertical-align: top;
            font-size: 16px;
            margin: 0 0 0 6px;
            font-weight: 400;
          }
        }
      }

      .header-index-right {
        flex: 0 0 270px;
        align-self: flex-end;
        height: 50px;

        .content-box {
          float: right;

          .action {
            color: #fff;
            max-width: 140px;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
      }
    }

    &.light {
      background-color: #fff;

      .header-index-wide {
        .header-index-left {
          .logo {
            h1 {
              color: #002140;
            }
          }
        }
      }
    }
  }

  // 内容区
  .layout-content {
    margin: 24px 6px 0px;
    height: 100%;
    padding: 0 6px 0 0;
  }

  // footer
  .ant-layout-footer {
    padding: 0;
  }
}

.topmenu {
  .page-header-index-wide {
    max-width: 1200px;
    margin: 0 auto;
  }
}

// drawer-sider 自定义
.ant-drawer.drawer-sider {
  .sider {
    box-shadow: none;
  }

  &.dark {
    .ant-drawer-content {
      background-color: rgb(0, 21, 41);
    }
  }

  &.light {
    box-shadow: none;

    .ant-drawer-content {
      background-color: #fff;
    }
  }

  .ant-drawer-body {
    padding: 0;
  }
}

// 菜单样式
.sider {
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  position: relative;
  z-index: @ant-global-sider-zindex;
  min-height: 100vh;

  .ant-layout-sider-children {
    overflow-y: hidden;

    &:hover {
      overflow-y: auto;
    }
  }

  &.ant-fixed-sidemenu {
    position: fixed;
    height: 100%;
  }

  .logo {
    position: relative;
    height: 50px;
    padding-left: 24px;
    overflow: hidden;
    line-height: 50px;
    background: #002140;
    transition: all .3s;

    img,
    svg,
    h1 {
      display: inline-block;
      vertical-align: middle;
    }

    img,
    svg {
      height: 32px;
      width: 32px;
    }

    h1 {
      color: #fff;
      font-size: 20px;
      margin: 0 0 0 12px;
      font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
      font-weight: 600;
      vertical-align: middle;
    }
  }

  &.light {
    background-color: #fff;
    box-shadow: 2px 0px 8px 0px rgba(29, 35, 41, 0.05);

    .logo {
      background: #fff;
      box-shadow: 1px 1px 0px 0px #e8e8e8;

      h1 {
        color: unset;
      }
    }

    .ant-menu-light {
      border-right-color: transparent;
    }
  }
}

// 外置的样式控制
.user-dropdown-menu {
  span {
    user-select: none;
  }
}

.user-dropdown-menu-wrapper.ant-dropdown-menu {
  padding: 4px 0;

  .ant-dropdown-menu-item {
    width: 160px;
  }

  .ant-dropdown-menu-item>.anticon:first-child,
  .ant-dropdown-menu-item>a>.anticon:first-child,
  .ant-dropdown-menu-submenu-title>.anticon:first-child .ant-dropdown-menu-submenu-title>a>.anticon:first-child {
    min-width: 12px;
    margin-right: 8px;
  }
}

// 数据列表 样式
.table-alert {
  margin-bottom: 16px;
}

.k-form-build-9136076486841527 .ant-form-item {
  margin-bottom: 18px;
}

.table-page-search-wrapper {
  .ant-form-inline {
    .ant-form-item {
      display: flex;
      margin-bottom: 24px;
      margin-right: 0;

      .ant-form-item-control-wrapper {
        flex: 1 1;
        display: inline-block;
        vertical-align: middle;
      }

      >.ant-form-item-label {
        line-height: 32px;
        padding-right: 8px;
        width: auto;
      }

      .ant-form-item-control {
        height: 32px;
        line-height: 32px;
      }
    }
  }

  .table-page-search-submitButtons {
    display: block;
    margin-bottom: 24px;
    white-space: nowrap;
  }
}

.content {
  .table-operator {
    margin-bottom: 18px;

    button {
      margin-right: 8px;
    }
  }
}

/* load-panel */
.dx-loadpanel-message {
  font-size: 13px;
}

/* button */
.dx-button {
  border-radius: 2px !important;
}

.dx-item-content .dx-toolbar-item-content {
  padding: 20px;
}

.dx-toolbar-before {
  margin-left: 20px;
}

.toolbar-wrapper {
  overflow: hidden;
  height: 60px;
  line-height: 60px;
}

.ant-card-body {
  padding: 10px !important;
  zoom: 1;
}

.ant-btn-sm {
  height: 20px;
  padding: 0 7px;
  font-size: 12px;
  border-radius: 2px;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

a {
  color: #65a6de;
}

a:hover {
  color: #d00;
}

.dx-pager {
  padding-top: 1px;
  padding-bottom: 1px;
}

.ant-tabs-bar {
  margin: 0 0 4px 0;

}

.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {

  min-width: 120px;
  height: 38px;
  margin-right: -18px;
  line-height: 38px;
  text-align: center;
  border: 0;
  transition: color .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1);
  -webkit-mask: url('~@/assets/tab_bg.png');
  mask: url('~@/assets/tab_bg.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  .anticon-close{
    margin-left: 10px;
    display: none;
    line-height: 38px;
  }
}

.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab:hover {
  min-width: 130px;
  padding: 0 30px 0 30px;
  background: rgb(231, 229, 229);
  color: rgba(0, 0, 0, 0.65);
  .anticon-close{
    margin-left: 10px;
    display: inline;
    line-height: 38px;
  }
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
  min-width: 130px;
  padding: 0 30px 0 30px;
  height: 39px;
  color: #1890ff;
  background: #e5f0fc;
  z-index: 1;
  -webkit-mask: url('~@/assets/tab_bg.png');
  mask: url('~@/assets/tab_bg.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  .anticon-close{
    margin-left: 10px;
    display: inline;
    line-height: 38px;
  }
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active:hover  {
  background: #e5f0fc;
  color: #1890ff;
}

.dx-toolbar .dx-toolbar-items-container {
  height: 30px;
  overflow: visible;
}

.ant-form label {
  font-size: 12px !important;
}

.ant-select {
  font-size: 12px !important;
}

.ant-btn {
  margin-left: 2px  !important;
  font-size: 12px !important;
}

.ant-tabs-nav-container {
  font-size: 12px !important;
}

.dx-pager .dx-pages .dx-info {
  font-size: 12px !important;
      font-weight: bold!important;
}

.ant-select-dropdown-menu-item {
  font-size: 12px !important;
}

.ant-menu-vertical .ant-menu-item,
.ant-menu-vertical-left .ant-menu-item,
.ant-menu-vertical-right .ant-menu-item,
.ant-menu-inline .ant-menu-item,
.ant-menu-vertical .ant-menu-submenu-title,
.ant-menu-vertical-left .ant-menu-submenu-title,
.ant-menu-vertical-right .ant-menu-submenu-title,
.ant-menu-inline .ant-menu-submenu-title {
  font-size: 12px !important;
}

.dx-datagrid-nowrap,
.dx-datagrid-nowrap .dx-header-row>td>.dx-datagrid-text-content {
  font-size: 12px !important;
}

.dx-datagrid-table-fixed{
  transform: none !important;
}
.dx-widget {
  font-size: 12px !important;
}

.ant-cascader-menu-item {
  font-size: 12px !important;
}

.ant-cascader-picker {
  font-size: 12px !important;
}

.ant-collapse {
  font-size: 12px !important;
}

.ant-divider-horizontal {
  display: block;
  clear: both;
  width: 100%;
  min-width: 100%;
  height: 1px;
  margin: 12px 0;
}

.ant-menu {
  font-size: 12px !important;
}

.ant-input-number {
  font-size: 12px !important;
}

.ant-time-picker-input {
  font-size: 12px !important;
}

// input {
//   text-transform: uppercase !important;
// }


.dx-header-row{
  background-color: #edf2fe !important;
  color: #414952 !important;
  font-weight: bold !important;
}
.top-nav-header-index{
  background: #2473f2;
  font-family: Helvetica Neue,Luxi Sans,DejaVu Sans,Tahoma,Hiragino Sans GB,STHeiti,Microsoft YaHei;
}
.top-menu-class{
  background: #2473f2 !important;
  font-family: Helvetica Neue,Luxi Sans,DejaVu Sans,Tahoma,Hiragino Sans GB,STHeiti,Microsoft YaHei !important;
}

.ant-menu-item-active{
  background-color: #1890ff!important;
  color: #fff!important;
}


.dx-selection {
  background-color: #1890ff!important;
}
.dx-datagrid-checkbox-size.dx-checkbox-checked .dx-checkbox-icon {
  font-size: 10px;
  background-color: #1890ff!important;
  border-color: #1890ff!important;
}
.dx-checkbox-checked .dx-checkbox-icon {
  background-color: #1890ff!important;
  color: #fff!important;
  text-align: center;
}

.dx-checkbox-indeterminate .dx-checkbox-icon {
  color: #1890ff !important;
  text-align: center;
}

.dx-checkbox-indeterminate .dx-checkbox-icon:before {
  margin-left: -6px !important;
}

.dx-datagrid-filter-panel .dx-datagrid-filter-panel-clear-filter, .dx-datagrid-filter-panel .dx-datagrid-filter-panel-text, .dx-datagrid-filter-panel .dx-icon-filter {
  color: #1890ff !important;
}

.ant-form-item label {
  font-weight: bold !important;
}

.ant-list-pagination {
  margin-top: 0px !important;
  text-align: right;
}
.ant-collapse > .ant-collapse-item > .ant-collapse-header {
  padding: 8px 8px!important;
  padding-left: 32px!important;
  background-color: #f5f7fa;
}

.ant-modal-body {
  padding: 12px!important;
}
.ant-calendar-picker {
  min-width: 160px!important;
}
.ant-modal-header {
  padding: 8px 16px!important;
}


.ant-modal-footer {
  padding: 0px 16px 5px!important;
}
.ant-divider-horizontal {
  margin: 8px 0 !important;
}

.ant-checkbox-disabled + span {
  color: rgba(0, 0, 0, 0.85);
  cursor: not-allowed !important;
}
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
  border-color: red;
}

.ant-steps-small .ant-steps-item-title {
  padding-right: 6px!important;
  font-size: 12px!important;
}

.ant-steps-small .ant-steps-item-description {
  font-size: 12px!important;
}

.ant-steps-small .ant-steps-item-icon {
  width: 16px!important;
  height: 16px!important;
  font-size: 12px!important;
  line-height: 16px!important;
  text-align: center;
  border-radius: 24px!important;
}

.ant-input[disabled] {
    color: rgba(0, 0, 0, 1)!important;
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 1;
}

.ant-input-number-disabled .ant-input-number-input {
  color: rgba(0, 0, 0, 1)!important;
}


ant-select ant-select-disabled{
  color: rgba(0, 0, 0, 1)!important;
}
.ant-select-selection__rendered {
  color: #000000 !important;
}



ant-menu-dark {
  color: hsla(0,0%,100%,.65);
  background: linear-gradient(0deg, #0a284a, #063f86);
}
.ant-menu-submenu-selected{
  background: rgba(0,0,0,.1) !important;
}


.ant-menu-item-active{
  color: #fff!important;

}
.ant-notification {
  z-index: 9999 !important;
}