/* toast component (markup built by toast.js) */
#toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  /* topmost layer: above modals (500) and dropdowns (600) — a notification
     must never be hidden by the surface that triggered it */
  z-index: 700;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(480px, calc(100vw - 48px));
  background: #111;
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  animation: toast-in 0.18s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast--error   { background: #c0392b; }
.toast--success { background: #27ae60; }
.toast--info    { background: #2c6fad; }
.toast--warn    { background: #c47d17; }

.toast-bar {
  width: 140px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}
.toast-bar > div {
  height: 100%;
  background: #fff;
  width: 0;
  transition: width 0.2s;
}

.toast-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: toast-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes toast-spin { to { transform: rotate(360deg); } }

.toast-actions button {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  cursor: pointer;
}
.toast-actions button:hover { color: #fff; }
