.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  align-items: flex-end;
}

.toast-item {
  background-color: var(--secondary-background);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 380px;
  animation: slideIn 0.3s ease-out forwards;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.toast-item.exiting {
  animation: slideOut 0.3s ease-in forwards;
}

.toast-item.error {
  border-color: var(--accent-color);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.toast-title {
  font-size: 1rem;
  font-weight: bold;
  white-space: pre-wrap;
  word-break: break-word;
}

.toast-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.toast-close-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  margin-top: -2px;
}

.toast-close-button:hover {
  background-color: var(--accent-color);
  color: var(--text-primary);
}
