.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-item {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(47, 43, 61, .16);
  padding: 14px 16px 10px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;

  &.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  &.is-closing {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.toast-item--success {
  border-left: 4px solid #28c76f;
}

.toast-item--danger {
  border-left: 4px solid #ea5455;
}

.toast-item__message {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary, #2f2b3d);
  padding-right: 4px;
}

.toast-item__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: .35;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform var(--toast-duration, 5000ms) linear;
}

.toast-item.is-shrinking .toast-item__bar {
  transform: scaleX(0);
}

.toast-item--success .toast-item__bar {
  color: #28c76f;
}

.toast-item--danger .toast-item__bar {
  color: #ea5455;
}
