/* Toasty: komunikaty po operacji w prawym dolnym rogu — znikają same albo po krzyżyku. */

.toasts {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.65rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toasts--inline {
  position: static;
  pointer-events: auto;
  width: min(22rem, 100%);
}
.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}
.toast__icon { color: var(--primary-ink); font-size: 1.15rem; margin-top: 0.05rem; }
.toast__text { margin: 0; }
.toast__close {
  width: 1.6rem; height: 1.6rem;
  display: inline-grid; place-items: center;
  border: 0; background: transparent;
  color: var(--ink-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.1rem;
}
.toast__close:hover { color: var(--ink); background: var(--sidebtn-hover); }
.toast--success { border-left: 3px solid var(--success); }
.toast--success .toast__icon { color: var(--success-ink); }
.toast--warn { border-left: 3px solid var(--warn); }
.toast--warn .toast__icon { color: var(--warn-ink); }
.toast--danger { border-left: 3px solid var(--danger); }
.toast--danger .toast__icon { color: var(--danger-ink); }
.toast--info { border-left: 3px solid var(--primary); }
.toast--out { animation: toast-out 160ms ease-in forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(0.75rem); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(0.75rem); }
}
