/* Simple toast styles */
/* Container: bottom-centered stack */
#toast-container {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none; /* allow clicks through gaps */
}

/* Toast card */
.toast {
  width: fit-content;
  max-width: 92vw;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  background: linear-gradient(180deg, #1e2228, #0b0d10);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 28px -14px rgba(0,0,0,0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  animation: toast-in .25s ease-out forwards;
  font-family: var(--font-family);
  font-size: 1.1rem;
  font-weight: 400;
  pointer-events: auto; /* clickable close */
}

/* Single-line message */
.toast .text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .95;
  max-width: 80vw; /* ensure no overflow on small screens */
}

/* Unify all types to the same gradient */
.toast.success, .toast.error, .toast.info, .toast.warn { background: linear-gradient(180deg, #1e2228, #0b0d10); }

/* Close button */
.toast .close {
  margin-left: auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  opacity: .85;
  transition: background-color .15s ease, opacity .15s ease;
}
.toast .close:hover { background: rgba(255,255,255,0.06); opacity: 1; }
.toast .close:active { background: rgba(255,255,255,0.10); }
.toast .close:focus-visible { outline: 2px solid var(--border); outline-offset: 2px; }

/* Hover elevation */
.toast:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 36px -18px rgba(0,0,0,0.9); }

/* Compact modifier */
.toast.compact { padding: 8px 10px; font-size: 13px; }

/* Animations */
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; opacity: 1; transform: none; }
}

/* Responsive: tighten on small screens */
@media (max-width: 480px) {
  #toast-container { bottom: 12px; gap: 8px; }
  .toast { max-width: 92vw; padding: 10px 12px; }
}
