/*
 * Toast Notification
 * Positions: top-right, top-left, bottom-right, bottom-left
 * Auto-dismiss, stackable
 */

.toast-container {
  position: fixed;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  max-width: 24rem;
  width: 100%;
}

.toast-container.top-right {
  top: var(--space-4);
  right: var(--space-4);
}

.toast-container.top-left {
  top: var(--space-4);
  left: var(--space-4);
}

.toast-container.bottom-right {
  bottom: var(--space-4);
  right: var(--space-4);
}

.toast-container.bottom-left {
  bottom: var(--space-4);
  left: var(--space-4);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 200ms ease;
}

.toast-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.toast-content {
  flex: 1;
  font-size: var(--text-sm);
}

.toast-title {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.toast-dismiss {
  flex-shrink: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.toast-dismiss:hover {
  color: var(--color-text);
}

/* Progress bar for auto-dismiss */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  animation: toast-progress linear forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}
