/* Krondi · css/mentions.css
   «Menciones» (SPEC §88.7, la variante A de los bocetos): la pestaña del dock (chat/mentions-view.js) y el número de su
   fila en la lista de salas (dock/rooms-panel.js). */

/* La fila de la lista de salas: con menciones sin leer, el número en el acento (como el «@» de una sala), también con
   la fila marcada (la regla de «Mis tareas» marcada lo aclara) */
.room-mytasks .room-mentions-badge,
.room-mytasks.active .room-mentions-badge:not(.is-due) { background: var(--accent); color: var(--accent-contrast); }

.mentions-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
}

/* «Sin leer N» · «Todas» */
.mentions-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem 0.55rem;
  border-bottom: 1px solid var(--border);
}
.mentions-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.85rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.mentions-chip:hover { color: var(--text); }
.mentions-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mentions-chip.is-on { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
.mentions-chip-n {
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.mentions-list { flex: 1; min-height: 0; overflow: auto; padding: 0.4rem 0.5rem 1rem; overscroll-behavior: contain; }

/* Cada mención: quién, dónde, cuándo y el texto (dos líneas) */
.mentions-item {
  position: relative;
  display: flex;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.6rem 0.7rem;
  border: 0;
  border-radius: 0.7rem;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mentions-item + .mentions-item { margin-top: 2px; }
.mentions-item:hover { background: var(--surface-2); }
.mentions-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mentions-item.is-unread { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.mentions-item.is-unread:hover { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); }
.mentions-item.is-unread::after {
  content: "";
  position: absolute;
  top: 0.95rem;
  right: 0.7rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}
.mentions-main { display: block; flex: 1; min-width: 0; }
.mentions-top { display: flex; align-items: baseline; gap: 0.5rem; padding-right: 1rem; color: var(--text-muted); font-size: 0.8rem; }
.mentions-who { flex: 1; min-width: 0; }
.mentions-who b { color: var(--text); font-weight: 650; }
.mentions-who .room-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  color: var(--text);
  font-weight: 600;
  vertical-align: bottom;
}
.mentions-top time { margin-left: auto; color: var(--text-subtle); font-size: 0.74rem; white-space: nowrap; }
.mentions-text {
  display: -webkit-box;
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mentions-text .md-mention { padding: 0 0.2rem; border-radius: 0.3rem; }
.mentions-tag {
  display: inline-block;
  margin: 0 0.3rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: 1px;
}
.mentions-text .mentions-tag { margin-left: 0; }

/* «Ya leídas» (bien separada de las sin leer de encima: así se distingue mejor; lo pidió el usuario) y «Ver más
   antiguas» */
.mentions-sep {
  margin: 1.6rem 0.6rem 0.45rem;
  color: var(--text-subtle);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mentions-more {
  display: block;
  margin: 0.6rem auto 0;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.mentions-more:hover:not(:disabled) { background: var(--accent-soft); }
.mentions-more:disabled { color: var(--text-muted); cursor: default; }

.mentions-loading { margin: 1.5rem 0; color: var(--text-muted); text-align: center; }
.mentions-empty { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin: 2.5rem 1rem; text-align: center; }
.mentions-empty-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.mentions-empty-title { margin: 0.3rem 0 0; color: var(--text); font-weight: 700; }
.mentions-empty-text { max-width: 22rem; margin: 0 0 0.5rem; color: var(--text-muted); }
