/* my-gui toast extras (wl-controls, wishlist 18, 19, 4. pótlás 7): action (Undo) button, close button, swipe.
   The toast itself is in overlay.css; behaviour in ui.js (queue limit, pause on hover / focus, swipe). */

.m-toast-msg { min-width: 0; }

.m-toast-act {
  flex: 0 0 auto;
  margin-inline-start: 4px;
  padding: 4px 9px;
  border: 0;
  border-radius: 8px;
  background: var(--m-accent-wash);
  color: var(--m-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--m-t-fast) var(--m-ease);
}
.m-toast-act:hover { background: rgba(var(--m-accent-rgb), .16); }
.m-toast-act:focus-visible, .m-toast-x:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--m-ring); }

.m-toast-x {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-inline: 2px -6px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--m-text-3);
  cursor: pointer;
}
.m-toast-x:hover { color: var(--m-text); background: rgba(var(--m-ink), .06); }
.m-toast-x .m-i { width: 13px; height: 13px; }

/* swipe to dismiss: ui.js sets --m-swipe (px) and --m-swipe-fade while the finger moves */
.m-toast { touch-action: pan-y; }
.m-toast.is-swiping {
  transform: translateX(var(--m-swipe, 0px));
  opacity: var(--m-swipe-fade, 1);
  transition: none;
  cursor: grabbing;
}
.m-toast.is-swiped-end { transform: translateX(110%); opacity: 0; }
.m-toast.is-swiped-start { transform: translateX(-110%); opacity: 0; }
