/**
 * @copyright chuzhixin 1204505056@qq.com
 * @description 全局样式
 */

@charset "utf-8";

@import "./normalize.scss";
@import "./transition.scss";
@import "./loading.scss";
@import "./themes/ocean.scss";
@import "./themes/green.scss";
@import "./themes/glory.scss";
@import "./themes/dark.scss";
$base: ".vab";

@mixin scrollbar {
  max-height: 88vh;
  margin-bottom: 0.5vh;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(144, 147, 153, 0.3);
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: rgba(144, 147, 153, 0.3);
  }
}

@mixin base-scrollbar {
  &::-webkit-scrollbar {
    width: 13px;
    height: 13px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.4);
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 7px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }

  &::-webkit-scrollbar-track {
    background-color: transparent;
  }

  &::-webkit-scrollbar-track:hover {
    background-color: #f8fafc;
  }
}

img {
  object-fit: cover;
}

a {
  color: $base-color-blue;
  text-decoration: none;
  cursor: pointer;
}

button,span,img,font,i {
  transition: $base-transition;
}
svg {
  transition: none;
  * {
    transition: none;
  }
}

html {
  body {
    position: relative;
    height: 100vh;
    padding: 0;
    margin: 0;
    font-family: Avenir, Helvetica, Arial, sans-serif;
    font-size: $base-font-size-default;
    color: #2c3e50;
    background: #f6f8f9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    @include base-scrollbar;

    div {
      @include base-scrollbar;
    }

    svg,
    i {
      &:hover {
        opacity: 0.8;
      }
    }

    .v-modal {
      backdrop-filter: blur(10px);
    }

    .el-tag + .el-tag {
      margin-left: 10px;
    }

    .editor-toolbar {
      .no-mobile,
      .fa-question-circle {
        display: none;
      }
    }

    .el-divider--horizontal {
      margin: 10px 0 25px 0;

      .el-divider__text {
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
      }
    }

    .el-image-viewer {
      &__close {
        .el-icon-circle-close {
          color: $base-color-white;
        }
      }
    }

    .vue-admin-beautiful-wrapper {
      .app-main-container {
        @include base-scrollbar;

        > [class*='-container'] {
          * {
            transition: none;
          }
          padding: $base-padding;
          background: $base-color-white;
        }
      }
    }

    /* 进度条开始 */
    #nprogress {
      position: fixed;
      z-index: $base-z-index;

      .bar {
        background: $base-color-blue !important;
      }

      .peg {
        box-shadow: 0 0 10px $base-color-blue, 0 0 5px $base-color-blue !important;
      }
    }

    .el-table {
      .el-table__body-wrapper {
        @include base-scrollbar;
      }

      th {
        background: #f5f7fa;
      }

      td,
      th {
        position: relative;
        box-sizing: border-box;
        padding: 7.5px 0;

        .cell {
          font-size: $base-font-size-default;
          font-weight: normal;
          color: #606266;

          .el-image {
            width: 50px;
            height: 50px;
            border-radius: $base-border-radius;
          }
        }
      }
    }

    .el-pagination {
      padding: 2px 5px;
      margin: 15px 0 0 0;
      font-weight: normal;
      color: $base-color-black;
      text-align: center;
    }

    .el-menu.el-menu--popup.el-menu--popup-right-start {
      @include scrollbar;
    }

    .el-menu.el-menu--popup.el-menu--popup-bottom-start {
      @include scrollbar;
    }

    .el-submenu__title i {
      color: $base-color-white;
    }

    .el-dialog,
    .el-message-box {
      &__body {
        border-top: 1px solid $base-border-color;

        .el-form {
          padding-right: 30px;
        }
      }

      &__footer {
        padding: $base-padding;
        text-align: right;
        border-top: 1px solid $base-border-color;
      }

      &__content {
        padding: 20px 20px 20px 20px;
      }
    }

    .el-card {
      margin-bottom: 15px;

      &__body {
        padding: $base-padding;
      }
    }

    .select-tree-popper {
      .el-scrollbar {
        .el-scrollbar__view {
          .el-select-dropdown__item {
            height: auto;
            max-height: 274px;
            padding: 0;
            overflow-y: auto;
            line-height: 26px;
          }
        }
      }
    }

    /* 下拉树样式-----------结束 */
  }
}

.side-bar-container {
  .el-menu-item,
  .el-submenu {
    margin: 7px !important;
    border-radius: 5px !important;
    &:hover {
      border-radius: 5px !important;
    }

    &.is-active {
      background: $base-color-default !important;
    }
  }
}

