.toast {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  height: 4rem;
  width: 280px;
  align-items: center;
  overflow: hidden;
  border-radius: 0.375rem;
  --tw-bg-opacity: 1;
  background-color: rgb(39 39 42 / var(--tw-bg-opacity));
  padding: 0.75rem;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.toast-icon {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  font-size: 1.5rem;
  line-height: 2rem;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  p {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

.toast.success {
  .toast-icon {
    background-color: rgb(16 185 129 / 0.1);
  }
  .toast-icon {
    --tw-text-opacity: 1;
    color: rgb(16 185 129 / var(--tw-text-opacity));
  }
  /* process bg color  */
  .process-bar {
    background-color: rgb(16 185 129 / 0.1);
  }
  .process {
    --tw-bg-opacity: 1;
    background-color: rgb(16 185 129 / var(--tw-bg-opacity));
  }
}

.toast.error {
  .toast-icon {
    background-color: rgb(239 68 68 / 0.1);
  }
  .toast-icon {
    --tw-text-opacity: 1;
    color: rgb(239 68 68 / var(--tw-text-opacity));
  }
  .process-bar {
    background-color: rgb(239 68 68 / 0.1);
  }
  .process {
    --tw-bg-opacity: 1;
    background-color: rgb(239 68 68 / var(--tw-bg-opacity));
  }
}

.process-bar {
  position: absolute;
  bottom: 0px;
  right: 0px;
  height: 0.375rem;
  width: 100%;
  overflow: hidden;
  --tw-bg-opacity: 1;
  background-color: rgb(212 212 216 / var(--tw-bg-opacity));
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.process {
  position: absolute;
  right: 0px;
  top: 0px;
  height: 100%;
  --tw-bg-opacity: 1;
  background-color: rgb(16 185 129 / var(--tw-bg-opacity));
}

.toast.hidden {
  --tw-translate-x: -20rem;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y))
    rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
    scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
