/* ============================================================
   AQUI LEM – Campos dinâmicos, ficha do anúncio e chat
   Usado por anunciar.html, anuncio.html, index.html e mensagens.html
   ============================================================ */

/* ── Formulário dinâmico ─────────────────────────────────── */
.campo-grupo {
  font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--emerald-600); margin: 22px 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.campo-grupo::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.campo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.campo-grid .campo-largo,
.campo-grid .campo-bool { grid-column: 1 / -1; }
@media (max-width: 520px) { .campo-grid { grid-template-columns: 1fr; } }

.campo-unidade { font-weight: 600; color: var(--gray-400); text-transform: none; letter-spacing: 0; }
.campo-dica { display: block; font-size: 12px; color: var(--gray-400); margin-top: 6px; line-height: 1.45; }
.campo-cep-status { display: block; font-size: 12px; color: var(--emerald-600); margin-top: 6px; min-height: 16px; }

.campo-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: 14px;
  background: var(--white); font-size: 14px; font-weight: 600; color: var(--gray-700);
  transition: border-color .2s, background .2s;
}
.campo-check:hover { border-color: var(--emerald-400); }
.campo-check input { width: 18px; height: 18px; accent-color: var(--emerald-600); cursor: pointer; }
.campo-check:has(input:checked) { border-color: var(--emerald-500); background: var(--emerald-50); color: var(--emerald-700); }

.campo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.campo-chip { cursor: pointer; }
.campo-chip input { position: absolute; opacity: 0; pointer-events: none; }
.campo-chip span {
  display: inline-block; padding: 9px 14px; border-radius: 999px;
  border: 1.5px solid var(--gray-200); background: var(--white);
  font-size: 13px; font-weight: 600; color: var(--gray-600);
  transition: all .15s;
}
.campo-chip:hover span { border-color: var(--emerald-400); }
.campo-chip input:checked + span {
  background: var(--emerald-600); border-color: var(--emerald-600); color: #fff;
  box-shadow: 0 4px 12px rgba(5,150,105,.28);
}

/* ── Ficha do anúncio ────────────────────────────────────── */
.ficha-selos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px; margin: 4px 0 24px;
}
.ficha-selo {
  background: var(--emerald-50); border: 1px solid var(--emerald-100);
  border-radius: 14px; padding: 12px 14px; text-align: center;
}
.ficha-selo-valor { display: block; font-size: 15px; font-weight: 800; color: var(--emerald-700); line-height: 1.3; }
.ficha-selo-label { display: block; font-size: 11px; color: var(--gray-500); margin-top: 3px; }

.ficha-grupo { margin-bottom: 20px; }
.ficha-grupo-titulo {
  font-size: 13px; font-weight: 800; color: var(--gray-700);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px;
}
.ficha-lista { margin: 0; }
.ficha-linha {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}
.ficha-linha:last-child { border-bottom: none; }
.ficha-linha dt { color: var(--gray-500); flex-shrink: 0; }
.ficha-linha dd { margin: 0; color: var(--gray-900); font-weight: 600; text-align: right; }

/* Selos resumidos no card da listagem */
.card-atributos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-atributo {
  font-size: 11px; font-weight: 700; color: var(--emerald-700);
  background: var(--emerald-50); border-radius: 999px; padding: 4px 9px;
  white-space: nowrap;
}

/* ── Filtros ─────────────────────────────────────────────── */
.filtro-bloco { margin-bottom: 20px; }
.filtro-titulo { font-size: 13px; font-weight: 800; color: var(--gray-700); margin-bottom: 10px; }
.filtro-range { display: flex; align-items: center; gap: 10px; }
.filtro-range input { flex: 1; min-width: 0; }
.filtro-range span { font-size: 13px; color: var(--gray-400); }

