@use './variables.scss';
#app {
  // 主体区域
  .main-container {
    min-width: 1360px; // div3固定宽度后新增
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: 236px;
    position: relative;
  }
  // 侧边栏
  .sidebar-container {
    transition: width 0.28s;
    width: 236px !important;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-right: 1px solid rgba(108, 146, 210, 0.18);
    box-shadow: 18px 0 40px rgba(15, 43, 92, 0.08);

    &::before {
      content: '';
      position: absolute;
      top: -18%;
      right: -22%;
      width: 180px;
      height: 180px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(89, 168, 255, 0.22) 0%, rgba(89, 168, 255, 0) 72%);
      pointer-events: none;
    }

    //reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }
    .el-scrollbar__bar.is-vertical{
      right: 4px;
      width: 6px;
    }
    .scrollbar-wrapper {
      overflow-x: hidden!important;
      .el-scrollbar__view {
        height: 100%;
        display: flex;
        flex-direction: column;
      }
    }
    .is-horizontal {
      display: none;
    }
    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }
    .svg-icon {
      margin-right: 12px;
      font-size: 18px;
      color: inherit;
      transition: color .2s ease;
    }
    .el-menu {
      border: none;
      height: 100%;
      background: transparent !important;
      width: 100% !important;
    }
    .el-scrollbar__thumb {
      background-color: rgba(102, 136, 191, 0.36);
      border-radius: 999px;
    }
    .sidebar-menu {
      padding: 0 10px 14px;
    }
    .submenu-title-noDropdown,
    .el-submenu > .el-submenu__title,
    .el-menu-item {
      height: 46px;
      line-height: 46px;
      margin-bottom: 8px;
      padding-left: 18px !important;
      border-radius: 14px;
      color: #31456a !important;
      font-size: 14px;
      font-weight: 500;
      transition: background-color .22s ease, color .22s ease, box-shadow .22s ease, transform .22s ease;
    }
    .submenu-title-noDropdown,
    .el-submenu > .el-submenu__title {
      position: relative;
    }
    .submenu-title-noDropdown:hover,
    .el-submenu > .el-submenu__title:hover,
    .el-menu-item:hover {
      background: rgba(21, 118, 232, 0.10) !important;
      color: #0a67d1 !important;
      transform: translateX(2px);
    }
    .submenu-title-noDropdown:hover .svg-icon,
    .el-submenu > .el-submenu__title:hover .svg-icon,
    .el-menu-item:hover .svg-icon {
      color: #0a67d1 !important;
    }
    .el-submenu.is-active > .el-submenu__title,
    .submenu-title-noDropdown.is-active,
    .el-menu-item.is-active {
      background: linear-gradient(135deg, #1576e8 0%, #44a0ff 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 14px 24px rgba(21, 118, 232, 0.26);
    }
    .el-submenu.is-active > .el-submenu__title .svg-icon,
    .submenu-title-noDropdown.is-active .svg-icon,
    .el-menu-item.is-active .svg-icon {
      color: #ffffff !important;
    }
    .el-submenu .el-menu {
      height: auto !important;
      margin: 2px 0 12px;
      padding: 8px;
      background: rgba(255, 255, 255, 0.68) !important;
      border-radius: 16px;
      box-shadow: inset 0 0 0 1px rgba(145, 178, 233, 0.18);
      backdrop-filter: blur(8px);
    }
    .el-submenu .el-menu-item {
      min-width: 100% !important;
      height: 40px;
      line-height: 40px;
      margin-bottom: 6px;
      padding-left: 42px !important;
      border-radius: 12px;
      font-size: 13px;
      color: #48617f !important;
      background: transparent !important;
    }
    .el-submenu .el-menu-item:last-child {
      margin-bottom: 0;
    }
    .el-submenu .el-menu-item:hover {
      background: rgba(21, 118, 232, 0.10) !important;
      color: #0a67d1 !important;
    }
    .el-submenu .el-menu-item.is-active {
      background: rgba(21, 118, 232, 0.14) !important;
      color: #0a67d1 !important;
      box-shadow: none;
    }
    .el-submenu .el-menu-item.is-active::before {
      content: '';
      position: absolute;
      left: 18px;
      top: 50%;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #1576e8;
      transform: translateY(-50%);
    }
    .el-submenu__icon-arrow {
      margin-top: -5px;
      right: 18px;
      color: #90a3bd;
      font-weight: 700;
    }
  }
  .hideSidebar {
    .sidebar-container {
      width: 72px !important;
    }
    .main-container {
      margin-left: 72px;
    }
    .submenu-title-noDropdown {
      padding-left: 0 !important;
      position: relative;
      .el-tooltip {
        padding: 0 !important;
      }
    }
    .sidebar-container .sidebar-menu {
      padding-left: 8px;
      padding-right: 8px;
    }
    .sidebar-container .el-menu-item,
    .sidebar-container .el-submenu > .el-submenu__title {
      padding: 0 !important;
      text-align: center;
    }
    .sidebar-container .svg-icon {
      margin-right: 0;
    }
    .el-submenu {
      overflow: hidden;
      &>.el-submenu__title {
        padding-left: 0 !important;
        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }
    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }
  .sidebar-container .nest-menu .el-submenu>.el-submenu__title,
  .sidebar-container .el-submenu .el-menu-item {
    min-width: 100% !important;
    &:hover {
      background-color: rgba(21, 118, 232, 0.10) !important;
    }
  }
  .el-menu--collapse .el-menu .el-submenu {
    min-width: 220px !important;
  }

  //适配移动端
  .mobile {
    .main-container {
      margin-left: 0px;
    }
    .sidebar-container {
      transition: transform .28s;
      width: 236px !important;
    }
    &.hideSidebar {
      .sidebar-container {
        transition-duration: 0.3s;
        transform: translate3d(-236px, 0, 0);
      }
    }
  }
  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}
