/* mxm-toast: cross-viewport top-anchored notification toasts.
   Fires for private messages and generic notifications via mxm-toast.js. */

.mxm-toast-stack {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 16px));
  pointer-events: none;
}

@media (min-width: 900px) {
  .mxm-toast-stack {
    left: auto;
    right: 16px;
    top: 16px;
    transform: none;
  }
}

.mxm-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
  color: #111;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18), 0 1px 2px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 200ms ease, transform 200ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: pan-y;
}

.mxm-toast.mxm-toast-in {
  opacity: 1;
  transform: translateY(0);
}

.mxm-toast.mxm-toast-out {
  opacity: 0;
  transform: translateY(-12px);
}

.mxm-toast:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.22), 0 1px 2px rgba(0,0,0,0.08);
}

.mxm-toast-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e6e6e6 center/cover no-repeat;
}

.mxm-toast-body {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.mxm-toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #111;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mxm-toast-preview {
  font-size: 13px;
  color: #555;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.mxm-toast-close {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
}
.mxm-toast-close:hover { background: rgba(0,0,0,0.06); color: #222; }

/* Night mode (wondertag toggles `night-mode` on body) */
body.night-mode .mxm-toast,
body.dark-mode  .mxm-toast {
  background: #1f2329;
  color: #f0f0f0;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.3);
}
body.night-mode .mxm-toast-title,
body.dark-mode  .mxm-toast-title { color: #f5f5f5; }
body.night-mode .mxm-toast-preview,
body.dark-mode  .mxm-toast-preview { color: #b8bcc4; }
body.night-mode .mxm-toast-close,
body.dark-mode  .mxm-toast-close  { color: #aaa; }
