@import '../includes/variables';

&-toast {
  background-color: $MF_Toast_Background_Color;
  visibility: hidden;
  min-width: 250px;
  padding: 16px;
  border-radius: 4px;
  opacity: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  transform: translateY(-100%);
  transition: all .5s ease-in-out;
  right: 10px;

  @media all and (max-width: $screen-wp) {
    left: 10px;
    padding: 10px;
    right: 10px;
  }

  .mf-toast-tick-wrapper {
    float: left;
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translate(-50%, -50%);

    .mf-toast-tick {
      color: $MF_Toast_Tick_Color;
      border: 2px solid $MF_Toast_Tick_Color;
      -moz-border-radius: 50px;
      -webkit-border-radius: 50px;
      border-radius: 50px;
    }
  }

  .mf-toast-message-wrapper {
    float: left;
    max-width: 800px;
    padding: 0 40px;

    .mf-toast-message {
      color: $MF_Toast_Text_Color;
      line-height: 24px;

      @media all and (max-width: $screen-wp) {
        font-size: 12px;
        line-height: 22px;
      }
    }
  }

  .mf-toast-btn-wrapper {
    float: left;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(-50%, -50%);
  }

  .mf-undo {
    color: $MF_Toast_Undo_Link_Color !important;
    display: block;
    height: auto;
    max-height: 0;
    overflow: hidden;
    text-decoration: underline !important;
    transition: all .5s ease-in-out;
  }

  &.mf-toast-undo {
    .mf-undo {
      max-height: 500px;
    }
  }

  &.mf-toast-visible {
    opacity: 1;
    transform: translateY(42px);
    visibility: visible;

    @media all and (max-width: $screen-wp) {
      transform: translateY(56px);
    }
  }

  .mf-toast-close-btn {
    background-color: $MF_Toast_Background_Color;
    color: $MF_Toast_Close_Button_Color;
    border: 0;
    padding: 0;

    span {
      width: 24px;
      height: 24px;
      font-size: 24px;
    }
  }
}