/**
 * Formulário de lead + mapa dos corretores.
 * As cores vêm do tema (var(--ts-*)), com fallback para o plugin funcionar
 * sozinho em qualquer tema.
 */

.ts-form {
  padding: 38px 34px;
}

.ts-form-titulo {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ts-ink, #12314f);
}

.ts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ts-field { margin-bottom: 16px; }

.ts-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ts-navy, #0f2740);
  margin-bottom: 6px;
}

.ts-field input,
.ts-field select,
.ts-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ts-line, #e5ebf1);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ts-ink, #12314f);
  background: #fbfdff;
}

.ts-field textarea { resize: vertical; }

.ts-field input:focus,
.ts-field select:focus,
.ts-field textarea:focus {
  outline: none;
  border-color: var(--ts-green, #2f9e44);
  box-shadow: 0 0 0 3px rgba(47, 158, 70, .15);
}

/* nunca o select nativo do sistema */
.ts-field select,
.ts-pop select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232f9e44' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

/* Honeypot: invisível para gente, presente no DOM para o robô preencher.
   Não usa `display:none` (robô ignora o que está escondido assim) nem
   `left:-9999px` (isso amplia a área rolável e torna o site torto no celular). */
.ts-hp,
.ts-hp-inline {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ts-form .ts-btn,
.ts-form button[type="submit"] {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 28px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  background: var(--ts-green, #2f9e44);
  color: #fff;
  transition: .2s;
}

.ts-form button[type="submit"]:hover:not(:disabled) { background: var(--ts-green-d, #26863b); }
.ts-form button[type="submit"]:disabled { opacity: .7; cursor: progress; }

.ts-form-msg {
  display: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.ts-form-msg.ok {
  display: block;
  background: rgba(47, 158, 70, .12);
  color: #0b6d2f;
  border: 1px solid rgba(47, 158, 70, .4);
}
.ts-form-msg.erro {
  display: block;
  background: #fdecec;
  color: #b32d2e;
  border: 1px solid #f5c2c2;
}

.ts-form-nota {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ts-muted, #5b6b7d);
  text-align: center;
}

/* ============================================================
   Mapa
   ============================================================ */
.ts-searchbar {
  max-width: 720px;
  margin: -56px auto 0;
  position: relative;
  z-index: 500;
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(10, 31, 56, .16);
  padding: 10px;
}

.ts-searchbar input {
  flex: 1;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 10px;
  outline: none;
  color: var(--ts-ink, #12314f);
  font-family: inherit;
}

.ts-searchbar button {
  border: 0;
  background: var(--ts-green, #2f9e44);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 0 26px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
.ts-searchbar button:hover { background: var(--ts-green-d, #26863b); }

#ts-mapa {
  height: min(70vh, 640px);
  width: 100%;
  margin-top: 28px;
  border-radius: 16px;
  border: 1px solid var(--ts-line, #e5ebf1);
  box-shadow: 0 10px 30px rgba(10, 31, 56, .08);
  z-index: 1;
  background: #eef3f7;
}

.ts-mapa-count {
  text-align: center;
  color: var(--ts-muted, #5b6b7d);
  font-size: 14px;
  margin: 14px 0 0;
}

.ts-pin { background: none; border: 0; }

/* balão do pin */
.leaflet-popup-content .ts-pop { width: 250px; font-family: inherit; }

.ts-pop h4 {
  margin: 0 0 2px;
  font-size: 16px;
  color: var(--ts-ink, #12314f);
  font-weight: 800;
}

.ts-pop-sub {
  color: var(--ts-green, #2f9e44);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ts-pop label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ts-ink, #12314f);
  margin: 8px 0 3px;
}

.ts-pop input,
.ts-pop select {
  width: 100%;
  padding: 9px 11px;
  border: 1.4px solid var(--ts-line, #e5ebf1);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
}

.ts-pop input:focus,
.ts-pop select:focus {
  outline: none;
  border-color: var(--ts-green, #2f9e44);
}

.ts-pop button {
  width: 100%;
  margin-top: 12px;
  background: var(--ts-green, #2f9e44);
  color: #fff;
  border: 0;
  padding: 11px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.ts-pop button:hover:not(:disabled) { background: var(--ts-green-d, #26863b); }
.ts-pop button:disabled { opacity: .7; cursor: progress; }

.ts-pop-msg { font-size: 13px; margin-top: 8px; display: none; }
.ts-pop-msg.ok { display: block; color: #0b6d2f; font-weight: 600; }
.ts-pop-msg.erro { display: block; color: #c0392b; font-weight: 600; }

@media (max-width: 900px) {
  .ts-row { grid-template-columns: 1fr; }
  .ts-form { padding: 28px 22px; }
  .ts-searchbar { margin-inline: 20px; }
}
