/* =====================================================
   COMPARTILHAR (compartilhar-v1.js monta tudo; nada disto está no HTML)
   1) Faixa "Indique para um amigo", antes da chamada final de cada página
   2) Botão flutuante, acima do botão do WhatsApp
   Cores só por token (tema claro e escuro). O verde do WhatsApp é o mesmo
   do botão flutuante do WhatsApp.
   ===================================================== */

/* ---------- 1) Faixa ---------- */
.compartilhar{padding:72px 0;}
.compartilhar-card{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:28px 36px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);
  box-shadow:var(--shadow-1);padding:36px 40px;position:relative;overflow:hidden;
}
.compartilhar-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--leaf);
}
.compartilhar-icone{
  width:76px;height:76px;border-radius:50%;background:var(--leaf-wash);color:var(--leaf-text);
  display:flex;align-items:center;justify-content:center;flex:none;
}
.compartilhar-icone svg{width:36px;height:36px;}
.compartilhar-texto{min-width:0;}
.compartilhar-texto .eyebrow{margin-bottom:8px;}
.compartilhar-texto h2{font-size:clamp(22px,2.6vw,30px);color:var(--house);line-height:1.2;}
.compartilhar-texto p:not(.eyebrow){font-size:16px;color:var(--text-soft);margin-top:10px;max-width:52ch;}
.compartilhar-botoes{display:flex;flex-direction:column;gap:10px;min-width:250px;}
.compartilhar-linha{display:flex;gap:10px;}
.compartilhar-linha .btn{flex:1 1 0;}
.compartilhar .btn{min-height:48px;padding:0 20px;font-size:14.5px;white-space:nowrap;}
.compartilhar .btn svg{width:20px;height:20px;flex:none;}
.compartilhar .btn-outline{background:transparent;}
.compartilhar .btn-outline:hover{background:var(--surface-2);}
.compartilhar-aviso:empty{display:none;}
.btn-whats{background:#25D366;color:var(--on-sun);box-shadow:0 10px 24px -12px rgba(37,211,102,.9);}
.btn-whats:hover{transform:translateY(-2px);box-shadow:0 16px 30px -12px rgba(37,211,102,1);}
.compartilhar-aviso{
  font-size:13.5px;font-weight:600;color:var(--leaf-text);text-align:center;margin:0;
}

@media (max-width:980px){
  .compartilhar-card{grid-template-columns:auto minmax(0,1fr);}
  .compartilhar-botoes{grid-column:1 / -1;min-width:0;}
}
@media (max-width:640px){
  .compartilhar{padding:48px 0;}
  .compartilhar-card{grid-template-columns:minmax(0,1fr);padding:28px 22px 22px 26px;gap:18px;}
  .compartilhar-icone{width:60px;height:60px;}
  .compartilhar-icone svg{width:28px;height:28px;}
  .compartilhar-texto p:not(.eyebrow){font-size:15px;}
  .compartilhar-linha{flex-wrap:wrap;}
  .compartilhar-linha .btn{flex:1 1 130px;padding:0 14px;}
}

/* ---------- 2) Botão flutuante ---------- */
.compartilhar-float{
  position:fixed;right:28px;bottom:96px;z-index:100;
  display:flex;align-items:center;flex-direction:row-reverse;gap:10px;
}
.compartilhar-sem-whats .compartilhar-float{bottom:24px;}
.compartilhar-float-botao{
  width:50px;height:50px;border-radius:50%;border:1px solid var(--line-strong);cursor:pointer;
  background:var(--surface);color:var(--house);box-shadow:var(--shadow-1);
  display:flex;align-items:center;justify-content:center;flex:none;
  transition:transform .18s ease, background-color .18s ease;
}
.compartilhar-float-botao svg{width:24px;height:24px;}
.compartilhar-float-botao:hover{transform:scale(1.08);background:var(--surface-2);}
.compartilhar-float-botao:focus-visible{outline:3px solid var(--panel);outline-offset:3px;}
.compartilhar-float-rotulo{
  background:var(--brand-navy);color:#fff;font-size:13.5px;font-weight:700;line-height:1.2;
  padding:9px 14px;border-radius:999px;white-space:nowrap;box-shadow:var(--shadow-1);
  opacity:0;transform:translateX(8px);pointer-events:none;
  transition:opacity .3s ease, transform .3s ease;
}
.compartilhar-float.com-rotulo .compartilhar-float-rotulo,
.compartilhar-float-botao:hover + .compartilhar-float-rotulo{opacity:1;transform:none;}
.compartilhar-menu{
  position:absolute;right:0;bottom:calc(100% + 12px);width:232px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-m);
  box-shadow:var(--shadow-2, var(--shadow-1));padding:8px;display:none;
}
.compartilhar-float.aberto .compartilhar-menu{display:block;}
.compartilhar-float.aberto .compartilhar-float-rotulo{opacity:0;}
.compartilhar-menu p{font-size:13px;font-weight:700;color:var(--text-soft);padding:6px 10px 8px;margin:0;}
.compartilhar-menu button{
  display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;cursor:pointer;
  font-family:var(--font-body);font-size:14.5px;font-weight:600;color:var(--text);text-align:left;
  padding:11px 10px;border-radius:var(--radius-s);
}
.compartilhar-menu button:hover,.compartilhar-menu button:focus-visible{background:var(--surface-2);outline:none;}
.compartilhar-menu button svg{width:20px;height:20px;flex:none;color:var(--house);}
.compartilhar-menu button[data-canal="whatsapp"] svg{color:var(--leaf-text);}

/* O botão do WhatsApp encolhe até 480px e sobe com o aviso de cookies até 640px: este acompanha os dois. */
@media (max-width:640px){
  .cookies-aviso-aberto .compartilhar-float{bottom:calc(var(--cookies-altura, 170px) + 86px);}
  .cookies-aviso-aberto.compartilhar-sem-whats .compartilhar-float{bottom:calc(var(--cookies-altura, 170px) + 14px);}
}
@media (max-width:480px){
  .compartilhar-float{right:19px;bottom:78px;}
  .compartilhar-sem-whats .compartilhar-float{bottom:16px;}
  .compartilhar-float-botao{width:44px;height:44px;}
  .compartilhar-float-botao svg{width:21px;height:21px;}
  .cookies-aviso-aberto .compartilhar-float{bottom:calc(var(--cookies-altura, 170px) + 76px);}
}
@media (prefers-reduced-motion:reduce){
  .compartilhar-float-rotulo,.compartilhar-float-botao,.btn-whats{transition:none;}
}
@media print{.compartilhar,.compartilhar-float{display:none;}}
