[id^="toast-container"]{
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-bottom-left,
.toast-bottom-right,
.toast-bottom-center{
  flex-direction: column-reverse;
}
.toast-top-right{ top:40px; right:20px; }
.toast-top-left{ top:40px; left:20px; }
.toast-bottom-right{ bottom:40px; right:20px; }
.toast-bottom-left{ bottom:40px; left:20px; }
.toast-top-center{
  top:40px;
  left:50%;
  transform: translateX(-50%);
}
.toast-bottom-center{
  bottom:40px;
  left:50%;
  transform: translateX(-50%);
}
.toast{
  position: relative;
  min-width: 260px;
  max-width: 420px;
  padding: 12px 16px 14px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  opacity: 0;
  pointer-events: auto;
  transition:
    opacity .3s ease,
    transform .3s ease;
}
.toast.show{
  opacity: 1;
  transform: translate(0,0);
}
.toast-top-right .toast:not(.show),
.toast-bottom-right .toast:not(.show){
  transform: translateX(40px);
}
.toast-top-left .toast:not(.show),
.toast-bottom-left .toast:not(.show){
  transform: translateX(-40px);
}
.toast-top-center .toast:not(.show){
  transform: translateY(-40px);
}
.toast-bottom-center .toast:not(.show){
  transform: translateY(40px);
}
.toast.success{ background:#16a34a; }
.toast.error{ background:#dc2626; }
.toast.warning{ background:#f59e0b; }
.toast.info{ background:#2563eb; }
.toast .close{
  float: right;
  cursor: pointer;
  margin-left: 10px;
  font-size: 18px;
  line-height: 1;
  opacity: .8;
  transition: opacity .2s ease;
}
.toast .close:hover{
  opacity: 1;
}
.toast-progress{
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,.75);
  border-radius: 0 0 6px 6px;
}
.toast.rtl{
  direction: rtl;
}
.toast.rtl .close{
  float: left;
  margin-left: 0;
  margin-right: 10px;
}
@media (max-width:480px){
  .toast{
    max-width: calc(100vw - 40px);
  }
}