/* Bloco lateral de anotações da empresa (partials/anotacoes.ejs, v1.1 parte 2).
   Arquivo próprio porque o relatório não carrega o estilos.css; as cores
   repetem as variáveis de lá como reserva. */
.botao-anotacoes {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--cor-titulo, #233452);
  border: 1px solid var(--cor-borda, #d3dce5);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.botao-anotacoes:hover,
.botao-anotacoes:focus-visible,
.botao-anotacoes[aria-expanded="true"] {
  color: var(--cor-primaria-texto, #0b6a9e);
  border-color: var(--cor-primaria-texto, #0b6a9e);
}

.contador-anotacoes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--cor-titulo, #233452);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

.painel-anotacoes {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(24rem, 100vw);
  padding: 1rem;
  background: #fff;
  border-left: 1px solid var(--cor-borda, #d3dce5);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
  color: var(--cor-texto, #1b1f27);
  font-family: Inter, system-ui, sans-serif;
  text-align: left;
}

.painel-anotacoes[hidden] {
  display: none;
}

.cabecalho-anotacoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cabecalho-anotacoes h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--cor-titulo, #233452);
}

.fechar-anotacoes {
  background: none;
  border: none;
  color: var(--cor-texto-suave, #5f6b7a);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

.nota-anotacoes {
  margin: 0;
  font-size: 0.8rem;
  color: var(--cor-texto-suave, #5f6b7a);
}

/* Anotações gerais com 65% do espaço; pendências com 35%. */
.secao-anotacoes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
}

.secao-anotacoes-gerais {
  flex: 65 1 0;
}

.secao-pendencias {
  flex: 35 1 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--cor-borda, #d3dce5);
}

.secao-anotacoes h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--cor-titulo, #233452);
}

.campo-nova-anotacao {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--cor-borda, #d3dce5);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
}

.lista-anotacoes {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.item-anotacao {
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-left: 3px solid var(--cor-borda, #d3dce5);
  border-radius: 4px;
  background: var(--cor-fundo, #f4f7fa);
}

.linha-anotacao {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.linha-anotacao input[type="checkbox"] {
  margin-top: 0.2rem;
}

.texto-anotacao {
  flex: 1;
  margin: 0;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

textarea.texto-anotacao {
  box-sizing: border-box;
  padding: 0.1rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  resize: none;
  overflow: hidden;
}

textarea.texto-anotacao:hover,
textarea.texto-anotacao:focus {
  border-color: var(--cor-borda, #d3dce5);
  background: #fff;
}

.item-anotacao.feita .texto-anotacao {
  text-decoration: line-through;
  color: var(--cor-texto-suave, #5f6b7a);
}

.remover-anotacao {
  background: none;
  border: none;
  color: var(--cor-texto-suave, #5f6b7a);
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  cursor: pointer;
}

.remover-anotacao:hover,
.remover-anotacao:focus-visible {
  color: var(--cor-erro, #b91c1c);
}

.meta-anotacao {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--cor-texto-suave, #5f6b7a);
}

.anotacoes-vazio {
  font-size: 0.85rem;
  color: var(--cor-texto-suave, #5f6b7a);
}

.status-anotacoes {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.8rem;
  color: var(--cor-texto-suave, #5f6b7a);
}

.status-anotacoes.erro-anotacoes {
  color: var(--cor-erro, #b91c1c);
}

/* Menções (2026-10-12): foto ou iniciais de quem escreveu, a menção em
   destaque no texto, a nota nova que menciona quem está lendo e a lista do "@"
   (mencao-campo.js). O .avatar se repete aqui porque o relatório não carrega o
   estilos.css. */
.painel-anotacoes .avatar,
.lista-mencoes .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  font-weight: 600;
  line-height: 1;
}

.meta-anotacao {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.mencao {
  padding: 0 0.15rem;
  border-radius: 3px;
  background: #e3f0f8;
  color: var(--cor-primaria-texto, #0b6a9e);
  font-weight: 600;
}

.mencao-voce {
  background: #fdf0c4;
  color: var(--cor-titulo, #233452);
}

.mencao-removida {
  background: transparent;
  color: var(--cor-texto-suave, #5f6b7a);
  font-weight: 500;
}

.item-anotacao.menciona-voce {
  background: #fff8e1;
  box-shadow: inset 0 0 0 1px #f1d27a;
}

.selo-menciona-voce {
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #fdf0c4;
  color: var(--cor-titulo, #233452);
  font-weight: 600;
}

.lista-mencoes {
  position: fixed;
  z-index: 1001;
  max-height: 14rem;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid var(--cor-borda, #d3dce5);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.85rem;
}

.lista-mencoes[hidden] {
  display: none;
}

.lista-mencoes li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.lista-mencoes li[aria-selected="true"],
.lista-mencoes li:hover {
  background: var(--cor-fundo, #f4f7fa);
}

.lista-mencoes .nome-mencao {
  color: var(--cor-texto, #1b1f27);
}

.lista-mencoes small {
  margin-left: auto;
  color: var(--cor-texto-suave, #5f6b7a);
}

@media (max-width: 600px) {
  .botao-anotacoes {
    padding: 0.35rem 0.5rem;
  }
}

@media (max-width: 700px) {
  .campo-nova-anotacao,
  textarea.texto-anotacao {
    font-size: 16px;
  }
}

@media print {
  .botao-anotacoes,
  .painel-anotacoes {
    display: none !important;
  }
}
