@import '../../../style/index';

@layout-cls: ~'@{brick-prefix}-layout';

.@{layout-cls} {
  &-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    width: 100%;
    height: 64px;
    padding: 0 40px;
    font-size: 18px;
    background: #fff;
    &-logo {
      display: flex;
      flex-shrink: 0;
      align-items: center;
      box-sizing: border-box;
      width: 280px;
      height: 100%;
      img {
        width: 62px;
        height: 30px;
      }
    }
    &-middle-wrap {
      display: flex;
      flex: 1;
      align-items: center;
      box-sizing: border-box;
      height: 100%;
      .menu-box {
        display: flex;
        flex: 1;
        align-items: center;
        min-width: 310px;
        height: 100%;
        .menu {
          position: relative;
          padding: 0 32px;
          color: #4d4d4d;
          font-size: 16px;
          text-align: center;
          cursor: pointer;
          &.active-menu {
            &:before {
              position: absolute;
              bottom: -8px;
              left: 50%;
              width: 18px;
              height: 4px;
              background: @primary-color;
              border-radius: 2px;
              transform: translate(-50%, 0);
              transition: all 0.2s;
              content: '';
            }
            a {
              color: @primary-color;
              font-weight: bold;
              font-size: 20px;
            }
          }
          a {
            white-space: nowrap;
          }
        }
      }
      .search-box {
        display: flex;
        align-items: center;
        width: 240px;
        height: 40px;
        padding: 10px 16px;
        background: @universal-bg-first;
        border-radius: 20px;
        .iconfont {
          color: @universal-color-third;
          font-size: 20px;
        }
        .search-input {
          flex: 1;
          margin-left: 12px;
          font-size: 14px;
          background: transparent;
          border: none;
          &:focus {
            outline: none;
          }
          &::-webkit-input-placeholder {
            color: #a3a3a3;
            font-size: 14px;
          }
        }
      }
    }
    &-right-wrap {
      display: flex;
      align-items: center;
      width: 400px;
      height: 100%;
      margin-left: 40px;
      .user-box {
        display: flex;
        flex: 1;
        align-items: center;
        height: 100%;
        transition: all 0.3s;
        .avatar {
          position: relative;
          width: 40px;
          height: 40px;
          background-repeat: no-repeat;
          background-position: center;
          background-size: cover;
          border-radius: 20px;
          .badge {
            position: absolute;
            top: 0;
            right: -2px;
            width: 6px;
            height: 6px;
            background: @primary-color;
            border: #ffffff solid 1px;
            border-radius: 5px;
          }
        }
        .notice-box {
          position: relative;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 40px;
          height: 40px;
          margin-left: 24px;
          border: solid 1px @universal-bg-third;
          border-radius: 20px;
          cursor: pointer;
          .iconfont {
            color: @universal-color-second;
            font-size: 20px;
          }
          .badge {
            position: absolute;
            top: -10px;
            left: 22px;
            padding: 2px 7px 1px;
            color: #ffffff;
            font-size: 12px;
            background: @primary-color;
            border-radius: 20px 20px 20px 0;
            transform: scale(0.8);
          }
        }
        .login-btn {
          padding: 9px 18px;
          color: #4d4d4d;
          font-size: 16px;
          white-space: nowrap;
          text-align: center;
          border: solid 1px @universal-bg-third;
          border-radius: 25px;
          cursor: pointer;
        }
        .setting-box {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 40px;
          height: 40px;
          margin-left: 24px;
          border: solid 1px @universal-bg-third;
          border-radius: 20px;
          cursor: pointer;
          .iconfont {
            color: @universal-color-second;
            font-size: 20px;
          }
        }
      }
      .global-box {
        display: flex;
        align-items: center;
        margin-left: 24px;
        padding: 10px 15px;
        color: @primary-color;
        font-size: 16px;
        background: @universal-bg-third;
        border-radius: 20px;
        cursor: pointer;
        .iconfont {
          font-size: 14px;
          transform: scale(0.8);
        }
      }
    }
  }
}

@media screen and (max-width: 1320px) {
  .@{layout-cls} {
    &-header {
      &-logo {
        width: 220px;
      }
      &-middle-wrap {
        .search-box {
          display: none;
        }
      }
    }
  }
}

@media screen and (max-width: 1024px) {
  .@{layout-cls} {
    &-header {
      &-logo {
        width: 220px;
      }
      &-middle-wrap {
        .search-box {
          display: none;
        }
      }
    }
  }
}
