/* modal-cadastro.css — visual do #modal-lead (cadastro da Hasta) para páginas
   que NÃO carregam o css/home.css: hoje, as fichas de imóvel geradas por
   seo_ficha.py, onde o gate do botão do leiloeiro abre o mesmo formulário.

   As regras são cópia fiel das de css/home.css (bloco "MODALS" + cidade picker),
   porém ESCOPADAS em #modal-lead: a ficha tem CSS próprio e classes genéricas
   como .modal ou .finput soltas invadiriam a página. As variáveis também são
   redeclaradas aqui, pelo mesmo motivo — a ficha define outras. */

#modal-lead {
  --yellow: #F59E0B;
  --black: #0F1722;
  --white: #FFFFFF;
  --bg: #F5F6F8;
  --border: #E9ECF0;
  --text: #0F1722;
  --muted: #707C8A;
  --light: #9CA3AF;
  --red: #DC2626;

  position: fixed; inset: 0;
  background: rgba(0,0,0,0.48); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 16px;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--text); line-height: 1.4;
}
#modal-lead.hidden { display: none; }
#modal-lead * { box-sizing: border-box; }

#modal-lead .modal {
  background: var(--white); border-radius: 24px;
  width: 100%; max-width: 430px; max-height: 92vh; overflow-y: auto;
}
#modal-lead .modal-head {
  padding: 22px 22px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
#modal-lead .modal-title { font-size: 1.35rem; font-weight: 900; }
#modal-lead .modal-sub { font-size: 0.83rem; color: var(--muted); margin-top: 3px; }
#modal-lead .modal-x {
  background: var(--bg); border: none; width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0; margin-top: 2px;
}
#modal-lead .modal-x:hover { background: var(--border); }
#modal-lead .modal-body { padding: 18px 22px 22px; }

#modal-lead .highlight-box {
  background: var(--yellow); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 14px; font-size: 0.83rem; font-weight: 600; color: var(--black);
}
#modal-lead .fgroup { margin-bottom: 12px; }
#modal-lead .flabel {
  display: block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 5px; color: var(--text);
}
#modal-lead .finput {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text); padding: 11px 13px; border-radius: 11px;
  font-size: 0.88rem; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
#modal-lead .finput:focus { border-color: var(--black); background: var(--white); }
#modal-lead .tel-wrap { display: grid; grid-template-columns: 116px 1fr; gap: 8px; }
#modal-lead .tel-wrap .tel-ddi { padding-left: 9px; padding-right: 4px; }
#modal-lead .fgroup .finput.hidden,
#modal-lead .fgroup .lead-cidade-wrap.hidden { display: none; }
#modal-lead .btn-submit {
  width: 100%; background: var(--black); color: var(--white);
  border: none; padding: 13px; border-radius: 100px;
  font-size: 0.93rem; font-weight: 700; font-family: inherit;
  cursor: pointer; margin-top: 6px; transition: opacity 0.15s;
}
#modal-lead .btn-submit:hover { opacity: 0.82; }
#modal-lead .btn-submit[disabled] { opacity: 0.55; cursor: default; }
#modal-lead .modal-foot { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 12px; }
#modal-lead .modal-foot a { color: var(--text); font-weight: 700; cursor: pointer; text-decoration: underline; }
#modal-lead .form-error {
  color: var(--red); font-size: 0.78rem; margin-bottom: 8px; display: none;
}

/* ── Cidade picker ── */
#modal-lead .lead-cidade-wrap { position: relative; }
#modal-lead .lead-cidade-trigger {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; cursor: pointer; text-align: left;
}
#modal-lead .lead-cidade-trigger .lc-label { color: var(--light); }
#modal-lead .lead-cidade-trigger.has-value .lc-label { color: var(--text); }
#modal-lead .lead-cidade-trigger svg { flex-shrink: 0; transition: transform 0.15s; color: var(--muted); }
#modal-lead .lead-cidade-trigger.open svg { transform: rotate(180deg); }
#modal-lead .lead-cidade-panel {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15,23,34,0.13); z-index: 5; overflow: hidden;
}
#modal-lead .lead-cidade-panel.open { display: block; }
#modal-lead .cidade-search-wrap { padding: 8px; border-bottom: 1px solid var(--border); }
#modal-lead .cidade-search {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 9px; padding: 8px 10px; font-size: 0.82rem;
  font-family: inherit; color: var(--text); outline: none;
}
#modal-lead .cidade-search:focus { border-color: var(--black); }
#modal-lead .cidade-search::placeholder { color: var(--light); }
#modal-lead .cidade-list { max-height: 200px; overflow-y: auto; padding: 4px; }
#modal-lead .cidade-list::-webkit-scrollbar { width: 3px; }
#modal-lead .cidade-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
#modal-lead .cidade-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; font-size: 0.83rem;
}
#modal-lead .cidade-item:hover { background: var(--bg); }
#modal-lead .cidade-item.active { background: rgba(15,23,34,0.06); }
#modal-lead .cidade-radio {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--border); flex-shrink: 0;
}
#modal-lead .cidade-item:hover .cidade-radio { border-color: #6B7280; }
#modal-lead .cidade-item.active .cidade-radio { border-color: var(--black); border-width: 4px; }
#modal-lead .cidade-item-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#modal-lead .ac-empty { padding: 12px; font-size: 0.82rem; color: var(--muted); text-align: center; }
