.property-contact {
  margin-bottom: 2rem;
}

.contact-card {
  padding: var(--gf-card-padding);
}

@media (max-width: 991.98px) {
  .contact-card {
    padding: var(--gf-card-padding-sm);
  }
}

.contact-card__header {
  display: flex;
  align-items: flex-start;
}

.contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background-color: rgba(var(--gf-color-primary-rgb), 0.12);
  color: var(--gf-color-primary);
  font-size: 1.75rem;
}

.contact-card__icon .material-icons {
  font-size: 1.75rem;
  line-height: 1;
}

.contact-field {
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.contact-field .form-label {
  margin-bottom: 0;
  font-weight: 600;
  transition: color 0.2s ease;
}

.contact-field:focus-within .form-label {
  color: var(--gf-color-primary);
}

.contact-field--textarea .gf-form-control {
  min-height: calc(var(--gf-field-min-height) + 6rem);
}

.contact-consent {
  border: 2px dashed #e5e7eb;
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* M6: alinhamento do checkbox + label multi-linha. Sem isso, no mobile
   o label quebra em 3 linhas e o checkbox fica desalinhado verticalmente
   por causa do baseline default do Bootstrap .form-check. */
.contact-consent__item.form-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0;
  min-height: auto;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.contact-consent__item.form-check:hover {
  background-color: rgba(var(--gf-color-primary-rgb), 0.04);
}

/* Padrão do design system: a linha inteira do checkbox marcado ganha
   fundo (mesmo feedback dos cards selecionáveis do /anunciar-imovel/). */
.contact-consent__item.form-check:has(.form-check-input:checked) {
  background-color: rgba(var(--gf-color-primary-rgb), 0.08);
}

/* A row INTEIRA é clicável (gesture-friendly): o ::after do label cobre
   o item todo; os links de Termos/Privacidade ficam por cima (z-index)
   e continuam navegáveis. */
.contact-consent__item .form-check-label::after {
  content: "";
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.contact-consent__item .form-check-label a {
  position: relative;
  z-index: 2;
}

.contact-consent__item .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  border-radius: 0.35rem;
  margin-top: 0.15rem;
  margin-left: 0;
  float: none;
  flex-shrink: 0;
}

.contact-consent__item .form-check-input:checked {
  background-color: var(--gf-color-primary);
  border-color: var(--gf-color-primary);
}

.contact-consent__item .form-check-label {
  color: #374151;
  margin: 0;
  /* Respiro entre linhas: os links sublinhados não "encavalam" com o
     texto da linha de cima quando o label quebra. */
  line-height: 1.65;
  text-wrap: pretty;
}

.contact-consent__item .form-check-label a {
  color: var(--gf-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-inline: 0.1rem;
  /* "Termos de Uso" / "Politica de Privacidade" nunca quebram no meio —
     em viewport estreita o label cai para 2 linhas limpas, nao 3. */
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .contact-card__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .contact-field {
    padding: 0.5rem 0;
  }

  .contact-consent {
    /* Padding lateral enxuto: maximiza a largura util do label em 360px
       (com os links em nowrap, garante o texto em 2 linhas). */
    padding: 0.85rem 0.75rem;
    gap: 0.85rem;
  }

  .contact-consent__item.form-check {
    gap: 0.5rem;
    padding: 0.5rem 0.45rem;
  }

  .contact-consent__item .form-check-label {
    font-size: 0.875rem;
    line-height: 1.55;
  }

  /* Em 360px o nowrap dos links estoura o espaço útil — deixar o texto
     fluir natural no mobile. */
  .contact-consent__item .form-check-label a {
    white-space: normal;
    margin-inline: 0;
  }
}
