.note-content-mention-link {
  text-decoration: none;
}

.note-mention-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  margin: 0 1px;
  border: 1px solid #ced4da;
  border-radius: 999px;
  font-size: 0.92em;
  font-weight: 600;
  vertical-align: baseline;
}

.note-mention-chip-person {
  background: #e7f3ff;
  border-color: #b6daff;
  color: #0a58ca;
}

.note-mention-chip-company {
  background: #eef7ec;
  border-color: #cfe7c9;
  color: #2b6b2f;
}

.note-mention-chip-product {
  background: #fde8f3;
  border-color: #f5bfdc;
  color: #b42375;
}

.mentions-editor {
  position: relative;
}

/* The textarea remains the form/persistence source; the contenteditable editor is the only visible input. */
.mentions-editor-source {
  display: none;
}

.mentions-editor-input {
  min-height: 132px;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background: #fff;
  color: #212529;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}

.mentions-editor-input:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.mentions-editor-input:empty::before {
  content: attr(data-placeholder);
  color: #6c757d;
  pointer-events: none;
}

.mentions-editor-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  margin: 0 1px;
  border: 1px solid #ced4da;
  border-radius: 999px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: default;
}

.mentions-editor-chip.person {
  background: #e7f3ff;
  border-color: #b6daff;
  color: #0a58ca;
}

.mentions-editor-chip.company {
  background: #eef7ec;
  border-color: #cfe7c9;
  color: #2b6b2f;
}

.mentions-editor-chip.product {
  background: #fde8f3;
  border-color: #f5bfdc;
  color: #b42375;
}

.mentions-editor-menu {
  position: absolute;
  top: 0;
  left: 0;
  right: auto;
  z-index: 1060;
  display: none;
  width: min(360px, 100%);
  max-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.mentions-editor-menu.show {
  display: block;
}

.mentions-editor-group {
  padding: 8px 12px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  background: #f8f9fa;
}

.mentions-editor-option {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-top: 1px solid #f1f3f5;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.mentions-editor-option:hover,
.mentions-editor-option.active {
  background: #f1f7ff;
}

.mentions-editor-option-title,
.mentions-editor-option-meta {
  display: block;
}

.mentions-editor-option-title {
  font-weight: 600;
  color: #212529;
}

.mentions-editor-option-meta {
  margin-top: 2px;
  font-size: 0.8rem;
  color: #6c757d;
}

.mentions-editor-status {
  padding: 10px 12px;
  color: #6c757d;
  font-size: 0.85rem;
}

.mentions-editor-status.error {
  color: #b02a37;
}