/* ── Denúncia ────────────────────────────────────────────── */
.btn-denunciar {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--gray-400);
  font-family: inherit; padding: 10px 0;
}
.btn-denunciar:hover { color: #dc2626; }
.btn-denunciar svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 900; backdrop-filter: blur(2px);
}
.modal-overlay.show { display: flex; }
.modal-card {
  background: var(--white); border-radius: 24px; padding: 26px;
  width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.modal-titulo { font-size: 19px; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin-bottom: 20px; }
.modal-acoes { display: flex; gap: 10px; margin-top: 22px; }
.modal-acoes button { flex: 1; padding: 14px; border-radius: 14px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; border: none; }
.btn-modal-cancelar { background: var(--gray-100); color: var(--gray-600); }
.btn-modal-confirmar { background: #dc2626; color: #fff; }
.btn-modal-confirmar:disabled { opacity: .5; cursor: not-allowed; }

.motivo-lista { display: flex; flex-direction: column; gap: 8px; }
.motivo-item {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  padding: 13px 15px; border: 1.5px solid var(--gray-200); border-radius: 14px;
  font-size: 14px; color: var(--gray-700); transition: all .15s;
}
.motivo-item:hover { border-color: #fca5a5; background: #fef2f2; }
.motivo-item input { accent-color: #dc2626; width: 17px; height: 17px; }
.motivo-item:has(input:checked) { border-color: #dc2626; background: #fef2f2; color: #b91c1c; font-weight: 600; }

/* Dois botões de contato lado a lado no rodapé do anúncio */
.cta-footer { gap: 10px; flex-wrap: wrap; }
.btn-zap-wpp { background: #25d366 !important; }
@media (min-width: 768px) {
  .cta-footer { flex-direction: column; align-items: stretch; }
  .cta-footer .btn-zap { width: 100%; }
}

/* ── Mapa no formulário e no anúncio ─────────────────────── */
.campo-mapa {
  height: 260px; border-radius: 14px; overflow: hidden;
  border: 1.5px solid var(--gray-200); background: var(--gray-100);
  margin-top: 10px;
}
.campo-mapa-busca { display: flex; gap: 8px; }
.campo-mapa-busca input { flex: 1; min-width: 0; }
.campo-mapa-btn {
  padding: 0 18px; border-radius: 14px; border: none; cursor: pointer;
  background: var(--emerald-600); color: #fff; font-weight: 700; font-size: 13px;
  font-family: inherit; white-space: nowrap;
}
.campo-mapa-status { display: block; font-size: 12px; color: var(--emerald-600); margin-top: 6px; min-height: 16px; line-height: 1.45; }
.campo-mapa-erro { padding: 20px; text-align: center; font-size: 13px; color: var(--gray-500); }

.anuncio-mapa {
  height: 300px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--gray-200); margin: 8px 0 10px;
}
.anuncio-mapa-aviso { font-size: 12px; color: var(--gray-400); line-height: 1.5; margin-bottom: 20px; }

/* ── Foto no chat ────────────────────────────────────────── */
.balao-imagem {
  display: block; max-width: 260px; border-radius: 14px; margin-bottom: 6px;
  cursor: zoom-in; background: rgba(0,0,0,.05);
}
.balao.minha .balao-imagem { margin-left: auto; }

.chat-anexo {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--gray-200);
  background: var(--white); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chat-anexo:hover { border-color: var(--emerald-500); }
.chat-anexo svg { width: 20px; height: 20px; stroke: var(--gray-500); fill: none; stroke-width: 2; }

.previa-foto {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  background: var(--emerald-50); border-top: 1px solid var(--emerald-100);
}
.previa-foto img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.previa-foto span { flex: 1; font-size: 13px; color: var(--emerald-700); font-weight: 600; }
.previa-foto button { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--gray-500); }

/* Visualizador de imagem em tela cheia */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* Convite para ligar as notificações */
.faixa-push {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 14px 20px 0; padding: 13px 16px; border-radius: 14px;
  background: #fffbeb; border: 1px solid #fde68a;
  font-size: 13px; color: #92400e; line-height: 1.5;
}
.faixa-push span { flex: 1; min-width: 200px; }
.faixa-push button {
  padding: 9px 15px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--gold-500); color: #fff; font-weight: 700; font-size: 13px; font-family: inherit;
}
.faixa-push button.recusar { background: none; color: #a16207; font-weight: 600; }
