/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  pointer-events: none;
}

/* Toast Base */
.toast {
  background: #1f2937;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgb(0 0 0 / 12%);
  margin-bottom: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  color: #f9fafb;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(400px);
  opacity: 0;
}

/* Toast Icon */
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  color: white;
}

.toast.success .toast-icon {
  background: #10b981;
}

.toast.error .toast-icon {
  background: #ef4444;
}

.toast.warning .toast-icon {
  background: #f59e0b;
}

.toast.info .toast-icon {
  background: #3b82f6;
}

/* Toast Content */
.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.4;
}

.toast-message {
  color: #d1d5db;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

/* Close Button */
.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
  font-size: 16px;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  color: #d1d5db;
  background: rgb(255 255 255 / 10%);
}

/* Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgb(0 0 0 / 10%);
  transition: width linear;
}

.toast.success .toast-progress {
  background: #10b981;
}

.toast.error .toast-progress {
  background: #ef4444;
}

.toast.warning .toast-progress {
  background: #f59e0b;
}

.toast.info .toast-progress {
  background: #3b82f6;
}

/* Responsive Design */
@media (width <= 640px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
    transform: translateY(-100px);
  }

  .toast.show {
    transform: translateY(0);
  }

  .toast.hide {
    transform: translateY(-100px);
  }
}

/* Animation for multiple toasts */
@keyframes slide-down {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast:not(:first-child) {
  animation: slide-down 0.3s ease-out;
}
