@prefixCls: ~'igloo-transit-header';
@headerHeightPC: 56px;
@headerHeightMobile: 48px;

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
@keyframes fadeInRight {
  from {
    -webkit-transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
    opacity: 0;
  }

  to {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.@{prefixCls} {
  &-container {
    position: relative;
    width: 100%;
    background-color: #f6f6ff;
    border-bottom: 1px solid #eeeeee;

    &-main {
      display: flex;
      align-items: center;
      justify-content: space-between;
      max-width: 1108px;
      height: @headerHeightPC;
      margin: auto;

      &-tabs {
        display: flex;
        flex: 1;
        align-items: center;
        height: 100%;
        margin: 0 -20px 0 40px;

        &-tab {
          display: flex;
          align-items: center;
          height: 100%;
          margin: 0 20px;
          color: #212121;
          cursor: pointer;
          transition: all 0.3s;

          &.@{prefixCls}-container-main-tabs-tab-selected {
            position: relative;
            color: #5858ff;

            .@{prefixCls}-container-main-tabs-tab-text {
              font-weight: 500;
            }

            &:after {
              position: absolute;
              right: 0;
              bottom: 0px;
              left: 0;
              width: 100%;
              height: 3px;
              background-color: #5858ff;
              animation-name: fadeIn;
              animation-duration: 0.3s;
              animation-fill-mode: both;
              content: '';
            }
          }
        }
      }

      &-logo {
        width: 54px;
        height: 30px;
        cursor: pointer;
      }
    }

    &.@{prefixCls}-mobile {
      .@{prefixCls}-container-main {
        height: @headerHeightMobile;
        padding: 0 16px;
        &-logo {
          width: 44px;
          height: 24px;
        }
      }

      .@{prefixCls}-ham {
        display: block;
        width: 24px;
        height: 24px;
        background: url('../assets/ham-button.png') no-repeat;
        background-size: 100% 100%;
        cursor: pointer;
      }
      .@{prefixCls}-close {
        display: block;
        width: 24px;
        height: 24px;
        background: url('../assets/close.png') no-repeat;
        background-size: 100% 100%;
        cursor: pointer;
      }
    }
  }

  &-panel {
    position: absolute;
    top: @headerHeightMobile;
    right: 0;
    left: 0;
    animation-name: fadeInRight;
    animation-duration: 0.3s;
    animation-fill-mode: both;

    &-item {
      display: flex;
      align-items: center;
      height: 48px;
      padding: 0 16px;
      border-bottom: 1px solid #eeeeee;
      cursor: pointer;
      user-select: none;
      &:first-child {
        border-top: 1px solid #eeeeee;
      }
    }
  }
}
