@import './common/var.less';

@keyframes slide-top {
  0% {transform: translateY(-100%);}
  100% {transform: translateY(0);}
}
@keyframes slide-bottom {
  0% {transform: translateY(100%);}
  100% {transform: translateY(0);}
}
@keyframes fade-in {
  0% {opacity: 0;}
  100% {opacity: 1;}
}
.fe-toast-wrapper {
  position: fixed;
  left: 50%;
  @animation-duration: 0.3s;
  &.fe-toast--position-top {
    top: 0;
    transform: translateX(-50%);
    .fe-toast {
      border-top-left-radius: 0;
      border-top-right-radius: 0;
      animation: slide-top @animation-duration;
    }
  }
  &.fe-toast--position-bottom {
    bottom: 0;
    transform: translateX(-50%);
    .fe-toast {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      animation: slide-bottom @animation-duration;
    }
  }
  &.fe-toast--position-middle {
    top: 50%;
    transform: translate(-50%, -50%);
    .fe-toast {
      animation: fade-in @animation-duration;
    }
  }
}
.fe-toast {
  min-height: @toast-height;
  color: @toast-font-color;
  font-size: @toast-font-size;
  line-height: @toast-line-height;
  background: @toast-bg;
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  .fe-toast__message {padding: 6px 0;}
  .fe-toast__line {flex-shrink: 0;margin-left: 16px;width: 1px;background: #666;}
  .fe-toast__close {flex-shrink: 0;cursor: pointer;position: relative;margin-left: 16px;}
}