@import "./common/gc-var";
@import "./common/transition";
@import "./common/mixin";

//navbar
.navbar {
  position: relative;
  z-index: 3;
}
.gc-right-menu {
  float: right;
  height: 100%;
  line-height: 40px;
  margin-top: 12px;
  cursor: pointer;
  &:focus {
    outline: none;
  }

  .right-menu-item {
    display: inline-block;
    padding: 0 8px;
    height: 100%;
    font-size: 18px;
    color: #5a5e66;
    vertical-align: text-bottom;

    &.hover-effect {
      cursor: pointer;
      transition: background .3s;

      &:hover {
        background: rgba(0, 0, 0, .025)
      }
    }
  }

  .avatar-container {
    // width: 112px;
    margin-right: 16px;
    padding: 0 8px;
    border-radius: 5px;
    &:hover {
      background-color: $darkBgHover;
    }

    .avatar-wrapper {
      //margin-top: 7px;
      position: relative;
      color: #fff;

      .user-avatar {
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        vertical-align: middle;
      }

      // .el-icon-arrow-down {
      //  cursor: pointer;
      //  position: absolute;
      //  right: -20px;
      //  top: 10px;
      //  font-size: 12px;
      //  color: #fff;
      // }

      .avatar-name {
        margin-left: 4px;
        line-height: 24px;
        display: inline-block;
        vertical-align: middle;
        color: #fff;
        cursor: pointer;
        //width: 68px;
        //white-space: nowrap;
        //text-overflow: ellipsis;
        //overflow: hidden;
      }

      .el-icon-user {
        font-size: 22px;
        vertical-align: middle;
      }
    }
  }
}
.el-popper.user-dropdown {
  margin-top: 0 !important;
  min-width: 124px;
  border-radius: 0;
  .el-dropdown-menu__item:not(.is-disabled):hover, .el-dropdown-menu__item:focus {
    background-color: $whiteBgHover;
    color: inherit;
  }
  .popper__arrow,
  .popper__arrow::after {
    display: none;
  }
}
.header-search {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  //margin-right: 12px;
  height: 40px;
  line-height: 40px;
  width: 40px;
  text-align: center;
  cursor: pointer;
  border-radius: 5px;
  &:hover {
    background-color: $darkBgHover;
  }
  .el-input {
    position: absolute;
    top: 0;
    right: 0;
    width: 392px;
  }
  .el-input__inner {
    height: 40px;
    line-height: 40px;
    box-sizing: border-box;
    width: 100%;
    border: none;
    padding: 0 40px 0 8px;
    border-radius: 2px;
    //color: #fff;
    //&::-webkit-input-placeholder {
    //  color: rgba(255, 255, 255, .8);
    //}
    //&:-moz-placeholder {
    //  color: rgba(255, 255, 255, .8);
    //}
    //&::-moz-placeholder {
    //  color: rgba(255, 255, 255, .8);
    //}
    //&:-ms-input-placeholder {
    //  color: rgba(255, 255, 255, .8);
    //}
  }
  .el-input__icon {
    line-height: 32px;
  }
  .el-input .el-input__clear {
    color: rgba(255, 255, 255, .8);
    &:hover {
      color: rgba(255, 255, 255, 1);
    }
  }
  .el-input__suffix {
    right: 40px;
  }
}
.el-popover.my-search {
  padding: 0;
  margin-top: 1px !important;
  border-radius: 0;
  .popper__arrow {
    display: none;
  }
  .header-search-select__list {
    > li {
      position: relative;
      line-height: 40px;
      padding: 0 16px 0 40px;
      cursor: pointer;
      .header-search-select__list-msg {
        position: relative;
        //padding-right: 32px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        .is-new {
          display: inline-block;
          vertical-align: middle;
          margin-left: 8px;
          line-height: 14px;
          padding: 0 3px;
          background-color: #80BD00;
          color: #fff;
          font-size: 12px;
          font-style: normal;
          border-radius: 2px;
        }
      }
      &.is-disabled {
        color: #bfbfbf;
        cursor: not-allowed;
      }
      .header-search-select__list-rank {
        position: absolute;
        top: 50%;
        left: 16px;
        width: 15px;
        height: 15px;
        line-height: 15px;
        transform: translateY(-50%);
        background-color: #D0D0D0;
        text-align: center;
        border-radius: 2px;
        color: #fff;
        font-size: 12px;
        &.is-top3 {
          background-color: $--color-primary;
        }
      }
      &:hover {
        background-color: $whiteBgHover;
      }
    }
  }
}
.header-search-select__title {
  line-height: 36px;
  padding: 0 16px;
  color: $--color-text-secondary;
}

