/* Alerta das REGRAS DO TIPO DE IMÓVEL na pré-análise.
   Abre quando o cliente escolhe terreno, terreno + construção ou imóvel comercial —
   tipos que têm teto, prazo e FGTS diferentes do padrão. Ele lê, fecha e segue.

   NÃO usa o .modal do Bootstrap de propósito: o style.css sobrescreve .modal
   globalmente para TELA CHEIA (é o modal de WhatsApp), e um alerta em tela cheia
   assusta mais do que informa. Componente próprio, como o bot.painel.

   Camadas (ver "Camadas" no style.css): backdrop 100000, caixa 100001 — acima do
   banner de cookies (99999). Hoje o banner só existe na home, mas ele é uma barra no
   pé da tela e taparia justamente o botão "Entendi": foi assim que ele escondeu o
   campo do bot.painel. A camada fica reservada para o dia em que o banner chegar aqui. */

.aviso-tipo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(13, 44, 100, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.aviso-tipo-backdrop.aberto {
  opacity: 1;
  pointer-events: auto;
}

.aviso-tipo {
  position: fixed;
  z-index: 100001;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.97);
  width: 460px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  margin: 0;
  padding: 0;                 /* blindagem: regras globais do tema não entram aqui */
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.aviso-tipo.aberto {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- cabeçalho ---------- */
.aviso-tipo__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: #0D2C64;
  color: #fff;
}

.aviso-tipo__icone {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}

.aviso-tipo__titulo {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

/* ---------- corpo ---------- */
.aviso-tipo__corpo {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #333;
}

.aviso-tipo__corpo strong {
  color: #0D2C64;
}

/* ---------- rodapé ---------- */
.aviso-tipo__pe {
  flex-shrink: 0;
  padding: 0 20px 20px;
  text-align: right;
}

.aviso-tipo__ok {
  display: inline-block;
  width: auto;
  border: 0;
  cursor: pointer;
  font-family: Roboto, sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
  color: #fff;
  padding: 10px 30px;
  border-radius: 4px;
  background: linear-gradient(to right, rgb(13, 44, 100) 0%, rgb(1, 174, 239) 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .25);
  transition: all .3s ease;
}

.aviso-tipo__ok:hover,
.aviso-tipo__ok:focus {
  filter: brightness(1.08);
  outline: none;
}

/* ---------- a linha discreta que fica no formulário ---------- */
/* O modal some quando o cliente fecha, mas a regra continua valendo enquanto ele
   preenche. Esta linha é o lembrete permanente, e reabre o texto completo. */
.aviso-tipo-resumo {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #0D2C64;
}

.aviso-tipo-resumo.d-none {
  display: none;
}

.aviso-tipo-resumo__link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #01AEEF;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 575px) {
  .aviso-tipo {
    width: calc(100vw - 24px);
  }

  .aviso-tipo__head {
    padding: 15px 16px;
  }

  .aviso-tipo__corpo {
    padding: 16px;
    font-size: 15px;
  }

  .aviso-tipo__pe {
    padding: 0 16px 16px;
    text-align: center;
  }

  .aviso-tipo__ok {
    width: 100%;
  }
}

/* Quem prefere menos movimento não recebe a animação de entrada. */
@media (prefers-reduced-motion: reduce) {
  .aviso-tipo,
  .aviso-tipo-backdrop {
    transition: none;
  }

  .aviso-tipo.aberto {
    transform: translate(-50%, -50%);
  }
}
