/* Toast Notifications - Temporary Pop-up Notifications */

/* Container for all toast notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Individual toast notification */
.toast-notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(30, 25, 40, 0.98) 0%, rgba(20, 15, 30, 0.99) 100%);
  border-radius: 10px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  animation: toast-slide-in 0.3s ease-out forwards;
  position: relative;
  overflow: hidden;
}

/* Left accent border for toast type */
.toast-notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

/* Toast types */
.toast-notification.toast-success::before {
  background: linear-gradient(180deg, #10b981, #059669);
}

.toast-notification.toast-error::before {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.toast-notification.toast-warning::before {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.toast-notification.toast-info::before {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

/* Icon container */
.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon i {
  font-size: 1em;
}

.toast-success .toast-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.toast-info .toast-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* Toast content */
.toast-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.toast-title {
  font-size: 0.8em;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  white-space: nowrap;
  display: inline-block;
  will-change: transform;
}

/* Close button */
.toast-close {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.toast-close i {
  font-size: 0.7em;
}

/* Progress bar for auto-dismiss */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 10px 10px;
  animation: toast-progress-shrink linear forwards;
}

/* Animations */
@keyframes toast-slide-in {
  0% {
    opacity: 0;
    transform: translateX(100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(100px);
  }
}

@keyframes toast-progress-shrink {
  0% {
    width: 100%;
  }
  100% {
    width: 0%;
  }
}

/* Toast exit animation */
.toast-notification.toast-exit {
  animation: toast-slide-out 0.3s ease-in forwards;
}

/* Hover pause for progress */
.toast-notification:hover .toast-progress {
  animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast-notification {
    min-width: auto;
    max-width: none;
  }
}
