.media-mention-source {
  display: none !important;
}

.canvas-node-panel .media-mention-editor {
  width: 100%;
  min-height: 92px;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.88);
  outline: none;
  resize: none;
  font: inherit;
  line-height: 1.55;
  padding: 10px 8px 10px 12px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.canvas-node-panel .media-mention-editor:focus {
  border-color: rgba(56,189,248,0.42);
  background: rgba(4,12,20,0.3);
  box-shadow: inset 0 0 0 1px rgba(56,189,248,0.12);
}

.canvas-node-text .media-mention-editor {
  min-height: 0;
  max-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 6px 0 0;
}

.canvas-node-text .media-mention-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.36);
}

.canvas-node-panel .media-mention-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.38);
}

.media-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  height: 28px;
  margin: 0 2px;
  padding: 2px 8px 2px 3px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}

.media-mention-chip img,
.media-mention-chip video {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

.media-mention-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-mention-popover {
  position: absolute;
  z-index: 2200;
  width: min(132px, calc(100vw - 32px));
  padding: 7px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.98);
  color: #111827;
  box-shadow: 0 16px 42px rgba(0,0,0,0.22);
}

.media-mention-popover.media-mention-cols-2 { width: min(264px, calc(100vw - 32px)); }
.media-mention-popover.media-mention-cols-3 { width: min(396px, calc(100vw - 32px)); }
.media-mention-popover.media-mention-cols-4 { width: min(528px, calc(100vw - 32px)); }

.media-mention-list {
  display: block;
  column-count: 1;
  column-gap: 4px;
  max-height: 190px;
  overflow-y: auto;
}

.media-mention-cols-2 .media-mention-list { column-count: 2; }
.media-mention-cols-3 .media-mention-list { column-count: 3; }
.media-mention-cols-4 .media-mention-list { column-count: 4; }

.media-mention-option {
  width: 100%;
  min-height: 34px;
  margin: 0 0 4px;
  padding: 4px 5px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  break-inside: avoid;
}

.media-mention-option:hover,
.media-mention-option:focus-visible,
.media-mention-option.is-active {
  outline: none;
  background: #f1f5f9;
}

.media-mention-option.is-active {
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.42);
}

.media-mention-option img,
.media-mention-option video {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

.media-mention-option-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(14,165,233,0.12);
  color: #0284c7;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.media-mention-option-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.media-mention-option-main b {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.1;
}

.media-mention-option-main small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-mention-empty {
  padding: 10px 12px;
  color: #64748b;
  font-size: 13px;
}