/** 自定义支持 **/
html body .el-image-viewer__mask, html body .v-modal {
  background-color: rgba(0,0,0,.5);
  opacity: .6;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.input-btn-choose {
  position: absolute;
  top: 0;
  right: 0;
}
.el-dialog__header,
.el-dialog__body,
.el-dialog__footer {
  display: grid;
  overflow: hidden;
}

.el-button--small{
  font-size: 13px;
}
.el-dropdown-link {
  font-size: 13px;
  color: #409EFF;
  cursor: pointer;
}
.el-icon-arrow-down {
  font-size: 12px;
}

.el-button + .el-dropdown {
  margin-left: 10px;
}

.el-dropdown + .el-button {
  margin-left: 10px;
}

/* 下拉提示菜单 */
.inline-input-container .inline-input-value {
  overflow: hidden;
  text-overflow: ellipsis;
}
.inline-input-container .inline-input-describe {
  font-size: 12px;
  color: #b4b4b4;
}
.inline-input-container .highlighted .inline-input-describe {
  color: #ddd;
}
/* input clear */
.input-clear {
  position: absolute;
  top: 1px;
  right: 50px;
  font-size: 16px;
  color: #909399;
  cursor: pointer;
  user-select: none;
}

.el-tabs__new-tab{
  /* 调整右侧增加按钮位置 */
  margin: 10px 10px 10px 10px;
  color: #48A7FC;
  border: 1px solid #1890ff;
}

/* 导入Excel */
.import-excel .el-upload {
  width: 100%;
}
.import-excel .el-upload .el-upload-dragger {
  width: 100%;
}

@media screen and (max-width: 500px) {
  .el-message {
    min-width: 300px !important;
  }
}
@media screen and (max-width: 500px) {
  .el-message-box {
    width: 300px !important;
  }
}


@media screen and (max-width: 1200px) {
  .adaptive-container {
    width: 610px !important;
  }

  /* 对话框 */
  .el-dialog__wrapper .el-dialog {
    width: 650px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    padding: 10px 20px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body .el-form-item__label {
    width: 105px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* tab签 */
  .el-dialog__wrapper .el-dialog .el-tabs {
    width: 600px !important;
  }
  .el-tabs .el-tabs__content .el-form-item__label {
    width: 105px !important;
  }
  .el-tabs .el-tabs__content {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* 抽屉 */
  .el-drawer__wrapper .el-drawer{
    width: 70% !important;
  }
}
@media screen and (max-width: 992px) {
  .adaptive-container {
    width: 560px !important;
  }

  /* 对话框 */
  .el-dialog__wrapper .el-dialog {
    width: 600px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    padding: 10px 20px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body .el-form-item__label {
    width: 105px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* tab签 */
  .el-dialog__wrapper .el-dialog .el-tabs {
    width: 550px !important;
  }
  .el-tabs .el-tabs__content .el-form-item__label {
    width: 105px !important;
  }
  .el-tabs .el-tabs__content {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* 抽屉 */
  .el-drawer__wrapper .el-drawer{
    width: 90% !important;
  }
}
@media screen and (max-width: 768px) {
  .adaptive-container {
    width: 460px !important;
  }

  /* 对话框 */
  .el-dialog__wrapper .el-dialog {
    width: 500px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    padding: 10px 20px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body .el-form-item__label {
    width: 105px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* tab签 */
  .el-dialog__wrapper .el-dialog .el-tabs {
    width: 450px !important;
  }
  .el-tabs .el-tabs__content .el-form-item__label {
    width: 105px !important;
  }
  .el-tabs .el-tabs__content {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* 抽屉 */
  .el-drawer__wrapper .el-drawer{
    width: 90% !important;
  }
}
@media screen and (max-width: 550px) {
  .adaptive-container {
    width: 280px !important;
  }

  /* 对话框 */
  .el-dialog__wrapper .el-dialog {
    width: 320px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    padding: 10px 20px !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body .el-form-item__label {
    width: auto !important;
  }

  .el-dialog__wrapper .el-dialog .el-dialog__body {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* tab签 */
  .el-dialog__wrapper .el-dialog .el-tabs {
    width: 270px !important;
  }
  .el-tabs .el-tabs__content .el-form-item__label {
    width: auto !important;
  }
  .el-tabs .el-tabs__content {
    .el-select,
    .el-input {
      width: 100% !important;
    }
  }

  /* 抽屉 */
  .el-drawer__wrapper .el-drawer{
    width: 90% !important;
  }
}
