@import "~styles/variables";

.nav {
  left: -(@nav-width + 10px);
}

.header {
  top: 0;
  left: 0;
  color: @white;
  height: @header-height;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 230px;
}

.header-collapsed{
  &:extend(.header);
  padding-left: 88px;
}

.logo {
  height: 32px;
  margin: @size-medium 38px;
}

.logo-collapse {
  margin: @size-medium 24px;
}

.logo-image {
  height: 29px;
}

.logo-image-hover {
  margin-left: -20px;
}

.site-layout-background {
  background: #fff;
}

.sider {
  height: 100vh;
  overflow-y: auto;
  position: relative;

  :global {
    .ant-layout-sider-trigger {
      background-color: @sider-background;
      position: absolute;
      width: 32px !important;
      height: 75px;
      border-width: 32px;
      right: 0;
      bottom: 48px;
      border-radius: 4px 0px 0px 4px;
      font-size: 16px;
      line-height: 75px;
    }
  }
}

.menu {
  padding-left: 14px;
  padding-right: 14px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 12px;
  }

  &::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
  }

  :global {
    a {
      color: inherit !important;
    }

    .ant-menu-item {
      font-size: @size-normal;
    }

    .ant-menu-submenu-title {
      font-size: @size-normal;
    }

    .anticon {
      font-size: @size-normal;
      margin-right: 20px;
    }

    & .ant-menu-item-selected {
      background-color: @primary-color;
      border-radius: @border-radius;
    }
  }
}

.menu-item {
  font-size: @size-normal;

  :global {
    a {
      color: inherit;
    }
  }
}

.content {
  height: calc(100vh - @header-height);
  background-color: @background-color;
}

.sub-menu {
  font-size: 10px;

  :global {
    .ant-menu-sub.ant-menu-inline {
      padding-left: 5px;
      padding-right: 5px;
    }

    .ant-menu-item>span>a {
      padding-left: 13px;
      display: inline-block;
      width: 100%;
      color: transparent;
    }

    .ant-menu-item>span>a::before {
      position: absolute;
      top: 18px;
      bottom: 0;
      left: 30px;
      content: "";
      width: 5px;
      height: 5px;
      background-color: rgba(255, 255, 255, 0.65);
      border-radius: 50%;
    }

    .ant-menu-item-selected>span>a::before {
      background-color: #fff !important;
    }

    .ant-menu-item-active>span>a::before {
      background-color: @primary-color;
    }

    // .ant-menu-sub {
    //   .ant-menu-item-selected {
    //     background-color: transparent !important;
    //   }
    // }
    .ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-selected {
      background-color: @primary-color;
      border-radius: @border-radius;
    }
  }
}

.breadcrumb {
  height: @breadcrumb-height;
  background-color: #fff;
  padding-left: @body-padding-left;

  .breadcrumb-item {
    line-height: @breadcrumb-height;
  }

  .breadcrumb-link {
    color: @primary-color;
  }
}

.breadcrumb-has-tab {
  height: @breadcrumb-height + 30px;
}

.main {
  height: calc(100vh - @header-height - @breadcrumb-height);
  // min-width: @content-width;
  // padding-left: @body-padding-left;
  // padding-right: @body-padding-right;
  overflow: hidden;
}

.main-no-breadcrumb {
  height: calc(100vh - @header-height);
}

.main-has-tab {
  margin-top: -42px;
  // max-height: calc(100vh - 58px - 44px);
}

.trigger-wrapper {
  position: absolute;
  width: 24px !important;
  height: 70px;
  border-width: 24px;
  right: -24px;
  bottom: 48px;
  border-radius: 4px 0px 0px 4px;
  font-size: 16px;
  line-height: 70px;
  cursor: pointer;
}

.trigger {
  font-size: 20px;
  position: absolute;
  left: 0;
  color: #fff;
}

.trigger::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: -1;
  -webkit-transform: scaleX(2.2) perspective(50px) rotateY(50deg);
  transform: scaleX(2.2) perspective(50px) rotateY(50deg);
  -webkit-transform-origin: bottom;
  transform-origin: left;
  border-right: none;
  border-radius: 0 4px 4px 0;
}

.trigger-icon {
  margin-left: 2px;
}

.base-layout {
  width: 100%;
  height: 100vh;
  position: relative;
}

.base-layout-sider {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 230px;
  background-color: @sider-background;
  z-index: 999;
  transition: all 0.2s;
}

.base-layout-sider-collapsed {
  width: 88px;
  transition: all 0.2s;
  // &:hover {
  //   width: 220px;
  // }
}

.base-layout-right {
  position: absolute;
  top: 40px;
  left: 230px;
  height: calc(100vh - 40px);
  right: 0;
}

.base-layout-right-collapsed {
  left: 88px;
}

.base-layout-sider-hover {
  width: 230px;
  transition: all 0.2s;
}

.notice {
  z-index: 1100;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #0068FF;
  position: absolute;
  top: 48px;
  right: 0;
  line-height: 24px;
  width: 384px;
  max-width: calc(100vw - 48px);
  margin-bottom: 16px;
  margin: 0 24px 0 0;
  padding: 16px 24px;
  font-size: 18px;
  overflow: hidden;
  word-wrap: break-word;
  background: #fff;
  border-radius: 4px;
  -webkit-box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
}