@import "./../../variable/config.scss";

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: $top-height;
  line-height: $top-height;
  border-bottom: 1px solid;
  border-color: transparent;

  .header-row {
    position: relative;

    .header-primary {
      position: absolute;
      left: 0;
      display: flex;
    }

    .header-secondary {
      position: absolute;
      right: 0;
      display: flex;
    }

    .header-logo {
      display: flex;
      justify-content: center;
      align-items: center;
      height: $top-height;
      padding-right: 1rem;
      .logo-img {
        // width: 4rem;
        height: $top-height;

        &:hover {
          transform: scaleX(-1);
          transition: transform 1s;
        }
      }

      .logo-text {
        // display: inline-block;
        margin-left: 1rem;
        font-size: 2rem;
        text-shadow: 3px 2px 2px $text-shadow-color;
      }
    }

    .sys-extend {
      border-left: 1px solid transparent;

      .amos-nav-item {
        height: $top-height;
        min-width: 5rem;
        padding: 0 0.5rem;
        line-height: $top-height;
        text-align: center;
        vertical-align: top;
        border-right: 1px solid transparent;

        &.amos-nav-item-active {
          background: #431D6A;
          border-bottom: 1px solid transparent;
          transform: none;
        }

        &:hover {
          transform: none;
        }

        a {
          height: $top-height;
          line-height: $top-height;
          color: white;
          opacity: 1;
        }
      }
    }

    .header-search {
      width: 15rem;
      padding: 0 0.5rem;
      border-left: 1px solid transparent;

      .tip-search {
        height: $top-height - 1.2rem;
        line-height: $top-height - 1.2rem;
        color: white;
        background-color: rgba(255, 255, 255, 0.2);
        border: 1px solid transparent;
      }
    }

    .sys-tools {
      border-left: 1px solid transparent;
      z-index: 100;

      .ui-menu {
        .ui-menu-item {
          display: flex;
          height: $top-height;
          padding: 0 0.5rem;
          margin: 0;
          border-right: 1px solid transparent;
          justify-content: center;
          align-items: center;

          &:hover {
            color: white;
            background: #431D6A;
          }

          &:last-child {
            border-right: 0;
          }
        }

        &.horizontal {
          display: flex;
          justify-content: flex-end;
          align-items: center;
        }
      }

      &.sys-tools-min {
        .ui-menu {
          &.horizontal {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            padding-right: 0;

            .ui-menu-item {
              padding: 0 0.5rem;
              border-right: 1px solid transparent;

              &:last-child {
                border-right: 0;
              }
            }
          }
        }
      }
    }
  }
}

.header-logo.mixin-log {
  justify-content: start !important;
  width: 180px;
  background: white;
  border-bottom: 1px solid #629EDE;

  .header-back-entry-icon {
    color: #048AD7;
  }

  .logo-bg {
    width: $top-height;
    height: $top-height - 0.5rem;
    margin-left: 0.5rem;
    text-align: center;
    background: url("../../assets/logo/amos-icon.png");
    background-size: 100% 100%;

    .mixin-logo-img {
      height: 1.8rem;
      cursor: pointer;
      transform: rotate(360deg);
      animation: logoRotation 6s linear infinite;
    }

    .mixin-logo-img-hover-rotate {
      height: 1.8rem;
      cursor: pointer;
      transition: all 1s ease-in-out;

      &:hover {
        transform: rotate(360deg);
      }
    }
  }

  .mixin-logo-title {
    height: $top-height - 0.5rem;
  }
}

@keyframes logoRotation {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
