/* Toast Notification System - Beautiful Notifications */

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

.toast {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(400px);
  animation: slideIn 0.3s ease-out forwards;
  pointer-events: auto;
  border-left: 4px solid;
  transition: all 0.3s ease;
}

.toast:hover {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2), 0 6px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.toast.hiding {
  animation: slideOut 0.3s ease-in forwards;
}

/* Toast Types */
.toast.success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.toast.error {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.toast.warning {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.toast.info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* Toast Icon */
.toast-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.toast.success .toast-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.toast.error .toast-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.toast.warning .toast-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.toast.info .toast-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: #1f2937;
  line-height: 1.3;
}

.toast-message {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Close Button */
.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
  padding: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
  color: #1f2937;
}

/* Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  border-radius: 0 0 0 12px;
  opacity: 0.5;
  animation: progress linear forwards;
}

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

.toast.error .toast-progress {
  color: #ef4444;
}

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

.toast.info .toast-progress {
  color: #3b82f6;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    padding: 14px 16px;
    gap: 10px;
    font-size: 14px;
  }

  .toast-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .toast-title {
    font-size: 14px;
  }

  .toast-message {
    font-size: 12px;
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-100px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slideOut {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-100px);
    }
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .toast {
    background: #1f2937;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
  }

  .toast.success {
    background: linear-gradient(135deg, #064e3b 0%, #1f2937 100%);
  }

  .toast.error {
    background: linear-gradient(135deg, #7f1d1d 0%, #1f2937 100%);
  }

  .toast.warning {
    background: linear-gradient(135deg, #78350f 0%, #1f2937 100%);
  }

  .toast.info {
    background: linear-gradient(135deg, #1e3a8a 0%, #1f2937 100%);
  }

  .toast-title {
    color: #f9fafb;
  }

  .toast-message {
    color: #d1d5db;
  }

  .toast-close {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
  }

  .toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #f9fafb;
  }
}
