@import '~ehome-visual-standard/styles/eh-normalize-HD.less';
@import '../../style/index.less';
@toastPrefixCls: eh-toptip;

@keyframes opacityIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes opacityOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes positionIn {
  0% {
    transform: translateY(0%);
  }
  46% {
    transform: translateY(59 * @hd);
  }
  79% {
    transform: translateY(55.5 * @hd);
  }
  100% {
    transform: translateY(56 * @hd);
  }
}

@keyframes positionOut {
  0% {
    transform: translateY(56 * @hd);
  }
  100% {
    transform: translateY(0%);
  }
}

.@{toastPrefixCls} {
  position: fixed;
  width: 100%;
  z-index: 1999;
  font-size: 14 * @hd;
  font-weight: bold;
  line-height: 20 * @hd;
  text-align: center;

  > span {
    max-width: 288 * @hd;
  }

  &&-wrap {
    height: 0;
    display: flex;
    justify-content: center;
    left: 0;
    top: 0;
    transform: translateZ(1px);
  }

  .@{toastPrefixCls}-notice {
    opacity: 0;
    margin-top: -44 * @hd;
  }

  .@{toastPrefixCls}-notice-show {
    animation: opacityIn 0.275s ease-in-out, positionIn 0.275s;
    animation-fill-mode:forwards
  }

  .@{toastPrefixCls}-notice-hide {
    animation: opacityOut 0.175s ease-in, positionOut 0.175s ease-in;
    animation-fill-mode:forwards
  }

  &-notice-content {
    position: relative;
    .@{toastPrefixCls}-text {
      min-width: 60 * @hd;
      border-radius: 44 * @hd;
      color: #fff;
      background: #484848;
      padding: 12 * @hd 20 * @hd;
    }
  }

  &&-error {
    .@{toastPrefixCls}-notice-content {
      .@{toastPrefixCls}-text {
        background: #FF5E5E;
      }
    }
  }

  &&-tooltip{
    .@{toastPrefixCls}-notice-content {
      .@{toastPrefixCls}-text {
        background: #FF5E5E;
      }
    }
  }

  &-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4 * @hd;
    margin: auto;
    width: 40 * @hd;
    height: 2.5 * @hd;
    border-radius: 3 * @hd;
    background: rgba(255, 255, 255, 0.4);
  }
}
