/* Toast Notification System */

.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid;
  pointer-events: auto;
  animation: slideIn 0.3s ease-out;
  min-width: 320px;
}

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

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 24px;
  height: 24px;
}

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

.toast-message {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-900);
  margin: 0;
  word-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gray-400);
  transition: color 0.2s ease;
  padding: 0;
}

.toast-close:hover {
  color: var(--color-gray-600);
}

.toast-close svg {
  width: 18px;
  height: 18px;
}

/* Toast Types */
.toast-success {
  border-left-color: var(--color-success-500);
}

.toast-success .toast-icon {
  color: var(--color-success-500);
}

.toast-error {
  border-left-color: var(--color-error-500);
}

.toast-error .toast-icon {
  color: var(--color-error-500);
}

.toast-warning {
  border-left-color: var(--color-warning-500);
}

.toast-warning .toast-icon {
  color: var(--color-warning-500);
}

.toast-info {
  border-left-color: var(--color-primary-500);
}

.toast-info .toast-icon {
  color: var(--color-primary-500);
}

/* Responsive */
@media (max-width: 640px) {
  .toast-container {
    top: var(--space-2);
    right: var(--space-2);
    left: var(--space-2);
    max-width: none;
  }
  
  .toast {
    min-width: auto;
  }
}
