/**
 * Toast Notifications - Little Camp Slocan
 * Non-intrusive notifications for success, error, info, and warning messages
 */

.toast-container {
  position: fixed;
  top: calc(var(--height-header) + var(--space-md));
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  min-width: 300px;
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(calc(100% + var(--space-lg)));
  transition: var(--transition-all);
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* Toast Types */
.toast-success {
  border-left: var(--border-thick) solid var(--color-success);
}

.toast-error {
  border-left: var(--border-thick) solid var(--color-error);
}

.toast-warning {
  border-left: var(--border-thick) solid var(--color-warning);
}

.toast-info {
  border-left: var(--border-thick) solid var(--color-info);
}

/* Toast Icon */
.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.toast-success .toast-icon {
  color: var(--color-success);
}

.toast-error .toast-icon {
  color: var(--color-error);
}

.toast-warning .toast-icon {
  color: var(--color-warning);
}

.toast-info .toast-icon {
  color: var(--color-info);
}

/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-ink);
  margin-bottom: var(--space-xs);
  line-height: var(--line-height-tight);
}

.toast-message {
  font-size: var(--font-size-sm);
  color: var(--color-ink);
  line-height: var(--line-height-normal);
  word-wrap: break-word;
}

/* Close Button */
.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
}

.toast-close:hover {
  color: var(--color-ink);
  background-color: var(--color-background);
}

.toast-close:focus {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Progress Bar (optional - for timed dismissal) */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  border-radius: 0 0 0 var(--radius-xl);
  transition: width linear;
}

.toast-success .toast-progress {
  color: var(--color-success);
}

.toast-error .toast-progress {
  color: var(--color-error);
}

.toast-warning .toast-progress {
  color: var(--color-warning);
}

.toast-info .toast-progress {
  color: var(--color-info);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: var(--space-md);
    right: var(--space-md);
    left: var(--space-md);
    max-width: none;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}

/* Accessibility - reduce motion */
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity var(--transition-base);
    transform: none;
  }

  .toast.show {
    transform: none;
  }
}
