.notifications {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  direction: rtl; /* Arabic RTL support */
}

.toast {
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--light1);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.4s ease forwards;
  --color: var(--successColor);
  color: var(--color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast i {
  font-size: 20px;
  color: var(--color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast .content {
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.toast .title {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
}

.toast span {
  font-size: 13px;
  color: var(--dark3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast .close {
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
  color: var(--dark3);
  flex-shrink: 0;
}

/* Progress bar */
.toast::before {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: var(--color);
  box-shadow: 0 0 10px var(--color);
  content: "";
  width: 100%;
  height: 4px;
  animation: timeOut 3s linear forwards;
}

/* Animation: slide from top */
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes timeOut {
  to {
    width: 0%;
  }
}

/* Type classes */
.toast.error {
  --color: var(--errorColor);
}
.toast.warning {
  --color: var(--warningColor);
}
.toast.info {
  --color: var(--informationColor);
}
