/* ==========================================================================
   InfoBlue — COMPONENTES: logo, botões, cabeçalho, rodapé, formulário, chat
   ========================================================================== */

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy); }
.logo__mark { width: 34px; height: 32px; }
.logo__text { font-family: var(--fonte-titulo); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.logo__text span { color: var(--blue); }
.logo--claro { color: var(--white); }
.logo--claro .logo__text span { color: var(--sky); }
.logo:hover { color: var(--navy); }
.logo--claro:hover { color: var(--white); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: .8rem 1.4rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: var(--white); box-shadow: 0 8px 20px rgba(35, 119, 207, .28); }
.btn--primary:hover { background: var(--blue-escuro); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--navy); border-color: var(--linha); }
.btn--secondary:hover { border-color: var(--blue); color: var(--blue-escuro); }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--ice); color: var(--navy); }
.btn--whatsapp { background: var(--whatsapp); color: var(--white); }
.btn--whatsapp:hover { background: #0E743E; color: var(--white); }
.btn--small { min-height: 42px; padding: .55rem 1.1rem; font-size: .94rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }

.link-forte {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem;
  background: none; border: 0; color: var(--blue); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.link-forte:hover { color: var(--blue-escuro); }

.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: .45rem .95rem;
  background: var(--white); color: var(--navy);
  border: 1.5px solid var(--linha); border-radius: 999px;
  font-size: .92rem; font-weight: 500; line-height: 1.25; text-align: left; text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.chip:hover { border-color: var(--blue); background: var(--ice); color: var(--navy); }

/* ---------- Lista com marcador de confirmação ---------- */
.lista-check { display: grid; gap: .7rem; }
.lista-check li { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; }
.lista-check .icon { margin-top: .2em; color: var(--blue); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--linha); box-shadow: 0 4px 18px rgba(16, 42, 80, .06); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--altura-header); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; gap: 1.6rem; }
.site-nav li a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--navy); font-weight: 500; font-size: .97rem; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav li a:hover, .site-nav li a[aria-current="true"] { border-bottom-color: var(--blue); }

