/* Unified toast notification system */

#bb-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.bb-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 300px;
  max-width: 500px;
  padding: 14px 18px;
  border-radius: 8px;
  border-left: 4px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  animation: bb-toast-in 0.3s ease-out;
}

.bb-toast--exiting {
  animation: bb-toast-out 0.3s ease-in forwards;
}

/* Variants */
.bb-toast--success {
  background: #e7f7ed;
  color: #2d6a4f;
  border-left-color: #2d6a4f;
}

.bb-toast--error {
  background: #fee2e2;
  color: #b91c1c;
  border-left-color: #b91c1c;
}

.bb-toast--warning {
  background: #fff8e1;
  color: #bf6900;
  border-left-color: #bf6900;
}

.bb-toast--info {
  background: #e3f2fd;
  color: #0d47a1;
  border-left-color: #0d47a1;
}

.bb-toast--processing {
  background: #f1f5f9;
  color: #334155;
  border-left-color: #94a3b8;
}

/* Close button */
.bb-toast__close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.5;
  transition: opacity 0.2s;
  color: inherit;
  line-height: 1;
  flex-shrink: 0;
}

.bb-toast__close:hover {
  opacity: 1;
}

/* Content wrapper */
.bb-toast__content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Spinner for processing toasts */
.bb-toast__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(51, 65, 85, 0.25);
  border-radius: 50%;
  border-top-color: #334155;
  animation: bb-toast-spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Animations */
@keyframes bb-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bb-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes bb-toast-spin {
  to { transform: rotate(360deg); }
}
