.toast-container {
  position: fixed;
  z-index: 9999;
  padding: 15px;
  width: 320px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Position classes */
.toast-top-left {
  top: 0;
  left: 0;
}

.toast-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.toast-top-right {
  top: 0;
  right: 0;
}

.toast-center-left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.toast-center-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.toast-center-right {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.toast-bottom-left {
  bottom: 0;
  left: 0;
}

.toast-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.toast-bottom-right {
  bottom: 0;
  right: 0;
}

/* RTL support */
.toast-rtl {
  direction: rtl;
}

/* Toast element */
.toast {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 3px 3px 10px -5px black;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  animation: toast-in-right 0.3s ease-in-out;
  max-width: 100%;
  min-width: 350px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: all;
}

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

/* Position-specific animations */
.toast-top-left .toast,
.toast-center-left .toast,
.toast-bottom-left .toast {
  animation-name: toast-in-left;
}

.toast-top-right .toast,
.toast-center-right .toast,
.toast-bottom-right .toast {
  animation-name: toast-in-right;
}

.toast-top-center .toast,
.toast-center-center .toast {
  animation-name: toast-in-down;
}

.toast-bottom-center .toast {
  animation-name: toast-in-up;
}


/* Position-specific removing animations */
.toast-top-left .toast.toast-removing, .toast-center-left .toast.toast-removing, .toast-bottom-left .toast.toast-removing
  {
  transform: translateX(-100%);
}

.toast-top-right .toast.toast-removing, .toast-center-right .toast.toast-removing, .toast-bottom-right .toast.toast-removing
  {
  transform: translateX(100%);
}

.toast-top-center .toast.toast-removing, .toast-center-center .toast.toast-removing, .toast-bottom-center .toast.toast-removing
  {
  transform: translateY(-100%);
}

/* RTL toast animation */
.toast-rtl .toast.toast-removing {
  transform: translateX(-100%);
}

.toast-icon {
  margin-right: 10px;
  flex-shrink: 0;
}

.toast-rtl .toast-icon {
  margin-right: 0;
  margin-left: 10px;
}

.toast-content {
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 16px;
  padding: 0;
  margin-left: 10px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.toast-rtl .toast-close {
  margin-left: 0;
  margin-right: 10px;
}

.toast-close:hover {
  opacity: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.6);
  width: 100%;
  transform-origin: left;
}

.toast-rtl .toast-progress {
  transform-origin: right;
}

/* Toast types */
.toast-success {
  border-left: 5px solid #2e7d32;
  background-color: #2e7d32;
  color: white;
}

.toast-error {
  border-left: 5px solid #18671C;
  background-color: #c62828;
  color: white;
}

.toast-info {
  border-left: 5px solid #087dcd;
  background-color: #2196f3;
  color: white;
}

.toast-warning {
  border-left: 5px solid #c45d1a;
  background-color: #ef6c00;
  color: white;
}

/* RTL toast types */
.toast-rtl .toast-success, .toast-rtl .toast-error, .toast-rtl .toast-info, .toast-rtl .toast-warning {
  border-left: none;
}

.toast-rtl .toast-success {
  border-right: 3px solid #4caf50;
}

.toast-rtl .toast-error {
  border-right: 3px solid #f44336;
}

.toast-rtl .toast-info {
  border-right: 3px solid #2196f3;
}

.toast-rtl .toast-warning {
  border-right: 3px solid #ff9800;
}

/* Animations */

@keyframes toast-in-right {
  from {
    transform:translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-in-left {
  from {
    transform:translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-in-down {
  from {
    transform:translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-in-up {
  from {
    transform:translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-rtl .toast {
  animation-name: toast-in-rtl;
}

@keyframes toast-in-rtl {
  from {
    transform:translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
