/* Botão fixo de WhatsApp com foto do advogado e balão de mensagem */
.wa-widget {
  position: fixed; right: 20px; bottom: 20px; z-index: 95;
  display: flex; align-items: center; gap: 12px;
  font-family: 'Source Sans 3', 'Manrope', Arial, sans-serif;
}
.wa-widget-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.wa-bubble {
  position: relative;
  max-width: 230px;
  padding: 12px 16px;
  background: #fff; color: #1f2a37;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(14,28,58,0.18);
  font-size: 0.95rem; line-height: 1.35;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.wa-bubble strong { display: block; font-weight: 700; color: #0E1C3A; }
.wa-widget.is-open .wa-bubble { opacity: 1; transform: none; pointer-events: auto; }
.wa-bubble-close {
  position: absolute; top: -9px; left: -9px;
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: #fff; color: #5A6A85;
  box-shadow: 0 2px 8px rgba(14,28,58,0.22);
  font-size: 15px; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.wa-widget.is-open .wa-bubble-close { display: flex; }
.wa-avatar { position: relative; flex-shrink: 0; width: 64px; height: 64px; }
.wa-avatar img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid #fff; box-shadow: 0 6px 22px rgba(14,28,58,0.25);
  filter: none !important;
}
.wa-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.wa-badge svg { width: 16px; height: 16px; }
.wa-widget-link:hover .wa-avatar img { transform: scale(1.05); }
.wa-avatar img { transition: transform .2s ease; }
.wa-widget-link:focus-visible { outline: 2px solid #25D366; outline-offset: 4px; border-radius: 16px; }

/* Modo escuro */
:root[data-theme="dark"] .wa-bubble, :root[data-theme="dark"] .wa-bubble-close { background: #15213A; color: #E4E9F2; box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
:root[data-theme="dark"] .wa-bubble strong { color: #F2F5FA; }
:root[data-theme="dark"] .wa-avatar img, :root[data-theme="dark"] .wa-badge { border-color: #15213A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wa-bubble, :root:not([data-theme="light"]) .wa-bubble-close { background: #15213A; color: #E4E9F2; box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
  :root:not([data-theme="light"]) .wa-bubble strong { color: #F2F5FA; }
  :root:not([data-theme="light"]) .wa-avatar img, :root:not([data-theme="light"]) .wa-badge { border-color: #15213A; }
}

@media (max-width: 480px) {
  .wa-widget { right: 14px; bottom: 14px; }
  .wa-bubble { max-width: 190px; font-size: 0.88rem; padding: 10px 13px; }
  .wa-avatar, .wa-avatar img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .wa-bubble, .wa-avatar img { transition: none; } }
