/* Modern Toast Notification Styles */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}

.toast-notification {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
  padding: 16px;
  pointer-events: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

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

/* Success indicator bar */
.toast-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast-notification {
    margin-bottom: 8px;
    padding: 12px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toast-notification {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
  }
  
  .toast-notification .text-content {
    color: #f9fafb;
  }
}

/* Animation keyframes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Hover effects */
.toast-notification:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateX(0) translateY(-2px);
}

/* Button styles */
.toast-notification button {
  transition: all 0.2s ease;
}

.toast-notification button:hover {
  transform: translateY(-1px);
}

/* Close button */
.toast-notification .close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s;
}

.toast-notification .close-btn:hover {
  color: #6b7280;
  background: rgba(0, 0, 0, 0.05);
}

/* Product image styling */
.toast-notification .product-image {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-notification .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text content styling */
.toast-notification .text-content {
  flex: 1;
  min-width: 0;
}

.toast-notification .success-message {
  font-weight: 600;
  color: #059669;
  font-size: 14px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast-notification .product-name {
  font-weight: 500;
  color: #111827;
  font-size: 14px;
  margin-bottom: 2px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-notification .product-details {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 12px;
}

/* Action buttons */
.toast-notification .action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.toast-notification .btn-primary {
  background: #111827;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  flex: 1;
}

.toast-notification .btn-primary:hover {
  background: #374151;
}

.toast-notification .btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.toast-notification .btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Accessibility improvements */
.toast-notification:focus-within {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .toast-notification {
    border: 2px solid #000;
  }
  
  .toast-notification::before {
    background: #000;
  }
}

/* Removal toast specific styles */
.toast-notification.removal-toast {
  border-left: 4px solid #ef4444;
}

.toast-notification.removal-toast::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.toast-notification.removal-toast .success-message {
  color: #dc2626;
}

.toast-notification.removal-toast .success-message i {
  color: #ef4444;
}

/* Undo button specific styling */
.toast-notification .btn-undo {
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  flex: 1;
}

.toast-notification .btn-undo:hover {
  background: #2563eb;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .toast-notification {
    transition: none;
  }
  
  .toast-notification button {
    transition: none;
  }
}