.nav-toggle {
  display: none; width: 46px; height: 46px; padding: 0;
  align-items: center; justify-content: center;
  background: var(--ice); color: var(--navy); border: 0; border-radius: 12px;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle__fechar { display: none; }
.is-open .nav-toggle__abrir { display: none; }
.is-open .nav-toggle__fechar { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--margem) 1.5rem;
    background: var(--white); border-bottom: 1px solid var(--linha);
    box-shadow: 0 18px 30px rgba(16, 42, 80, .1);
  }
  .is-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li a { display: flex; min-height: 50px; font-size: 1.05rem; border-bottom: 1px solid var(--ice); }
}

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy); color: #C9D8EC; padding: 4rem 0 6rem; font-size: .96rem; }
.site-footer a { color: #C9D8EC; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; }
.site-footer__grid li a { display: inline-flex; align-items: center; min-height: 36px; }
.site-footer__slogan { margin-top: 1rem; font-family: var(--fonte-titulo); font-weight: 600; color: var(--white); line-height: 1.4; }
.site-footer__base {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .14); font-size: .88rem;
}
.site-footer__base p { margin: 0; }
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---------- Botão flutuante do WhatsApp ---------- */
.wa-float {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 56px; padding: 0 1.15rem 0 1rem;
  background: var(--whatsapp); color: var(--white);
  border-radius: 999px; font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 28px rgba(16, 42, 80, .28);
  transition: transform .18s ease, background-color .18s ease;
}
.wa-float:hover { background: #0E743E; color: var(--white); transform: translateY(-2px); }
.wa-float .icon { width: 28px; height: 28px; }
@media (max-width: 600px) {
  .wa-float { width: 56px; padding: 0; justify-content: center; }
  .wa-float__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

/* ---------- Formulário ---------- */
.painel {
  background: var(--white); border: 1px solid var(--linha); border-radius: var(--raio-g);
  padding: clamp(1.4rem, 3.5vw, 2.4rem); box-shadow: var(--sombra-1);
}
.form { display: grid; gap: 1.15rem; }
.campo { display: grid; gap: .4rem; min-width: 0; }
.campo label { font-weight: 600; font-size: .95rem; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 50px; padding: .7rem .9rem;
  background: var(--white); border: 1.5px solid var(--linha); border-radius: var(--raio-p);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.campo textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.campo ::placeholder { color: #7B8DA8; }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: #AFC6E0; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(87, 185, 233, .35);
}
.campo [aria-invalid="true"] { border-color: var(--erro); }
.campo__erro { margin: 0; color: var(--erro); font-size: .9rem; font-weight: 500; }
.campo-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 560px) { .campo-dupla { grid-template-columns: 1fr; } }
.campo-armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__nota { margin: 0; font-size: .88rem; color: var(--texto-suave); }

.plano-aviso {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0; padding: .6rem .6rem .6rem 1rem; max-width: none;
  background: var(--ice); border-radius: var(--raio-p); font-size: .95rem;
}
.plano-aviso button {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  background: none; border: 0; border-radius: 8px; color: var(--texto-suave);
}
.plano-aviso button:hover { background: var(--white); color: var(--navy); }

.resultado { display: grid; gap: 1rem; justify-items: start; }
.resultado:focus { outline: none; }
.resultado__icone {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--ice); color: var(--blue);
}
.resultado__icone .icon { width: 26px; height: 26px; }
.resultado[data-estado="pendente"] .resultado__icone,
.resultado[data-estado="erro"] .resultado__icone { display: none; }
.resultado h3 { font-size: 1.4rem; }
.resultado p { color: var(--texto-suave); }

/* ---------- Chat InfoBlue AI ---------- */
.chat {
  min-width: 0; max-width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: min(620px, 78vh); min-height: 460px;
  background: var(--white); color: var(--texto);
  border-radius: var(--raio-g); overflow: hidden; box-shadow: var(--sombra-2);
}
.chat__topo {
  display: flex; align-items: center; gap: .75rem; padding: .9rem 1.15rem;
  border-bottom: 1px solid var(--linha);
}
.chat__avatar { width: 40px; height: 38px; padding: 8px 7px; background: var(--navy); border-radius: 12px; }
.chat__topo strong { display: block; font-family: var(--fonte-titulo); font-size: 1rem; line-height: 1.2; }
.chat__topo div span { display: block; font-size: .82rem; line-height: 1.3; color: var(--texto-suave); }
.chat__selo {
  flex: none;
  margin-left: auto; padding: .3rem .7rem; border-radius: 999px;
  background: var(--ice); color: var(--navy); font-size: .8rem; font-weight: 600;
}

.chat__log { overflow-y: auto; padding: 1.15rem; display: flex; flex-direction: column; gap: .9rem; overscroll-behavior: contain; }
.chat__log:focus-visible { outline-offset: -3px; }

.chat-msg { display: grid; gap: .4rem; max-width: 88%; justify-items: start; animation: chat-entra .28s ease both; }
.chat-msg--user { align-self: flex-end; justify-items: end; }
.chat-msg__balao { padding: .75rem 1rem; border-radius: 18px; background: var(--ice); border-bottom-left-radius: 6px; }
.chat-msg__balao p { margin: 0 0 .6em; font-size: .96rem; line-height: 1.55; }
.chat-msg__balao p:last-child { margin-bottom: 0; }
.chat-msg--user .chat-msg__balao { background: var(--blue); color: var(--white); border-radius: 18px; border-bottom-right-radius: 6px; }
.chat-msg__acoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.chat-msg__nota { font-size: .75rem; color: var(--texto-suave); padding-left: .25rem; }

.chat-msg--digitando .chat-msg__balao { display: inline-flex; gap: 5px; padding: 1rem; }
.chat-msg--digitando i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: chat-ponto 1s ease-in-out infinite; }
.chat-msg--digitando i:nth-child(2) { animation-delay: .15s; }
.chat-msg--digitando i:nth-child(3) { animation-delay: .3s; }

@keyframes chat-entra { from { opacity: 0; transform: translateY(6px); } }
@keyframes chat-ponto { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat__sugestoes { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.15rem .9rem; }
.chat__form { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--linha); background: var(--ice); }
.chat__form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 1.1rem;
  background: var(--white); border: 1.5px solid var(--linha); border-radius: 999px;
}
.chat__form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(87, 185, 233, .35); }
.chat__enviar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--blue); color: var(--white); transition: background-color .18s ease;
}
.chat__enviar:hover { background: var(--blue-escuro); }
.chat__enviar .icon { width: 22px; height: 22px; }
