/**
 * Toast Notification Styles
 *
 * Custom styles for Toastify-js toast notifications.
 * Position: top-right with slide-in animation.
 * Matches existing codebase design system (Inter font, emerald/red/amber colors).
 */

/* Override Toastify default positioning */
.toastify {
  position: fixed;
  z-index: 9999;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  word-wrap: break-word;
}

/* Top-right positioning */
.toastify.on {
  opacity: 1;
}

/* Close button styling */
.toast-close {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  margin-left: 12px;
  opacity: 0.7;
  padding: 0;
  transition: opacity 0.2s ease;
}

.toast-close:hover {
  opacity: 1;
}

/* Slide-in animation from right */
@keyframes toast-slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Slide-out animation to right */
@keyframes toast-slide-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Apply animations */
.toastify.toastify-right {
  animation: toast-slide-in-right 0.3s ease-out forwards;
}

.toastify.toastify-right.toastify-out {
  animation: toast-slide-out-right 0.3s ease-in forwards;
}

/* Toast notification class for additional styling */
.toast-notification {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Success toast - emerald-500 */
.toast-success {
  background: #10b981;
  color: #ffffff;
}

/* Error toast - red-500 */
.toast-error {
  background: #ef4444;
  color: #ffffff;
}

/* Warning toast - amber-500 */
.toast-warning {
  background: #f59e0b;
  color: #ffffff;
}

/* Network error toast - Stockaroo green */
.toast-network {
  background: #25863a;
  color: #ffffff;
}

/* Retry button in toast */
.toast-retry-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
  padding: 4px 10px;
  transition: background 0.2s ease;
}

.toast-retry-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toastify {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .toastify {
    max-width: calc(100vw - 32px);
    left: 16px !important;
    right: 16px !important;
    margin: 0 auto;
  }
}
