/* ============================================================
   TOAST NOTIFICATIONS - Premium Non-blocking Alerts
   ============================================================ */

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  width: calc(100% - 3rem);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

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

.toast-hiding {
  transform: translateX(120%);
  opacity: 0;
}

/* Toast types */
.toast-success {
  border-color: rgba(39, 174, 96, 0.4);
}

.toast-success .toast-icon {
  color: #27ae60;
}

.toast-error {
  border-color: rgba(231, 76, 60, 0.4);
}

.toast-error .toast-icon {
  color: #e74c3c;
}

.toast-warning {
  border-color: rgba(243, 156, 18, 0.4);
}

.toast-warning .toast-icon {
  color: #f39c12;
}

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

.toast-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.toast-message {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

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

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

/* Progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.toast-progress-bar {
  height: 100%;
  background: var(--brand-accent);
  width: 100%;
  transform-origin: left;
  animation: toast-progress linear forwards;
}

.toast-success .toast-progress-bar {
  background: #27ae60;
}

.toast-error .toast-progress-bar {
  background: #e74c3c;
}

.toast-warning .toast-progress-bar {
  background: #f39c12;
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
  .toast-container {
    top: auto;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    width: auto;
  }
  
  .toast {
    transform: translateY(120%);
  }
  
  .toast-show {
    transform: translateY(0);
  }
  
  .toast-hiding {
    transform: translateY(120%);
  }
}