.header-notices {
  float: right;
  margin: 12px 24px 0 12px;
  //line-height: $--header-height;
  .header-notices-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
  }
}
.header-notices-item {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  line-height: 40px;
  width: 40px;
  text-align: center;
  //margin-right: 12px;
  cursor: pointer;
  border-radius: 5px;
  &:hover {
    background-color: $darkBgHover;
  }
  &.header-notices-item--special {
    width: 64px;
    line-height: 64px;
    text-align: center;
    vertical-align: top;
    margin-right: 0;
    i {
      vertical-align: -4px;
    }
    &.active {
      background-color: rgba(0,0,0,.1);
    }
  }
  .header-notices-item__dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: $--color-danger;
  }
}
.header-notices-item__icon {
  position: relative;
  z-index: 2;
  display: inline-block;
  vertical-align: middle;
  //font-size: 22px;
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,.8);
  &.header-notices-item__icon--search {
    background: url("#{$--images-path}/frame-images/icon_search.png") no-repeat;
    //&:hover {
    //  background-position: -18px 0;
    //}
  }
  &.header-notices-item__icon--searching {
    background: url("#{$--images-path}/frame-images/icon_search_hover.png") no-repeat;
    //&:hover {
    //  background-position: -18px 0;
    //}
  }
  &.header-notices-item__icon--setting {
    background: url("#{$--images-path}/frame-images/icon_setting.png") no-repeat;
    //&:hover {
    //  background-position: -18px 0;
    //}
  }
  &.header-notices-item__icon--user {
    background: url("#{$--images-path}/frame-images/icon_user.png") no-repeat;
  }
}

//setting
.gc-setting--wrap {
  padding: 12px;
}
.gc-setting {
  margin-bottom: 24px;
  .gc-setting__title {
    color: #37474f;
    line-height: 14px;
    margin-bottom: 8px;
  }
  .gc-setting__list {
    > li {
      float: left;
      margin-right: 16px;
      &.active .gc-setting__item,
      &:hover .gc-setting__item {
        border-color: #aaa;
      }
      &.active .gc-setting__item:after {
        display: block;
      }
    }
  }
  .gc-setting__item {
    position: relative;
    padding: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    margin-bottom: 4px;
    img {
      vertical-align: middle;
    }
    &:after {
      display: none;
      content: '';
      position: absolute;
      right: 16px;
      bottom: 16px;
      width: 14px;
      height: 10px;
      background: url("#{$--images-path}/frame-images/setting_checked.png") no-repeat center;
    }
  }
  .gc-setting__color {
    width: 53px;
    height: 40px;
    border-radius: 4px;
  }
}
.gc-setting__item--fixed {
  color: rgba(0, 0, 0, .65);
  font-size: 14px;
  //padding: 12px 0;
  margin-bottom: 12px;
  span {
    color: #292929;
  }
  .gc-setting__switch {
    float: right;
  }
}
.gc-setting__popover {
  top: 52px !important;
}
.gc-setting__shadow {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #000;
  opacity: .5;
}
.gc-setting__close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  i {
    font-size: 20px;
    color: #9E9E9E;
    transition: all .4s;
  }
  &:hover i {
    color: $--color-text-primary;
    transform: rotate(360deg);
  }
}


.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;

  path {
    fill: rgba(255,255,255,.5);
  }

  &:hover {
    path {
      fill: rgba(255,255,255,1);
    }
  }
}

.hamburger.is-active {
  transform: rotate(180deg);
}
