// cover some element-ui styles

.el-button {
  [class^="el-icon-"],
  [class*=" el-icon-"] {
    vertical-align: top;
  }
}

.el-button--primary {
  color: #ffffff;
  background-color: #0089c9;
  border-color: #0089c9;
}
.el-button--primary:hover,
.el-button--primary:focus {
  color: #ffffff;
  background-color: #0089c9;
  border-color: #015d88;
}

.el-input.el-input--small {
  line-height: 30px;
}

.el-input.is-disabled .el-input__inner,
.el-input.is-disabled .el-textarea__inner {
  color: #797979;
}

.el-input .el-input__count .el-input__count-inner {
  // background: transparent;
}

.el-input-number.is-controls-right .el-input-number__increase,
.el-input-number.is-controls-right .el-input-number__decrease {
  background-color: #ffffff20;
  border: none;
}

.el-input-number.is-controls-right .el-input-number__increase.is-disabled,
.el-input-number.is-controls-right .el-input-number__decrease.is-disabled {
  background-color: transparent;
  border: none;
}

.top-search {
  .el-input,
  .el-select {
    width: 240px;
  }

  .el-date-editor--daterange.el-input__inner {
    width: 240px;
  }
}

.el-tag + .el-tag {
  margin-right: 10px;
}
.el-tag + .el-tag:last-of-type {
  margin-right: 0;
}
.el-tag:nth-of-type(2) {
  margin-left: 10px;
}

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  // font-weight: 400 !important;
  // color: #fff;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

.el-dialog {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*height:600px;*/
  height: calc(100% - 30px);
  max-width: calc(100% - 30px);
  .el-dialog__title {
    color: $text;
  }
  .el-dialog__body {
    flex: 1;
    overflow: auto;
    padding-top: 15px;
  }
}

.el-drawer {
  background-color: #edf3f3;
  .el-drawer__header {
    color: $text;
    margin-bottom: 0px;
    padding: 8px 20px;
    font-size: 1.2em;
    font-weight: 900;
    background-image: linear-gradient(90deg, #37a0ff 7%, #1887e2 100%);
  }

  .el-drawer__content {
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
  }

  .el-drawer__content .el-tabs {
    flex: 1;
  }

  .el-drawer__footer {
    display: flex;
    margin: -10px -20px;
    padding: 15px 20px;
    // border-top: 1px solid $panelBorder;
  }

  .el-drawer__footer button {
    flex: 1;
  }
}

.el-drawer__wrapper.has-header-tabs {
  .el-drawer__close-btn {
    z-index: 1;
  }
  .el-drawer__body {
    margin-top: -50px;
  }
  .el-drawer__content {
    & > .el-tabs {
      .el-tabs__header {
        border-bottom: 0px solid #dfe4ed;
        margin-bottom: 0;
        .el-tabs__nav-wrap {
          margin-left: 120px;
        }
        .el-tabs__nav {
          border: none;
          .el-tabs__item {
            font-size: 1.2em;
            border: none;
            &:hover {
              color: #fff;
              background: #00000030;
            }
            &.is-active {
              color: #1f1f1f;
              background-color: #edf3f3;
            }
          }
        }
      }
      .el-tabs__content {
        overflow-y: scroll;
        height: calc(100vh - 100px);
        margin: 0px -20px;
        padding: 10px 20px;
      }
    }
  }
  &.no-footer {
    .el-drawer__content > .el-tabs {
      .el-tabs__content {
        height: calc(100vh - 48px);
      }
    }
  }
}

// .el-card {
//   background-color: $panelBg;
//   border: 1px solid $panelBorder;
//   color: $text;
//   .el-card__header {
//     border-bottom: 1px solid $panelBorder;
//   }
// }

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block;
  }
}

.vue-treeselect .vue-treeselect__control {
  width: auto;
}

.el-input__inner {
  padding: 0 8px;
}
// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-input-number.is-without-controls .el-input__inner {
  padding-left: 8px;
  padding-right: 8px;
  text-align: left;
}

.el-table::before,
.el-table--group::after,
.el-table--border::after {
  content: "";
  position: absolute;
  background-color: transparent;
  z-index: 1;
}

.el-tabs__item {
  color: $menuText;
}

.el-form-item {
  margin: 0 !important;
  padding: 10px;
  // &:hover {
  //   background: #ffffff10;
  //   border-radius: 2px;
  // }
  .el-form-item__label {
    color: $text;
    text-align: left;
  }
}

// 重置el-form-item hover样式
.no-hover-form .el-form-item {
  margin-bottom: 20px !important;
  padding: 0;
  &:hover {
    background: none;
    border-radius: 0;
  }
}

.el-loading-mask {
  background-color: rgba(255, 255, 255, 0.9);
  .el-loading-spinner .path {
    stroke: #00f3bf;
  }
}

.el-tree {
  color: $text;
  background-color: transparent;
  .el-tree-node__content:hover {
    background-color: #f5fafa;
  }
  .el-tree-node:focus > .el-tree-node__content {
    background-color: #f5fafa;
  }
}

.el-divider--horizontal {
  margin: 8px 0;
}

.el-table .el-link {
  font-size: inherit;
  color: #00adff;
}

// el-form-item多层嵌套时，去掉边距
.el-form-item__content > .el-form-item {
  padding: 0;
}
