/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--blur);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 420px;
  pointer-events: auto;
  cursor: pointer;
  animation: toastSlideUp 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.toast.toast-exiting {
  animation: toastFadeOut 0.2s ease-in forwards;
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.toast-success .toast-icon { color: var(--status-online); }
.toast-error .toast-icon { color: var(--status-dnd); }
.toast-warning .toast-icon { color: var(--accent); }

.toast-success { border-color: rgba(34, 197, 94, 0.3); }
.toast-error { border-color: rgba(239, 68, 68, 0.3); }
.toast-warning { border-color: rgba(251, 191, 36, 0.3); }

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  animation: toastProgress 3s linear forwards;
}

.toast-success .toast-progress { background: var(--status-online); }
.toast-error .toast-progress { background: var(--status-dnd); }
.toast-warning .toast-progress { background: var(--accent); }

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastFadeOut {
  to {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 480px) {
  .toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}
