/* ── Tiptap editor ─────────────────────────────────────────────────────── */

.ProseMirror {
  outline: none;
  word-break: break-word;
  padding: 0.75rem 1rem;
  min-height: 5em;
}

/* Placeholder */
.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  float: left;
  height: 0;
}

/* Prose content inside editor */
.ProseMirror > * + * {
  margin-top: 0.5em;
}

.ProseMirror h1 { font-size: 1.5em; font-weight: 700; line-height: 1.2; }
.ProseMirror h2 { font-size: 1.25em; font-weight: 700; line-height: 1.2; }
.ProseMirror h3 { font-size: 1.1em; font-weight: 700; line-height: 1.2; }

.ProseMirror strong { font-weight: 700; }
.ProseMirror em { font-style: italic; }
.ProseMirror s { text-decoration: line-through; }

.ProseMirror code {
  font-family: monospace;
  font-size: 0.875em;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.ProseMirror pre {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.75em 1em;
  font-family: monospace;
  font-size: 0.875em;
  overflow-x: auto;
}

.ProseMirror pre code {
  background: none;
  padding: 0;
}

.ProseMirror ul,
.ProseMirror ol {
  padding-left: 1.5em;
}

.ProseMirror li { margin-bottom: 0.25em; }

.ProseMirror blockquote {
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.75em;
  margin-left: 0;
  color: rgba(255, 255, 255, 0.6);
}

.ProseMirror hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 1em 0;
}

.ProseMirror a {
  color: #00E9FF;
  text-decoration: underline;
}


/* ── Bubble menu (appears on text selection) ───────────────────────────── */

.tiptap-bubble-menu {
  position: fixed;
  z-index: 100;
  align-items: center;
  gap: 2px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  white-space: nowrap;
}

.tiptap-bubble-menu button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
  min-width: 28px;
  text-align: center;
}

.tiptap-bubble-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f4f4;
}

.tiptap-bubble-menu button.is-active {
  background: rgba(0, 233, 255, 0.15);
  color: #00E9FF;
}

.tiptap-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 3px;
  flex-shrink: 0;
}


/* ── .trix-content — used by Action Text when rendering stored content ── */

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.trix-content * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.trix-content > * + * {
  margin-top: 0.5em;
}

.trix-content h1 { font-size: 1.5em; font-weight: 700; line-height: 1.2; }
.trix-content h2 { font-size: 1.25em; font-weight: 700; line-height: 1.2; }
.trix-content h3 { font-size: 1.1em; font-weight: 700; line-height: 1.2; }

.trix-content strong { font-weight: 700; }
.trix-content em { font-style: italic; }
.trix-content s { text-decoration: line-through; }

.trix-content a:not(.attachment a) {
  color: #00E9FF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trix-content a:not(.attachment a):hover {
  opacity: 0.8;
}

.trix-content code {
  font-family: monospace;
  font-size: 0.875em;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}

.trix-content li { margin-left: 1em; }

.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.trix-content img {
  max-width: 100%;
  height: auto;
}

.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}

.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}

.trix-content .attachment a:hover,
.trix-content .attachment a:visited:hover {
  color: inherit;
}

.trix-content .attachment__caption {
  text-align: center;
}

.trix-content .attachment__caption .attachment__name + .attachment__size::before {
  content: ' \2022 ';
}

.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}

.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}

.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}

.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.trix-content .attachment-gallery .attachment,
.trix-content .attachment-gallery > action-text-attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 .attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 .attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}
