/* Message toast – shown on all user pages (bottom right) */
.user-messages-toast-container {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.user-messages-toast {
  pointer-events: auto;
  width: 320px;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 32px));
  min-height: 88px;
  max-height: 240px;
  padding: 0;
  border-radius: 10px;
  background: #f6f0e6;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  color: #1f1b16;
  font-size: 0.85rem;
  animation: user-messages-toast-in 0.25s ease-out;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.user-messages-toast:hover {
  background: #f9f3ea;
}

.user-messages-toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.user-messages-toast-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.user-messages-toast-icon {
  width: 18px;
  height: 18px;
  color: #2196F3;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.user-messages-toast-app-name {
  font-weight: 600;
  font-size: 0.8rem;
  color: #1f1b16;
  text-shadow: none;
}

.user-messages-toast-body {
  padding: 15px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #1f1b16;
}

.user-messages-toast-from {
  font-weight: 600;
  color: #1f1b16;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-messages-toast-preview {
  color: #1f1b16;
  font-size: 0.8rem;
  line-height: 1.35;
  text-shadow: none;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: calc(1.35em * 2);
  max-height: calc(1.35em * 2);
}

@keyframes user-messages-toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .user-messages-toast-container {
    bottom: 12px;
    right: 8px;
    left: auto;
    width: 50vw;
    max-width: 50vw;
  }

  .user-messages-toast {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .user-messages-toast-header {
    justify-content: flex-start;
    text-align: left;
    padding: 6px 8px;
    gap: 8px;
  }

  .user-messages-toast-app-name {
    text-align: left;
  }

  .user-messages-toast-from {
    text-align: right;
    margin-left: auto;
  }

  .user-messages-toast-body { padding: 15px; }

  .user-messages-toast-preview {
    -webkit-line-clamp: 2;
    line-height: 1.35;
    min-height: calc(1.35em * 2);
    max-height: calc(1.35em * 2);
  }
}
