/* =========================================================
   LIMA ENGENHARIA
   LIMA_POPUP_CARS_COMPACTO_V1

   Camada de refinamento sobre lima-popup-cars-final-v1.css
   (carregada depois, mesmo padrão de imovel-selecionado-
   refino-v1.css) — reduz o espaço vertical desperdiçado no
   popup "X CARs neste ponto" sem remover nenhuma informação.
   ========================================================= */

/* CABEÇALHO — assinatura menor, sem min-height solto */

#carsSobrepostos > div:first-child{
  min-height:0 !important;
  padding:8px 12px !important;
  gap:8px !important;
}

#carsSobrepostos .lima-popup-brand strong{
  font-size:9.5px !important;
  letter-spacing:.4px !important;
}

#carsSobrepostos .lima-popup-brand span{
  font-size:8px !important;
  margin-top:0 !important;
}

#carsSobrepostos > div:first-child b{
  font-size:15px !important;
  line-height:1.1 !important;
}

#carsSobrepostos > div:first-child > span{
  width:28px !important;
  height:28px !important;
  font-size:22px !important;
}

/* CARDS — menos respiro vertical, mesma informação */

#carsSobrepostos > div:not(:first-child){
  margin:6px 8px !important;
  padding:8px 10px !important;
  /* <br> entre os campos herda este tamanho — sem isso, cada <br>
     fica na altura padrão do navegador (16px) e desperdiça ~50px
     de altura por card, só em quebras de linha. */
  font-size:12.5px !important;
  line-height:1.3 !important;
}

#carsSobrepostos > div:not(:first-child) > b:first-child{
  font-size:14px !important;
  margin:0 0 1px !important;
}

#carsSobrepostos > div:not(:first-child) > span{
  font-size:12.5px !important;
  margin:0 0 1px !important;
  line-height:1.15 !important;
}

#carsSobrepostos > div:not(:first-child) > small:first-of-type{
  font-size:11px !important;
  margin:0 !important;
}

#carsSobrepostos > div:not(:first-child) > small:last-of-type{
  margin:4px 0 0 !important;
  gap:6px !important;
}

#carsSobrepostos > div:not(:first-child) > small:last-of-type > b{
  min-height:20px !important;
  padding:1px 8px !important;
  font-size:10px !important;
}

/* CAR legível mas sem quebrar feio — ellipsis com title/copiar */

#carsSobrepostos > div:not(:first-child) > small:last-of-type{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
}

/* LIMA_POPUP_CARS_COMPACTO_V1 — lima-ui-polimento-v2.js classifica
   heuristicamente (por regex de código CAR) qualquer elemento-folha
   que contenha só o código como se fosse um card inteiro, aplicando
   padding/borda pensados para o card externo (.lima-car-item-real).
   Isso nunca deveria alcançar o <span> do código em si — neutraliza
   com especificidade maior (#id + 2 classes), sem tocar no script
   legado. */
#carsSobrepostos .lima-car-codigo,
#carsSobrepostos .lima-car-codigo.lima-car-item-real{
  min-width:0 !important;
  flex:1 1 auto !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-weight:700 !important;
  position:static !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  line-height:inherit !important;
  font-size:inherit !important;
  color:inherit !important;
}

#carsSobrepostos .lima-car-copiar{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  margin-left:auto;
  padding:0;
  border:1px solid #cdd8d1;
  border-radius:6px;
  background:#fff;
  color:#2f6b45;
  font-size:12px;
  line-height:1;
  cursor:pointer;
}

#carsSobrepostos .lima-car-copiar:hover{
  background:#eef5f0;
}

#carsSobrepostos .lima-car-copiar.lima-copiado{
  background:#177743;
  border-color:#177743;
  color:#fff;
}

/* Feedback de toque no mobile (hover discreto no desktop já
   existe em lima-popup-cars-final-v1.css) */

#carsSobrepostos > div:not(:first-child):active{
  background:#f3f8f4 !important;
}

@media(max-width:640px){

  #carsSobrepostos > div:first-child{
    padding:7px 10px !important;
  }

  #carsSobrepostos > div:not(:first-child){
    margin:5px 7px !important;
    padding:8px 9px !important;
  }

}
