/**
 * Toast Notification Styles
 */

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

/* Toast Base */
.toast {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
  border-left: 4px solid var(--davys-gray);
  overflow: hidden;
}

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

.toast.hide {
  opacity: 0;
  transform: translateX(100%);
}

/* Toast Content */
.toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  min-height: 60px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: var(--eerie-black);
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--davys-gray);
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: var(--cultured);
  color: var(--eerie-black);
}

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

.toast-success .toast-message {
  color: #065f46;
}

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

.toast-error .toast-message {
  color: #991b1b;
}

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

.toast-warning .toast-message {
  color: #92400e;
}

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

.toast-info .toast-message {
  color: #1e40af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast-content {
    padding: 12px 16px;
    min-height: 50px;
  }
  
  .toast-message {
    font-size: 13px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .toast {
    background: var(--eerie-black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .toast-message {
    color: var(--white);
  }
  
  .toast-close {
    color: var(--davys-gray);
  }
  
  .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
  }
  
  .toast-success {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  }
  
  .toast-success .toast-message {
    color: #6ee7b7;
  }
  
  .toast-error {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  }
  
  .toast-error .toast-message {
    color: #fca5a5;
  }
  
  .toast-warning {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  }
  
  .toast-warning .toast-message {
    color: #fcd34d;
  }
  
  .toast-info {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  }
  
  .toast-info .toast-message {
    color: #93c5fd;
  }
}

/* Animation for multiple toasts */
.toast:nth-child(1) { animation-delay: 0ms; }
.toast:nth-child(2) { animation-delay: 100ms; }
.toast:nth-child(3) { animation-delay: 200ms; }
.toast:nth-child(4) { animation-delay: 300ms; }
.toast:nth-child(5) { animation-delay: 400ms; }

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

.toast.show {
  animation: slideInRight 0.3s ease forwards;
}
