.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 400px;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #e0e0e0;
  background: rgba(30, 30, 46, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 4px solid #6c7086;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 280px;
}

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

.toast.toast-hiding {
  opacity: 0;
  transform: translateX(40px);
}

/* Icon */

.toast .toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-top: 1px;
}

/* Content */

.toast .toast-content {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.toast .toast-action {
  flex: 0 0 auto;
  align-self: center;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.toast .toast-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  opacity: 0.72;
}

.toast .toast-close:hover,
.toast .toast-action:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

/* Progress bar */

.toast .toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 0 10px;
  animation: toast-progress-shrink linear forwards;
}

@keyframes toast-progress-shrink {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ── Type variants ── */

.toast.success {
  background: rgba(76, 175, 80, 0.92);
  border-left-color: #2e7d32;
  color: #fff;
}

.toast.success .toast-icon {
  color: #fff;
}

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

.toast.errorToast {
  background: rgba(244, 67, 54, 0.92);
  border-left-color: #c62828;
  color: #fff;
}

.toast.errorToast .toast-icon {
  color: #fff;
}

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

.toast.danger {
  background: rgba(244, 67, 54, 0.92);
  border-left-color: #c62828;
  color: #fff;
}

.toast.danger .toast-icon {
  color: #fff;
}

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

.toast.warning {
  background: rgba(255, 152, 0, 0.92);
  border-left-color: #e65100;
  color: #fff;
}

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

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

.toast.info {
  background: rgba(33, 150, 243, 0.92);
  border-left-color: #1565c0;
  color: #fff;
}

.toast.info .toast-icon {
  color: #fff;
}

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

.toast.default {
  background: rgba(108, 92, 231, 0.92);
  border-left-color: #4a3fa0;
  color: #fff;
}

.toast.default .toast-icon {
  color: #fff;
}

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

/* ── Responsive ── */

@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .toast {
    min-width: 0;
  }
}
