.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #dc3545;
  /* or based on toast type */
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  z-index: 1000;

  /* ✅ These are key */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  display: inline-block;
  min-width: 200px;
  max-width: 500px;
  box-sizing: border-box;
  /* ✅ ensures padding doesn't break layout */

  animation: fadeInOut 5s ease forwards;
  pointer-events: none;
}

#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Toast types with icons */
.toast-success {
  background-color: #28a745;
  background-image: url('../../assets/icons/success.svg');
  /* ✔ icon */
}

.toast-error {
  background-color: #dc3545;
  background-image: url('../../assets/icons/error.svg');
  /* ❌ icon */
}

.toast-info {
  background-color: #007bff;
  background-image: url('../../assets/icons/info.svg');
  /* ℹ️ icon */
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  10% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  90% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
}

/* Mobile: show at bottom */
@media (max-width: 480px) {
  .toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #dc3545;
    /* or based on toast type */
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    z-index: 1000;

    /* ✅ These are key */
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    text-align: center;
    display: inline-block;
    min-width: 200px;
    max-width: 90%;
    box-sizing: border-box;
    /* ✅ ensures padding doesn't break layout */

    animation: fadeInOut 5s ease forwards;
    pointer-events: none;
  }

  /* Toast types with icons */
  .toast-success {
    background-color: #28a745;
    background-image: url('../../assets/icons/success.svg');
    /* ✔ icon */
  }

  .toast-error {
    background-color: #dc3545;
    background-image: url('../../assets/icons/error.svg');
    /* ❌ icon */
  }

  .toast-info {
    background-color: #007bff;
    background-image: url('../../assets/icons/info.svg');
    /* ℹ️ icon */
  }
}