/* 1.5.234 (19/11/2026) — painel «Nível de similaridade» e botão ⚡, prévia APROVADA pelo Alan (previas_visuais/Previa_Refino_Visual_1_5_224_web_desktop_17-11/
   PREVIA_RAIO_E_PAINEL_DE_SIMILARIDADE_ANTES_E_DEPOIS_19-11.html, regra final):
     • 1 reconhecido  → a foto preenche a caixa (recorte centrado, sem deformar), nome/% por cima, ✓ ⚡ ✕ de 44 px no pé, lupa para ampliar;
     • 2 a 4          → cartões em lista (foto grande, nome, barra, ✓ ⚡ ✕ redondos: 44 px com 2–3, 36 px com 4), altura dividida igualmente;
     • mais de 4      → os 4 de maior semelhança e «+N»;
     • ampliar        → popup centralizado, foto sem esticar nem cortar, com ✓ ⚡ ✕ e setas «n de N».
   Só visual: as funções (_confirmar, _liberarAcesso, _negarUm), os data-* e a API não mudam. Carregado DEPOIS de style.css (vence as regras antigas de .painel-match). */

.sym-box.sim { display: flex; flex-direction: column; min-height: 0; }
.painel-matches { display: flex !important; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; }
.painel-matches.hidden { display: none !important; }

