/* ── Sistema de pings / menciones ─────────────────────────────── */

/* Recuadro azul de la mención (en el mensaje y en la caja de texto) */
.mention {
  background: rgba(70, 150, 255, 0.24);
  color: #72b4ff;
  border-radius: 6px;
  padding: 0 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.mention:hover { background: #3a7bd5; color: #fff; }

/* Mensaje en el que te mencionan (@tú, @everyone, @here): barra amarilla + fondo */
.message-card.msg-mentioned {
  background: rgba(240, 190, 40, 0.10);
  box-shadow: inset 3px 0 0 #f0be28;
}
.message-card.msg-mentioned:hover { background: rgba(240, 190, 40, 0.13); }

/* Espejo de la caja de texto: pinta el recuadro azul detrás del texto escrito */
.mf-pill { position: relative; }
.mi-mirror {
  position: absolute;
  pointer-events: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
  color: var(--text);
  box-sizing: border-box;
  z-index: 0;
  display: none;
}
.message-input.has-mention + .mi-mirror, .mi-mirror.on { display: block; }
.message-input.has-mention {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  caret-color: var(--text);
  position: relative;
  z-index: 1;
}
.message-input.has-mention::selection { color: transparent; background: rgba(88,101,242,.45); }
.mi-mirror .mention {
  /* Mismas métricas que la caja real (sin negrita ni padding) para que el cursor y el texto no se desalineen */
  padding: 0;
  font-weight: inherit;
  letter-spacing: inherit;
  box-shadow: 0 0 0 2px rgba(70, 150, 255, 0.24);
  cursor: text;
}
.mi-mirror .mention:hover { background: rgba(70, 150, 255, 0.24); color: #72b4ff; }
body.fluxer-theme-frutiger .mi-mirror { color: #12395c; }

/* Desplegable de autocompletado */
.mention-popup {
  position: absolute;
  left: 10px; right: 10px;
  bottom: calc(100% - 6px);
  background: #101216;
  border: 1px solid #24272e;
  border-radius: 14px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.45);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  z-index: 40;
  display: none;
  scrollbar-width: thin;
}
.mention-popup.open { display: block; }
.mp-sec-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #b5bac1;
  padding: 8px 10px 6px;
}
.mp-sep { height: 1px; background: #1e2127; margin: 6px 4px; }
.mp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 0;
}
.mp-item.sel, .mp-item:hover { background: #1b1e24; }
.mp-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #0B0C0E;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-name { font-size: 1.05rem; color: #f2f3f5; white-space: nowrap; flex-shrink: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.mp-extra { margin-left: auto; font-size: .92rem; color: #949ba4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mp-item.mp-special .mp-name { font-size: 1.15rem; margin-right: 8px; }
.mp-item.mp-special .mp-extra { margin-left: 0; flex: 1; font-size: .95rem; }
