// cover some element-ui styles

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

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

.el-upload__input {
  display: none;
}

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

.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;
    }
  }
}

// 重写 el-table 的 loading-mask 加载进度蒙层
.el-loading-mask {
  z-index: 10000 !important;
}

// to fixed https://github.com/ElemeFE/element/issues/2461
// 重写 dialog 样式，默认居中显示
.el-overlay-dialog {
  display: flex;
  justify-content: center;
  align-items: center;

  .el-dialog {
    transform: none;
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 80vh;
    padding: 20px;
    --el-dialog-width: 60vw !important;

    .el-dialog__header {
      padding-top: 10px;
      height: 40px;
    }

    .el-dialog__body {
      flex: 1;
      height: calc(50vh - 40px - 32px);
      overflow-y: scroll;

      /* 灰色滚动条背景 */
      &::-webkit-scrollbar-track {
        background-color: transparent;
      }

      .el-form {
        margin-top: 20px;
      }

      // margin-top: 20px;
    }
  }

  .el-dialog:not(.is-fullscreen) {
    margin-top: 0 !important;
  }
}

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

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

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

// 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-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow {
  display: none;
}

.el-dropdown .el-dropdown-link {
  color: var(--el-color-primary) !important;
}

// 覆盖默认样式
.el-select {
  width: 210px;
  // width: 100%;
}

.el-tabs {
  flex: 1;
}



.el-pagination {
  font-size: var(--xl-fontsize) !important;

  .number {
    font-size: var(--xl-fontsize) !important;
  }
}

@media (max-width: 1400px) {
  .el-form-item {
    margin-bottom: 20px !important;
  }
}

.el-table {
  --el-table-border: 2px solid var(--el-table-border-color) !important;
}

// 暗黑模式下 elementPlus 组件样式修复覆盖
html.dark {

  /* 表格样式覆盖 */
  .el-table {
    --el-table-header-bg-color: var(--el-bg-color-overlay) !important;
    --el-table-header-text-color: var(--el-text-color-regular) !important;
    --el-table-border-color: var(--el-border-color-light) !important;
    --el-table-row-hover-bg-color: var(--el-bg-color-overlay) !important;


    .el-table__header-wrapper,
    .el-table__fixed-header-wrapper {
      th {
        background-color: var(--el-bg-color-overlay, #f8f8f9) !important;
        color: var(--el-text-color-regular, #515a6e);
      }
    }
  }

  /* 树组件高亮样式覆盖 */
  .el-tree {
    .el-tree-node.is-current>.el-tree-node__content {
      background-color: var(--el-bg-color-overlay) !important;
      color: var(--el-color-primary);
    }

    .el-tree-node__content:hover {
      background-color: var(--el-bg-color-overlay);
    }
  }

  /* 下拉菜单样式覆盖 */
  .el-dropdown-menu__item:not(.is-disabled):focus,
  .el-dropdown-menu__item:not(.is-disabled):hover {
    background-color: var(--navbar-hover) !important;
  }

  /* blockquote样式覆盖 */
  blockquote {
    background-color: var(--blockquote-bg) !important;
    border-left-color: var(--blockquote-border) !important;
    color: var(--blockquote-text) !important;
  }

  /* 时间表达式标题样式覆盖 */
  .popup-result .title {
    background: var(--cron-border);
  }
}