/* ============================================================================
   shared/cf-filters.css — Padrão sistêmico de filtros (M5.1)
   ----------------------------------------------------------------------------
   Adiciona ao toolbar de filtros existente:
   - botão "Limpar filtros" (visível apenas quando há filtro ativo)
   - badge contador de filtros ativos
   - chips visuais opcionais (.cf-flt-chips)
   - empty state específico de filtros (.cf-flt-empty)

   Não substitui CSS existente das telas — adiciona seletivamente.
   Usa tokens v3 já carregados pelo admin.html.
============================================================================ */

/* Botão "Limpar filtros" — pequeno, ghost, aparece à direita */
.cf-flt-clear {
  display: none;                 /* JS mostra quando há filtro ativo */
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--v3-border, #E1E7EF);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--v3-text-2, #4A5670);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}
.cf-flt-clear:hover {
  background: var(--v3-bg-subtle, #EEF2F7);
  border-color: var(--v3-border-strong, #CBD3DE);
  color: var(--v3-text, #0E1424);
}
.cf-flt-clear[data-active="1"] { display: inline-flex; }
.cf-flt-clear i {
  width: 12px; height: 12px;
}

/* Badge contador — aparece dentro do botão limpar */
.cf-flt-clear .cf-flt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  background: var(--v3-brand, #1E5BAA);
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* Chips de filtros ativos — opcional, container separado abaixo do toolbar */
.cf-flt-chips {
  display: none;                 /* JS toggla quando há ativos */
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
}
.cf-flt-chips[data-active="1"] { display: flex; }
.cf-flt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  background: var(--v3-brand-soft, #EFF4FB);
  color: var(--v3-brand, #1E5BAA);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
}
.cf-flt-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;     /* M28: era 16×16 — agora atinge mínimo WCAG */
  background: transparent;
  border: 0;
  color: inherit;
  border-radius: 50%;
  cursor: pointer;
  opacity: .65;
  transition: opacity .12s, background .12s;
}
.cf-flt-chip-remove:hover {
  opacity: 1;
  background: rgba(30, 91, 170, .15);
}
.cf-flt-chip-remove i { width: 11px; height: 11px; }

/* Empty state quando filtros zeram resultado — usa class .cf-flt-empty
   no container vazio. Diferente do empty "não há nada cadastrado". */
.cf-flt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 24px;
  text-align: center;
  color: var(--v3-text-2, #4A5670);
  font-size: 13px;
  line-height: 1.5;
}
.cf-flt-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--v3-bg-subtle, #EEF2F7);
  border-radius: 50%;
  color: var(--v3-text-3, #6B7891);
}
.cf-flt-empty-icon i { width: 18px; height: 18px; }
.cf-flt-empty-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--v3-text, #0E1424);
}
.cf-flt-empty-desc { max-width: 360px; }
.cf-flt-empty-action {
  margin-top: 4px;
  padding: 6px 14px;
  background: var(--v3-brand, #1E5BAA);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s;
  font-family: inherit;
}
.cf-flt-empty-action:hover { background: var(--v3-brand-hover, #154A8E); }
