/* Consultor IA 4Skin — launcher acima do WhatsApp (.s4-wa-float bottom:16px,
   altura 56px = topo aos 72px; aqui começa aos 88px, folga de 16px em vez
   dos 8px anteriores — achado directo da 4Skin, 22/09/2026: os dois botões
   apareciam a tocar-se/sobrepor-se no telemóvel). Soma também
   --s4-vv-bottom-gap (mesma correção de barra de endereço móvel de
   .s4-wa-float/.s4-back-to-top em tools/src.css — ver o comentário lá). */
.s4-ia-launcher{
  position:fixed;right:16px;bottom:calc(88px + env(safe-area-inset-bottom,0px) + var(--s4-vv-bottom-gap,0px));
  z-index:39;height:56px;padding:0 1.1rem 0 .75rem;border:0;border-radius:999px;
  background:#0f766e;color:#fff;box-shadow:0 8px 24px rgba(15,118,110,.35);
  cursor:pointer;display:flex;align-items:center;gap:.5rem;
  transition:transform .15s ease,background .15s ease;
}
.s4-ia-launcher-icone{display:flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.16);flex-shrink:0}
.s4-ia-launcher-texto{font-size:.8rem;font-weight:800;letter-spacing:.01em;white-space:nowrap}
.s4-ia-launcher:hover,.s4-ia-launcher:focus-visible{background:#115e59;transform:translateY(-2px)}
.s4-ia-launcher:focus-visible{outline:3px solid #99f6e4;outline-offset:3px}
.s4-ia-launcher[aria-expanded="true"]{background:#134e4a}
/* v8.9.2 — botões flutuantes sem tapar o botão principal (pedido do titular,
   25/09/2026; WCAG 2.2 «2.4.11 Focus Not Obscured»): no telemóvel o
   Assistente é só ícone (o nome continua lido pelos leitores de ecrã); e,
   enquanto o resumo com os botões de proposta/WhatsApp da página está no
   ecrã, os flutuantes recolhem — o resumo já tem os mesmos caminhos. */
@media (max-width:767px){
  .s4-ia-launcher{width:56px;padding:0;justify-content:center}
  .s4-ia-launcher-icone{background:transparent}
  .s4-ia-launcher-texto{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
}
.s4-ia-launcher,.s4-wa-float,.s4-back-to-top{transition:opacity .2s ease,transform .2s ease,visibility .2s}
body.s4-flut-recolhidos .s4-ia-launcher:not([aria-expanded="true"]),
body.s4-flut-recolhidos .s4-wa-float,
body.s4-flut-recolhidos .s4-back-to-top{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(12px)}
.s4-ia-dialog{
  position:fixed;right:16px;bottom:calc(156px + env(safe-area-inset-bottom,0px) + var(--s4-vv-bottom-gap,0px));
  z-index:41;width:min(22rem,calc(100vw - 32px));max-height:min(32rem,calc(100dvh - 180px));
  display:flex;flex-direction:column;border-radius:1rem;
  background:#fff;color:#1e293b;box-shadow:0 20px 25px -5px rgba(15,23,42,.2),0 8px 10px -6px rgba(15,23,42,.15);
  border:1px solid #e2e8f0;overflow:hidden;
}
.s4-ia-dialog[hidden]{display:none!important}
.s4-ia-topo{display:flex;align-items:flex-start;gap:.75rem;
  padding:.875rem 1rem;background:#115e59;color:#fff}
.s4-ia-topo>div{flex:1;min-width:0}
.s4-ia-topo h2{margin:0;font-size:1rem;font-weight:600;line-height:1.25}
.s4-ia-topo p{margin:.25rem 0 0;font-size:.75rem;line-height:1.35;color:rgba(204,251,241,.9)}
.s4-ia-fechar{
  min-height:44px;min-width:44px;border:0;border-radius:.5rem;cursor:pointer;
  flex-shrink:0;margin:-.125rem -.25rem 0 0;background:transparent;color:rgba(204,251,241,.9);
  display:flex;align-items:center;justify-content:center;
}
.s4-ia-fechar:hover,.s4-ia-fechar:focus-visible{background:rgba(17,94,89,.6);color:#fff}
.s4-ia-enviar{
  min-height:44px;border:0;border-radius:.75rem;cursor:pointer;font-weight:600;
}
.s4-ia-corpo{flex:1;overflow:auto;padding:1rem;display:flex;flex-direction:column;gap:.75rem;
  background:#f8fafc}
.s4-ia-msg{max-width:85%;padding:.75rem 1rem;font-size:.9375rem;line-height:1.45}
.s4-ia-msg[data-papel="assistente"]{align-self:flex-start;background:#fff;border:1px solid #e2e8f0;color:#042f2e;
  border-radius:1rem 1rem 1rem .35rem;box-shadow:0 1px 2px rgba(15,23,42,.06)}
.s4-ia-msg[data-papel="utilizador"]{align-self:flex-end;background:#115e59;color:#fff;
  border-radius:1rem 1rem .35rem 1rem}
.s4-ia-msg[data-papel="sistema"]{align-self:stretch;background:#ecfdf5;border:1px solid #99f6e4;color:#134e4a;font-size:.8rem;
  border-radius:1rem}
.s4-ia-acoes{display:flex;flex-wrap:wrap;gap:.5rem;padding:0 1rem .75rem;background:#f8fafc}
.s4-ia-acoes button{
  min-height:44px;border:1px solid #0d9488;background:#fff;color:#115e59;
  border-radius:999px;padding:0 1rem;font-size:.875rem;font-weight:600;cursor:pointer;
  transition:background-color .15s ease;
}
.s4-ia-acoes button:hover,.s4-ia-acoes button:focus-visible{background:#f0fdfa}
.s4-ia-form{display:flex;align-items:flex-end;gap:.5rem;padding:.75rem 1rem;border-top:1px solid #e2e8f0;background:#fff}
.s4-ia-form label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.s4-ia-form textarea{
  flex:1;min-height:44px;max-height:6.5rem;resize:none;border:1px solid #0d9488;
  border-radius:.75rem;padding:.625rem .875rem;font:inherit;font-size:.9375rem;color:#042f2e;
}
.s4-ia-form textarea::placeholder{color:#94a3b8}
.s4-ia-form textarea:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(13,148,136,.4);border-color:#115e59}
.s4-ia-enviar{background:#115e59;color:#fff;padding:0 1.25rem;flex:0 0 auto;font-size:.875rem}
.s4-ia-enviar:hover,.s4-ia-enviar:focus-visible{background:#0d4d47}
.s4-ia-enviar:disabled{opacity:.55;cursor:not-allowed}
.s4-ia-aviso{font-size:.75rem;line-height:1.4;color:#64748b;padding:0 1rem .875rem;background:#fff}
.s4-ia-aviso a{color:#115e59;font-weight:600;text-decoration:underline;text-underline-offset:2px}
.s4-ia-dialog .sr-only,.s4-ia-launcher + .sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0
}
@media print{
  .s4-ia-launcher,.s4-ia-dialog{display:none!important}
}
@media (max-width:420px){
  .s4-ia-dialog{right:8px;left:8px;width:auto;bottom:calc(156px + env(safe-area-inset-bottom,0px) + var(--s4-vv-bottom-gap,0px))}
}
