#toast-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  width: 100%;
}

.toast {
  background-color: #333;
  color: #fff;
  padding: 16px;
  margin-bottom: 10px;
  min-width: 200px;
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: relative;
  overflow: hidden;
  padding-right: 32px;
}

.toast .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.7);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform linear;
}

.toast .close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.toast .close-btn:hover {
  color: #ccc;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  background-color: rgb(22 163 74);
}

.toast.warning {
  background-color: rgb(202 138 4);
}

.toast.error {
  background-color: rgb(220 38 38);
}

.toast.hide {
  opacity: 0;
  transform: translateX(-100%);
}

@media(min-width:768px){
  #toast-container {
    width:auto;
    top: 20px;
    left: 20px;
    max-width: 320px;
  }
  .toast{
    border-radius: 6px;
  }
}