.painel-match {
  flex-direction: row; align-items: center; gap: 10px; text-align: left; padding: 6px;
  flex: 0 0 auto; border-radius: 10px;
}
.painel-match .pm-foto {
  position: relative; flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 8px;   /* seção D aprovada, adaptada à caixa real (~250×300 px) */
  overflow: hidden; background: var(--card-bg); cursor: zoom-in;
}
.painel-match .pm-foto img, .painel-match .pm-foto .avatar-vazio { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center 35%; border-radius: 8px; display: block; }
.pm-lupa {
  position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff;
  display: flex; align-items: center; justify-content: center; line-height: 1; pointer-events: none;
}
.pm-lupa svg { width: 13px; height: 13px; }   /* ícone «buscar» do Contrô (sem emoji, pedido do Alan) */
.painel-matches.pm-1 .pm-lupa svg { width: 17px; height: 17px; }
.painel-match-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.painel-match-info > div:first-child { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.painel-match .barra-similaridade { height: 5px; }
.painel-match .badge-similaridade { font-size: 11px; font-weight: 600; }
.painel-match .match-duvida { font-size: 11px; font-weight: 600; color: var(--danger, #b3261e); line-height: 1.2; }
.painel-match .acoes { display: flex; gap: 8px; margin-top: 3px; justify-content: flex-start; flex-wrap: nowrap; }
.painel-match .acoes .match-acao { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.painel-match .acoes .match-acao svg { width: 18px; height: 18px; }
.match-liberar { background: #B25E00; color: #fff; }
.match-acao:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* 4 cartões: botões de 36 px e foto menor (exceção aprovada: com 4 não cabe 44 px) */
/* 1.5.236 (W234-7 / item 4): a exceção de 36 px deixou de existir — com 4 ou mais reconhecidos aparecem 3 cartões + «+N» e os botões ficam sempre com 44 px.
   (A classe pm-4 não é mais posta pelo facial.js; a regra fica com 44 px por segurança.) */
.painel-matches.pm-4 .painel-match .acoes { gap: 8px; }
.painel-matches.pm-4 .painel-match .acoes .match-acao { width: 44px; height: 44px; }
.painel-matches.pm-4 .painel-match .pm-foto { width: 56px; height: 56px; }
.painel-matches.pm-4 .painel-match-info > div:first-child { font-size: 12px; }
.painel-matches.pm-4 .painel-match .match-duvida { font-size: 10.5px; }
.pm-mais { flex: none; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 2px 0; }

/* 1 reconhecido: a foto preenche a caixa */
.painel-matches.pm-1 .painel-match { position: relative; display: block; flex: 1 1 auto; max-height: none; padding: 0; border: 0; overflow: hidden; background: #0c1018; }
.painel-matches.pm-1 .painel-match .pm-foto { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 10px; }
.painel-matches.pm-1 .painel-match .pm-foto img, .painel-matches.pm-1 .painel-match .pm-foto .avatar-vazio { border-radius: 10px; }
.painel-matches.pm-1 .pm-lupa { top: 8px; right: 8px; bottom: auto; width: 30px; height: 30px; font-size: 14px; }
.painel-matches.pm-1 .painel-match-info {
  position: absolute; inset: 0; padding: 10px; color: #fff; pointer-events: none; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(transparent 52%, rgba(0,0,0,.82)); border-radius: 10px;
}
.painel-matches.pm-1 .painel-match-info > div:first-child { font-size: 15px; font-weight: 700; color: #fff; }
.painel-matches.pm-1 .badge-similaridade { color: #fff; }
.painel-matches.pm-1 .acoes { justify-content: center; gap: 12px; pointer-events: auto; }
.painel-matches.pm-1 .match-duvida {
  position: absolute; left: 8px; right: 46px; top: 8px;
  background: var(--danger, #b3261e); color: #fff; border-radius: 8px; padding: 5px 8px; font-size: 12px;
}

/* popup da foto ampliada */
.pm-ampliada-fundo { position: fixed; inset: 0; z-index: var(--z-dialogo); background: rgba(10,14,22,.62); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pm-ampliada {
  background: var(--card-bg); color: var(--text); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.45); padding: 10px;
  max-width: min(90vw, 560px); max-height: 90vh; display: flex; flex-direction: column; gap: 8px;
}
.pm-ampliada-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.pm-ampliada-cab .pm-pos { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.pm-ampliada-cab button { min-width: 36px; min-height: 36px; border: 0; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; border-radius: 8px; }
.pm-ampliada-foto { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #0c1018; border-radius: 10px; overflow: hidden; }
.pm-ampliada-foto img { max-width: 100%; max-height: calc(90vh - 140px); object-fit: contain; display: block; }
.pm-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 56px; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 30px; cursor: pointer; border-radius: 8px; }
.pm-seta.anterior { left: 4px; } .pm-seta.proxima { right: 4px; }
.pm-ampliada .acoes { display: flex; gap: 14px; justify-content: center; }
.pm-ampliada .acoes .match-acao { width: 44px; height: 44px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; }
.pm-ampliada .acoes .match-acao svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .pm-ampliada-fundo { animation: none; } }

/* 1.5.234 — seção D (aprovada) adaptada à caixa real: % no canto do cartão (não ocupa linha), barra fina, menos respiro — cartões mais baixos */
.painel-matches:is(.pm-2, .pm-3, .pm-4) .painel-match { position: relative; }
.painel-matches:is(.pm-2, .pm-3, .pm-4) .painel-match-info { gap: 0; }
.painel-matches:is(.pm-2, .pm-3, .pm-4) .painel-match-info > div:first-child { padding-right: 34px; }
.painel-matches:is(.pm-2, .pm-3, .pm-4) .barra-similaridade-wrap { margin: 3px 0 0; }
.painel-matches:is(.pm-2, .pm-3, .pm-4) .badge-similaridade { position: absolute; top: 6px; right: 8px; }
.painel-matches:is(.pm-2, .pm-3, .pm-4) .barra-similaridade { height: 4px; }

/* 1.5.236 (W234-7 / item 4): com 2 ou mais reconhecidos, o aviso de 2 linhas vira um selo de 1 linha «⚠ Confirmar» (vermelho como antes);
   o texto completo está no title e no aria-label do selo. Com 1 reconhecido nada muda (o aviso continua inteiro, regra .pm-1 acima). */
.painel-matches.pm-varios .painel-match .match-duvida-selo {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 3px;
  padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor;
  font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; color: var(--danger, #b3261e); cursor: help;
}
[data-tema="escuro"] .painel-matches.pm-varios .painel-match .match-duvida-selo { color: #FF8A80; }
/* «+N» virou botão: abre a foto ampliada no 4º reconhecido (as setas percorrem todos) */
button.pm-mais {
  align-self: center; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2, var(--card-bg)); color: var(--text);
  font-size: 14px; font-weight: 700; cursor: zoom-in;
}
button.pm-mais:hover { border-color: var(--primary); }
button.pm-mais:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
