@keyframes rotation {
  0% {
    -webkit-transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
  }
}

.nut-toast {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1300;

  &-overlay-default {
    --nutui-overlay-bg-color: rgba(0, 0, 0, 0);
  }

  &-overlay-default-taro {
    /* #ifdef harmony dynamic*/
    background-color: rgba(0, 0, 0, 0);
    /* #endif */
    /* #ifndef harmony dynamic*/
    --nutui-overlay-bg-color: rgba(0, 0, 0, 0);
    /* #endif */
  }

  &-inner {
    position: absolute;
    top: $toast-inner-top;
    transform: translate(-0, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 96px;
    max-width: 60%;
    // max-width: 224px;
    box-sizing: border-box;
    font-size: $toast-text-font-size;
    text-align: $toast-inner-text-align;
    padding: $toast-inner-padding;
    word-break: break-all;
    background: $toast-inner-bg-color;
    border-radius: $toast-inner-border-radius;
    color: $toast-font-color;

    &-descrption {
      max-width: 68.2%;
      // max-width: 256px;
    }

    &-normal {
      word-break: normal;
      word-wrap: normal;
    }

    &-break-word {
      word-break: normal;
      word-wrap: break-word;
    }

    &-small {
      font-size: $font-size-s;
    }

    &-large {
      font-size: $font-size-l;
    }
  }

  &-center {
    top: var(--nutui-toast-inner-top, 48%);
  }

  &-bottom {
    top: var(--nutui-toast-inner-top, 80%);
  }

  &-top {
    top: var(--nutui-toast-inner-top, 20%);
  }

  &-text {
    color: #ffffff;
    text-align: $toast-inner-text-align;
    line-height: 20px;
  }

  &-title {
    color: #ffffff;
    font-size: $toast-title-font-size;
    font-weight: 600;
    text-align: $toast-inner-text-align;
    line-height: 22px;
  }

  .nut-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
  }

  &-icon-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3px 0 5px;
    color: #ffffff;

    &-icon {
      width: 24px;
      height: 24px;
    }
  }

  &-rtl {
    left: auto;
    right: 0;

    &-inner {
      left: auto;
      right: 50%;
    }
  }
}

[dir='rtl'] .nut-toast,
.nut-rtl .nut-toast {
  left: auto;
  right: 0;

  &-inner {
    left: auto;
    right: 50%;
  }
}

.toast-fade-enter-active {
  transition: opacity 0.3s;
}

.toast-fade-leave-active {
  transition: opacity 0.3s;
}

.toast-fade-enter-from,
.toast-fade-leave-to {
  opacity: 0;
}


$toast-icon-size: 28px;

.mj-toast {
  .nut-toast-base {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nut-toast-inner {
    box-sizing: border-box;
    width: fit-content;
    min-width: 40%;
    max-width: 65%;
    background-color: $toast-inner-bg-color;
    border-radius: $toast-inner-border-radius;
    font-size: $toast-text-font-size;
    line-height: 1.5;
    padding: $spacing-3 $spacing-5;
    white-space:pre-wrap;
    overflow-wrap: break-word;
    line-break: anywhere;
    position: unset;
    transform: unset;

    .nut-toast-icon-wrapper {
      height: $toast-icon-size;
      margin: 0;

      .nut-icon {
        width: $toast-icon-size !important;
        height: $toast-icon-size !important;
      }
    }

    .nut-toast-icon-wrapper,
    .nut-toast-title {
      margin-bottom: $spacing-0;
    }

    .nut-toast-title {
      font-weight: $font-weight-bold;
      font-size: $toast-title-font-size;
    }
  }

  &-custom-icon {
    font-size: $toast-icon-size !important;
  }
}

.mj-toast-pure-text {
  .nut-toast-inner {
    padding: $toast-inner-padding;
  }
}

.nut-toast-text {
  line-height: 25px;
}