@use '../auxiliary/variables' as var;
@use '../auxiliary/buttons';
@use '../auxiliary/icons';

$nap-toast-background: #fbfbfb;
$nap-toast-box-shadow: 0 0 4px 1px transparentize(black, 0.75);
$nap-toast-box-shadow-hover: 0 0 4px 3px transparentize(black, 0.75);
$nap-toast-title-color: #6c757d;
$nap-toast-text-color: #6c757d;

.toast-wrapper.simple-toast {
  background: transparent;
  display: flex;
  flex-direction: column;
  margin: auto;
  opacity: 1;
  padding: 0;
  pointer-events: auto;
  position: relative;
  width: 100%;
  z-index: 0;

  .progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 2px 2px;
  }

  .progress-bar {
    height: 4px;
    transition: none;
    width: 0;
  }

  .evolve-toast {
    background: $nap-toast-background;
    border-radius: 2px;
    box-shadow: $nap-toast-box-shadow;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    max-height: 350px;
    opacity: 0;
    position: relative;
    vertical-align: bottom;

    &:hover {
      box-shadow: $nap-toast-box-shadow-hover;
    }

    &.standard-dialog {
      border-color: transparent;

      .progress-bar {
        background-color: rgba(42, 42, 42, 0.2);
      }
    }

    &.success-dialog {
      background-color: lighten(var.$nap-success, 25%);

      .progress-bar {
        background-color: lighten(var.$nap-success, 15%);
      }
    }

    &.info-dialog {
      background-color: lighten(var.$nap-info, 30%);

      .progress-bar {
        background-color: lighten(var.$nap-info, 15%);
      }
    }

    &.warning-dialog {
      background-color: lighten(var.$nap-warning, 30%);

      .progress-bar {
        background-color: lighten(var.$nap-warning, 20%);
      }
    }

    &.danger-dialog {
      background-color: lighten(var.$nap-danger, 20%);

      .progress-bar {
        background-color: lighten(var.$nap-danger, 10%);
      }
    }

    .close-ico {
      color: transparentize(black, 0.8);
      cursor: pointer;
      font-size: 18px;
      position: absolute;
      right: 6px;
      top: 4px;
    }

    .toast-title-content {
      align-content: space-around;
      align-items: center;
      background-clip: padding-box;
      border-radius: 1px 1px 0 0;
      color: $nap-toast-title-color;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      font-size: 0.87rem;
      height: auto;
      justify-content: flex-start;
      padding: 5px 10px 5px;
      width: auto;

      .icon-section {
        .icon-type-toast {
          font-size: 20px;
          opacity: 0.8;
          padding: 0 6px 0 0;
        }
      }
    }

    .content-holder {
      align-items: center;
      color: $nap-toast-text-color;
      display: flex;
      flex-wrap: nowrap;
      height: 100%;
      justify-content: space-between;
      overflow: auto;
      width: 100%;

      .toast-inner-content {
        padding: 6px 10px;
      }

      .only-message {
        padding: 6px 27px 6px 10px;
      }

      .text-text {
        font-size: 0.97rem;
      }

      .text-wrapper {
        margin: 0;
      }
    }

    .button-holder {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      width: 100%;

      .button-section {
        margin: 0;
        padding: 4px 10px;
      }
    }

    .text-wrapper-section {
      width: 100%;

      .text-wrapper {
        display: block;
        width: 100%;
      }

      .dont-break-out {
        hyphens: auto;
        overflow-wrap: break-word;
        white-space: pre-wrap;
        word-wrap: break-word;
      }
    }
  }

  .ap-icon-success {
    color: lighten(var.$nap-success, 10%);
  }

  .ap-icon-info {
    color: lighten(var.$nap-info, 10%);
  }

  .ap-icon-warning {
    color: lighten(var.$nap-warning, 10%);
  }

  .ap-icon-danger {
    color: lighten(var.$nap-danger, 10%);
  }
}
