/* AF CRM — menções com @ nas notas + notificações (23/09/2026) */

/* lista de usuários ao digitar @ */
.afm-ac {
  position: absolute; z-index: 80; max-height: 280px; overflow-y: auto;
  border: 1px solid hsl(var(--border)); border-radius: .75rem;
  background: hsl(var(--popover)); color: hsl(var(--popover-foreground));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14); padding: .3rem; box-sizing: border-box;
}
.afm-ac-tit {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); padding: .3rem .5rem .35rem;
}
.afm-ac-item {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem;
  border-radius: .5rem; cursor: pointer;
}
.afm-ac-ativo { background: hsl(var(--muted)); }
.afm-ac-av {
  flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; background: rgba(234, 88, 12, .14); color: #c2410c;
}
:is(.dark *) .afm-ac-av { background: rgba(251, 146, 60, .18); color: #fdba74; }
.afm-ac-tx { display: flex; flex-direction: column; min-width: 0; }
.afm-ac-nome { font-size: .875rem; font-weight: 600; line-height: 1.2; }
.afm-ac-mail {
  font-size: .72rem; color: hsl(var(--muted-foreground));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* contador no sino */
.afm-badge {
  position: absolute; bottom: -2px; left: -4px; min-width: 1.05rem; height: 1.05rem;
  padding: 0 .25rem; border-radius: 999px; box-sizing: border-box;
  background: #ea580c; color: #fff; font-size: .62rem; font-weight: 700; line-height: 1.05rem;
  text-align: center; box-shadow: 0 0 0 2px hsl(var(--background)); pointer-events: none;
}

/* bloco "Menções" dentro do menu de Notificações */
.afm-oculto { display: none !important; }
.afm-menu { width: auto; max-width: 100%; }
.afm-menu-tit, .afm-menu-tx { overflow-wrap: anywhere; }
.afm-menu-cab {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .35rem .5rem .25rem;
}
.afm-menu-rot {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #c2410c;
}
:is(.dark *) .afm-menu-rot { color: #fdba74; }
.afm-menu-todas, .afm-menu-lida {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
  font-size: .72rem; color: hsl(var(--muted-foreground));
}
.afm-menu-todas:hover, .afm-menu-lida:hover { color: hsl(var(--primary)); }
.afm-menu-item { border-top: 1px solid hsl(var(--border) / .6); padding: .6rem .75rem; }
.afm-menu-abrir {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0;
  cursor: pointer; font: inherit; color: inherit;
}
.afm-menu-tit { display: block; font-size: .875rem; font-weight: 600; }
.afm-menu-tx {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: .2rem; font-size: .78rem; color: hsl(var(--muted-foreground)); white-space: pre-line;
}
.afm-menu-qd { display: block; margin-top: .25rem; font-size: .7rem; color: hsl(var(--primary)); }
.afm-menu-lida { margin-top: .35rem; }

/* aviso na tela quando chega menção nova */
.afm-avisos {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem; width: min(340px, calc(100vw - 32px));
}
.afm-aviso {
  border: 1px solid hsl(var(--border)); border-left: 4px solid #ea580c; border-radius: .75rem;
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: .75rem .85rem;
  animation: afm-entra .25s ease-out;
}
@keyframes afm-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.afm-aviso-topo { display: flex; align-items: center; gap: .5rem; }
.afm-aviso-ic {
  flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 999px; background: #ea580c; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700;
}
.afm-aviso-tit { flex: 1 1 auto; font-size: .85rem; font-weight: 600; min-width: 0; }
.afm-aviso-x {
  border: 0; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1;
  color: hsl(var(--muted-foreground)); padding: 0 .15rem;
}
.afm-aviso-tx {
  margin-top: .35rem; font-size: .8rem; color: hsl(var(--muted-foreground));
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line;
}
.afm-aviso-ir {
  margin-top: .5rem; border: 1px solid hsl(var(--border)); border-radius: .5rem; background: none;
  padding: .25rem .6rem; font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer;
  color: hsl(var(--foreground));
}
.afm-aviso-ir:hover { background: hsl(var(--muted)); }
@media (pointer: coarse) { .afm-ac-item { padding: .65rem .5rem; } }
