:root {
  --el-color-primary: #3370ff;
  --el-color-success: #34c724;
  --el-text-color-primary: #1f2329;
  --el-border-radius-base: 6px;
  --el-menu-item-height: 45px;
}

.el-avatar {
  --el-avatar-bg-color: var(--el-color-primary);
  --el-avatar-size-small: 33px;
  --el-avatar-border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

// card
.el-card {
  --el-card-padding: calc(var(--app-base-px) * 2);
  --el-card-border-radius: 6px;
  box-shadow: 0px 2px 4px 0px rgba(31, 35, 41, 0.12) !important;
  &.is-never-shadow {
    border: 1px solid var(--el-card-border-color);
    box-shadow: none !important;
  }
}

// tree
.el-tree {
  background: none;
}
.el-tree-node__content {
  border-radius: var(--el-border-radius-base);
  padding: 7px 0;
  &:hover {
    background: var(--app-text-color-light-1);
  }
}
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
  background: var(--el-color-primary-light-9);
  color: var(--el-color-primary);
}
.el-tree-node__expand-icon {
  color: var(--app-text-color-secondary);
  font-size: 16px;
}

// button
.el-button {
  --el-button-font-weight: 400;
  padding: 5px 12px;
  &.is-text {
    padding: 4px !important;
    font-size: 16px;
    max-height: 24px;
    &:not(.is-disabled):hover {
      background: var(--app-text-color-light-1);
    }
  }
  &:focus {
    color: var(--el-button-text-color);
    background-color: none;
    border-color: none;
  }
  &:focus-visible {
    outline: none !important;
  }
  &.is-link:focus {
    background: none;
    border: none;
  }
}
.el-button--text {
  border: none !important;
  &:focus {
    border: none !important;
  }
}
.el-button--large {
  font-size: 16px;
}

// dropdown
.el-dropdown {
  color: var(--el-text-color-primary);
}
.el-dropdown-menu__item {
  color: var(--el-text-color-primary);
  font-weight: 400;
  padding: 5px 11px;
  min-width: 80px;
  i {
    margin-right: 8px;
  }
  &:not(.is-disabled):focus,
  &:not(.is-active):focus {
    background-color: var(--app-text-color-light-1);
    color: var(--el-text-color-primary);
  }
  &.is-active,
  &.is-active:hover {
    color: var(--el-menu-active-color);
    background: var(--el-color-primary-light-9);
  }
  &.active {
    color: var(--el-color-primary);
  }
}

// message
.el-message {
  --el-message-close-icon-color: var(--app-text-color-secondary);
}
.el-message-box {
  --el-messagebox-font-size: 16px;
  --el-messagebox-width: 475px;
  padding: 24px;
  .el-message-box__header {
    padding: 0;
  }
  .el-message-box__title {
    word-break: break-all;
    width: 95%;
  }
}

.el-message-box__content {
  padding: 24px 0;
  color: var(--app-text-color);
  font-weight: 400;
}
.el-message-box__btns {
  padding: 0;
  button {
    min-width: 80px;
    &:nth-child(2) {
      margin-left: 12px;
    }
  }
  button.danger {
    background: var(--el-color-danger);
    border: var(--el-color-danger);
    color: #ffffff;
  }
}
.el-message-box__headerbtn {
  right: 10px;
  top: 16px;
  .el-message-box__close {
    font-size: 20px;
  }
}

// drawer
.el-drawer {
  .el-drawer__header {
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid var(--el-border-color);
    color: var(--app-text-color);
  }
  .el-drawer__body {
    padding: 16px 24px;
  }
  .el-drawer__footer {
    border-top: 1px solid var(--el-border-color);
    padding: 16px 24px;
  }
}

// popper
.el-popper {
  --el-popper-border-radius: 6px;
}

// table
.el-table {
  --el-table-header-bg-color: var(--app-layout-bg-color);
  --el-table-text-color: var(--app-text-color);
  font-weight: 400;
  thead {
    color: var(--app-text-color-secondary);
    th {
      font-weight: 500;
    }
  }

  th.el-table__cell {
    border-top: var(--el-table-border);
  }
  .el-table__cell {
    padding: 12px 0;
  }
  .el-checkbox {
    height: 23px;
  }
  tr.highlight {
    background: var(--el-table-current-row-bg-color);
  }
}

// dialog
.el-dialog {
  --el-dialog-padding-primary: 24px;
  --el-dialog-border-radius: 8px;
  .el-dialog__body {
    color: var(--el-text-color-primary);
  }
}
.el-dialog__headerbtn {
  top: 8px;
  right: 8px;
  .el-dialog__close {
    font-size: 20px;
  }
}

@media only screen and (max-width: 768px) {
  .el-dialog {
    width: 90% !important;
  }
}

// el-form

.el-form {
  --el-form-inline-content-width: 100%;
}

.el-form-item {
  margin-bottom: 16px;
  .el-form-item {
    margin-bottom: 16px;
    &:last-child {
      margin-bottom: 0px;
    }
  }
}
.el-form-item__label {
  font-weight: 400;
  width: 100%;
  color: var(--el-text-color-primary);
}

.el-form-item__error {
  position: unset;
  font-size: 14px;
}

.el-form--label-top .el-form-item .el-form-item__label {
  padding-right: 0;
}

.el-divider__text {
  background: var(--app-layout-bg-color);
}

// el-cascader
.el-cascader-node {
  padding-left: 2px;
}
.el-cascader-node__prefix {
  right: 10px;
  left: auto;
}
