/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 380px;
  width: calc(100% - 40px);
  pointer-events: none; /* Container erlaubt Events durchzulassen */
}

/* Toast Benachrichtigung */
.toast {
  background: var(--toast-bg, var(--surface-card));
  border: 1px solid var(--toast-border, var(--border-default));
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: auto; /* Toast selbst bekommt Events */
  max-width: 100%;
}

.toast.visible {
  transform: translateX(0);
  opacity: 1;
}

/* Toast Header */
.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.06), rgba(124, 58, 237, 0.04));
  border-bottom: 1px solid var(--border-subtle);
}

.toast-title {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--cyan-400);
}

.toast-close {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.toast-close:hover {
  color: var(--cyan-400);
  background: var(--surface-hover);
}

/* Toast Body */
.toast-body {
  padding: var(--space-4);
}

/* Produkt-Info im Toast */
.toast-product {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.toast-product-image {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cyan-500), var(--violet-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-md);
  color: white;
  flex-shrink: 0;
}

.toast-product-info {
  flex: 1;
  min-width: 0;
}

.toast-product-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-product-price {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Toast Actions */
.toast-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-qty {
  display: flex;
  align-items: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.toast-qty-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toast-qty-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.toast-qty-btn:active {
  transform: scale(0.9);
}

.toast-qty-value {
  padding: 0 var(--space-2);
  color: var(--text-primary);
  min-width: 24px;
  text-align: center;
}

.toast-view-cart {
  font-size: var(--text-sm);
  color: var(--cyan-400);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(8, 145, 178, 0.08);
  transition: all 0.2s ease;
}

.toast-view-cart:hover {
  background: rgba(8, 145, 178, 0.15);
}

/* Responsive */
@media (max-width: 480px) {
  .toast-container {
    bottom: 10px;
    right: 10px;
    width: calc(100% - 20px);
  }
}

/* Animation */
@keyframes toast-in {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}
