/**
 * Toast Notification Styles
 * Best practice implementation - accessible, performant, beautiful
 */

/* Toast Container */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  width: calc(100% - 2rem);
  pointer-events: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 768px) {
  .toast-container {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    width: auto;
  }
}

/* Toast Notification */
.toast-notification {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 56px;
  position: relative;
  overflow: hidden;
}

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

.toast-notification.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

/* Toast Icon */
.toast-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast Message */
.toast-message {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1a202c;
  font-weight: 500;
}

/* Toast Close Button */
.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: auto;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1a202c;
}

.toast-close:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Toast Types */
.toast-notification-success {
  border-left: 4px solid #10b981;
}

.toast-notification-success .toast-icon {
  color: #10b981;
}

.toast-notification-error {
  border-left: 4px solid #ef4444;
}

.toast-notification-error .toast-icon {
  color: #ef4444;
}

.toast-notification-warning {
  border-left: 4px solid #f59e0b;
}

.toast-notification-warning .toast-icon {
  color: #f59e0b;
}

.toast-notification-info {
  border-left: 4px solid #6366f1;
}

.toast-notification-info .toast-icon {
  color: #6366f1;
}

/* Dark Mode Support */
[data-bs-theme="dark"] .toast-notification {
  background: #1e293b;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .toast-message {
  color: #e5e7eb;
}

[data-bs-theme="dark"] .toast-close {
  color: #9ca3af;
}

[data-bs-theme="dark"] .toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .toast-notification {
    transition: opacity 0.2s ease;
    transform: none;
  }
  
  .toast-notification.toast-show {
    transform: none;
  }
  
  .toast-notification.toast-hide {
    transform: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .toast-notification {
    border-width: 2px;
    border-style: solid;
  }
  
  .toast-notification-success {
    border-color: #10b981;
  }
  
  .toast-notification-error {
    border-color: #ef4444;
  }
  
  .toast-notification-warning {
    border-color: #f59e0b;
  }
  
  .toast-notification-info {
    border-color: #6366f1;
  }
}

/* Print Styles */
@media print {
  .toast-container {
    display: none;
  }
}

