/**
 * Universal Toast Notification System
 * Standalone CSS - Include in any page that needs toast notifications
 * Usage: <link rel="stylesheet" href="css/toast.css">
 */

/* Base Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1.125rem 1.75rem;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-size: 0.9375rem;
  min-width: 280px;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-notification i {
  font-size: 1.375rem;
  margin-right: 0;
  flex-shrink: 0;
  opacity: 0.95;
  animation: iconPulse 0.6s ease-out;
}

@keyframes iconPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
}

.toast-notification span {
  flex: 1;
  line-height: 1.5;
}

.toast-notification.show:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.toast-notification.show:hover i {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Success Toast - Vibrant Green (for creating/adding) */
.toast-notification.toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  border-left: 4px solid #047857;
}

/* Info Toast - Modern Blue (for updating/editing) */
.toast-notification.toast-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  border-left: 4px solid #1d4ed8;
}

/* Error Toast - Rich Red (for deleting/errors) */
.toast-notification.toast-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  border-left: 4px solid #b91c1c;
}

/* Warning Toast - Warm Orange (for warnings/alerts) */
.toast-notification.toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  border-left: 4px solid #b45309;
  color: #ffffff;
}

/* Unlink Toast - Yellow (for unlinking/removing associations) */
.toast-notification.toast-unlink {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

/* Legacy compatibility - Order saved toast */
.order-saved-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.order-saved-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.order-saved-toast i {
  font-size: 1.125rem;
  margin-right: 0.5rem;
}

/* Delete Confirmation Modal */
.delete-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.delete-confirm-overlay.show {
  opacity: 1;
}

.delete-confirm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  border-radius: 16px;
  padding: 2rem;
  min-width: 400px;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  opacity: 0;
  transition: all 0.3s ease;
}

.delete-confirm-modal.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.delete-confirm-icon {
  text-align: center;
  margin-bottom: 1.5rem;
}

.delete-confirm-icon i {
  font-size: 4rem;
  color: #f59e0b;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.delete-confirm-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.delete-confirm-message {
  text-align: center;
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.delete-confirm-message strong {
  color: #ef4444;
  font-weight: 700;
  display: inline-block;
  margin-top: 0.5rem;
}

.delete-confirm-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.delete-confirm-buttons button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-confirm-cancel {
  background: #f3f4f6;
  color: #6b7280;
}

.btn-confirm-cancel:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-confirm-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-confirm-delete:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* Unlink Modal Styles (Yellow/Orange Theme) */
.delete-confirm-modal.unlink-modal .delete-confirm-icon i {
  color: #f59e0b;
}

.delete-confirm-modal.unlink-modal .delete-confirm-message strong {
  color: #f59e0b;
}

.btn-confirm-unlink {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-confirm-unlink:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

/* Logout Modal Styles (Purple/Primary Theme) */
.delete-confirm-modal.logout-modal .delete-confirm-icon i {
  color: var(--theme-primary, #886ab5);
}

.delete-confirm-modal.logout-modal .delete-confirm-message {
  color: #6b7280;
}

.delete-confirm-modal.logout-modal .delete-confirm-message strong {
  color: var(--theme-primary, #886ab5);
}

.btn-confirm-logout {
  background: linear-gradient(135deg, var(--theme-primary, #886ab5) 0%, #6b4d9a 100%);
  color: white;
}

.btn-confirm-logout:hover {
  background: linear-gradient(135deg, #6b4d9a 0%, #5a3d8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(136, 106, 181, 0.4);
}

/* Pointer cursor for entire modal */
.delete-confirm-modal {
  cursor: pointer;
}

/* Allow text selection in message */
.delete-confirm-message,
.delete-confirm-message * {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* Pointer cursor for buttons */
.delete-confirm-buttons button,
.delete-confirm-buttons button * {
  cursor: pointer !important;
  user-select: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .toast-notification,
  .order-saved-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    justify-content: center;
    min-width: auto;
  }

  .delete-confirm-modal {
    min-width: 90%;
    max-width: 90%;
    padding: 1.5rem;
  }
  
  .delete-confirm-icon i {
    font-size: 3rem;
  }
  
  .delete-confirm-title {
    font-size: 1.25rem;
  }
  
  .delete-confirm-buttons {
    flex-direction: column;
  }
  
  .delete-confirm-buttons button {
    width: 100%;
    justify-content: center;
  }
}

