/* Toast Notifications - Floating Snackbar Design */
.toast-container {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  pointer-events: none;
  max-width: 420px;
}

.toast {
  min-width: 340px;
  padding: var(--spacing-lg);
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  pointer-events: all;
  transform: translateX(500px);
  transition: transform var(--transition-base);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@media (prefers-color-scheme: dark) {
  .toast {
    background-color: rgba(30, 41, 59, 0.95);
  }
}

@keyframes toastSlideIn {
  from {
    transform: translateX(500px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.toast--show {
  transform: translateX(0);
}

.toast--hide {
  animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideOut {
  to {
    transform: translateX(500px) scale(0.9);
    opacity: 0;
  }
}

.toast__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-size: 1.125rem;
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-sm);
}

.toast--success .toast__icon {
  background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
  color: white;
}

.toast--error .toast__icon {
  background: linear-gradient(135deg, var(--color-error) 0%, #DC2626 100%);
  color: white;
}

.toast--warning .toast__icon {
  background: linear-gradient(135deg, var(--color-warning) 0%, #D97706 100%);
  color: white;
}

.toast--info .toast__icon {
  background: linear-gradient(135deg, var(--color-info) 0%, #2563EB 100%);
  color: white;
}

.toast__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toast__title {
  font-weight: var(--font-semibold);
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.toast__message {
  font-weight: var(--font-normal);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.toast__close {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  padding: 0.5rem;
  transition: all var(--transition-base);
  border-radius: var(--radius-lg);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  cursor: pointer;
}

.toast__close:hover {
  color: var(--color-text);
  background-color: var(--color-bg-tertiary);
  transform: scale(1.1);
}

.toast__close:active {
  transform: scale(0.95);
}

/* Progress Bar */
.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-border);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
}

.toast__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  transition: width 100ms linear;
}

@media (max-width: 768px) {
  .toast-container {
    left: var(--spacing-md);
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    max-width: none;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: var(--spacing-md);
  }

  .toast__icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}
