/* Chat-Tag private notes, port 5.5. Native Message.private marker only. */
.message-bubble-container[data-private-note="true"] {
  --ct-private-note-gutter: 2rem;
}
.message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) > .grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 24px !important;
}
/* The native private message has one context-menu button (reactions are disabled).
   Keep it in the existing 2rem gutter rather than making the note asymmetric. */
.message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) > .grid > [class~="[grid-area:bubble]"] {
  position: relative;
}
.message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) > .grid > [class~="[grid-area:bubble]"] > .context-menu-wrap {
  position: absolute;
  inset-inline-end: 100%;
  bottom: 0;
}
.message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) > .grid > [class~="[grid-area:bubble]"] > .flex.flex-col.gap-1 {
  flex: 1 1 0%;
  width: 100%;
  max-width: none;
  overflow-wrap: anywhere;
}
.message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) [data-bubble-name="text"] {
  width: 100%;
  max-width: none;
}
.message-bubble-container[data-private-note="true"] .prose-bubble {
  font-weight: 400 !important;
  overflow-wrap: anywhere;
}
.message-bubble-container[data-private-note="true"] .prose-bubble :where(p, li, blockquote, td, th) {
  font-weight: 400 !important;
}
.message-bubble-container[data-private-note="true"] .prose-bubble :where(a, .prosemirror-mention-node) {
  font-weight: inherit !important;
}
/* Underline keeps link meaning while native note text supplies theme contrast. */
.message-bubble-container[data-private-note="true"] .prose-bubble a {
  color: inherit !important;
  text-decoration-line: underline;
  text-underline-offset: 0.15em;
}
.message-bubble-container[data-private-note="true"] .prose-bubble :where(strong, b, h1, h2, h3, h4, h5, h6) {
  font-weight: 700 !important;
}
@media (max-width: 767px) {
  .message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) > .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .message-bubble-container[data-private-note="true"]:has([data-bubble-name="text"]):not(.cursor-pointer) > .grid > [class~="[grid-area:bubble]"] {
    margin-inline-end: var(--ct-private-note-gutter);
  }
}
