@import './variable.less';

.nuim-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  display: flex;
  color: @white;
  z-index: 3001;
  font-size: 15px;
  line-height: 1.2;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-sizing: content-box;
  transform: translate3d(-50%, -50%, 0);
  background-color: rgba(0, 0, 0, .7);
  width: fit-content;
  white-space: pre-wrap;
  word-break: break-all;

  &-wrapper {
    transition: opacity .2s;
  }

  &__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    background-color: transparent;

    &--mask {
      background-color: rgba(0, 0, 0, .5);
    }
  }

  &--text {
    padding: 12px;
    max-width: 80%;
    // width: auto
  }

  &--default {
    width: 120px;
    min-height: 120px;
    padding: 15px;

    .nuim-toast__icon {
      font-size: 50px;
      color: @white;
    }

    .nuim-loading {
      margin: 10px 0 5px;
    }

    .nuim-toast__text {
      font-size: 16px;
      padding-top: 10px;
    }
  }

  &--top {
    top: 50px;
  }

  &--bottom {
    top: auto;
    bottom: 50px;
  }
}

.nuim-toast-fade-enter,
.nuim-toast-fade-leave-to {
  opacity: 0;
}
