/* Global Toast Notification System */
/* Based on staff-ui.css design for consistency across all pages */

:root {
  /* Toast color variables */
  --toast-success: #16a34a;
  --toast-error: #ef4444;
  --toast-warning: #f59e0b;
  --toast-info: #3b82f6;
  --toast-text: #111827;
  --toast-muted: #6b7280;
  --toast-border: #e5e7eb;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Mobile toast positioning */
@media (max-width: 768px) {
  .toast-container {
    top: 90px;
    right: 10px;
    left: 10px;
    max-width: calc(100vw - 20px);
  }
  
  .toast {
    max-width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .toast-container {
    top: 80px;
    right: 5px;
    left: 5px;
    max-width: calc(100vw - 10px);
  }
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  min-width: 300px;
  max-width: 400px;
  border-left: 4px solid var(--toast-success);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

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

.toast.success {
  border-left-color: var(--toast-success);
}

.toast.error {
  border-left-color: var(--toast-error);
}

.toast.warning {
  border-left-color: var(--toast-warning);
}

.toast.info {
  border-left-color: var(--toast-info);
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast.success .toast-icon {
  color: var(--toast-success);
}

.toast.error .toast-icon {
  color: var(--toast-error);
}

.toast.warning .toast-icon {
  color: var(--toast-warning);
}

.toast.info .toast-icon {
  color: var(--toast-info);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--toast-text);
}

.toast-message {
  font-size: 13px;
  color: var(--toast-muted);
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--toast-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  background-color: var(--toast-border);
  color: var(--toast-text);
}

/* Mobile responsive toast styles */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .toast-container {
    top: 5px;
    right: 5px;
    left: 5px;
  }
  
  .toast {
    padding: 12px 16px;
    min-width: auto;
  }
  
  .toast-title {
    font-size: 13px;
  }
  
  .toast-message {
    font-size: 12px;
  }
}
