/* Premium Toast Notifications - Top-tier UX/UI */

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(30px) scale(0.9);
  padding: 16px 28px;
  background: rgba(28, 28, 30, 0.95);
  color: white;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: calc(100% - 40px);
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast.hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast Types with enhanced styling */
.toast-success {
  background: linear-gradient(135deg, #34C759 0%, #30B350 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(52, 199, 89, 0.3);
}

.toast-error {
  background: linear-gradient(135deg, #FF3B30 0%, #E63329 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(255, 59, 48, 0.3);
}

.toast-warning {
  background: linear-gradient(135deg, #FF9500 0%, #FF8C00 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(255, 149, 0, 0.3);
}

.toast-info {
  background: linear-gradient(135deg, rgba(28, 28, 30, 0.98) 0%, rgba(44, 44, 46, 0.98) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Toast icon support */
.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 18px;
}

/* Toast progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 16px 16px;
  animation: toastProgress 4s linear forwards;
}

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

.toast-success .toast-progress {
  background: rgba(255, 255, 255, 0.4);
}

.toast-error .toast-progress {
  background: rgba(255, 255, 255, 0.4);
}

/* Toast animation variants */
.toast-slide-up {
  animation: toastSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.toast-scale {
  animation: toastScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes toastScale {
  from {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.toast-bounce {
  animation: toastBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes toastBounce {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.3);
  }
  60% {
    transform: translate(-50%, 0) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* Stacked toasts */
.toast-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  bottom: 100px;
}

.toast-stack .toast {
  position: relative;
  left: auto;
  transform: none;
}

.toast-stack .toast.show {
  transform: none;
}

/* Mobile optimized */
@media (max-width: 480px) {
  .toast {
    bottom: 80px;
    padding: 14px 20px;
    font-size: 14px;
    border-radius: 12px;
  }
}
