/* Toast Notification Styles */

.toast-notification {
  /* Ensure smooth transitions */
  transition: all 0.3s ease-in-out;
}

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

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

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

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

/* Desktop toast animations (slide from right) */
@media (min-width: 768px) {
  .toast-notification {
    animation: slideInFromRight 0.3s ease-in-out;
  }

  .toast-notification.toast-exiting {
    animation: slideOutToRight 0.3s ease-in-out;
  }
}

/* Mobile toast animations (slide from bottom) */
@media (max-width: 767px) {
  .toast-notification {
    animation: slideInFromBottom 0.3s ease-in-out;
  }

  .toast-notification.toast-exiting {
    animation: slideOutToBottom 0.3s ease-in-out;
  }
}

/* Toast container positioning helpers */
#toast-container {
  /* Ensure proper z-index layering */
  z-index: 1000;
}

/* Responsive positioning classes */
.toast-desktop-container {
  position: fixed;
  top: 5rem; /* Below typical navigation */
  right: 1rem;
  max-width: 24rem;
  width: 100%;
}

.toast-mobile-container {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: none;
}

/* Hover effects for interactive elements */
.toast-notification button {
  transition: color 0.15s ease-in-out;
}

.toast-notification button:hover {
  transform: scale(1.05);
}

.toast-notification button:active {
  transform: scale(0.95);
}

/* Focus styles for accessibility */
.toast-notification button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
  border-radius: 0.25rem;
}

/* Success toast variant (for future use) */
.toast-success {
  border-left-color: #10b981;
}

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

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

.toast-success .toast-close:hover {
  color: #059669;
}

/* Warning toast variant (for future use) */
.toast-warning {
  border-left-color: #f59e0b;
}

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

.toast-warning .toast-close {
  color: #f59e0b;
}

.toast-warning .toast-close:hover {
  color: #d97706;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toast-notification {
    background-color: #374151;
    color: #f9fafb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
      0 4px 6px -2px rgba(0, 0, 0, 0.15);
  }

  .toast-notification p {
    color: #f9fafb;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .toast-notification {
    animation: none;
    transition: opacity 0.2s ease-in-out;
  }

  .toast-notification.toast-exiting {
    animation: none;
    opacity: 0;
  }
}
