/* ==========================================
HOJE DIÁRIO - BARRA DE COMPARTILHAMENTO
========================================== */.hd-sharebar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
width: 100%;
margin: 16px 0 22px;
box-sizing: border-box;
}.hd-sharebar-social {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px;
}/* BOTÕES CIRCULARES */.hd-sharebar a.hd-social,
.hd-sharebar button.hd-tool {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
min-width: 34px;
min-height: 34px;
flex-shrink: 0;
padding: 0;
margin: 0;
border: none;
border-radius: 50%;
color: #ffffff !important;
text-decoration: none !important;
box-shadow: none;
cursor: pointer;
box-sizing: border-box;
transition: opacity .2s ease, background .2s ease;
-webkit-tap-highlight-color: transparent;
}.hd-sharebar a.hd-social:hover,
.hd-sharebar button.hd-tool:hover {
opacity: .8;
}.hd-sharebar [hidden] {
display: none !important;
}.hd-social svg,
.hd-tool svg {
width: 18px;
height: 18px;
display: block;
flex-shrink: 0;
}.hd-social svg {
fill: currentColor;
}/* CORES DAS REDES SOCIAIS */.hd-whatsapp { background: #25D366 !important; }
.hd-facebook { background: #1877F2 !important; }
.hd-telegram { background: #229ED9 !important; }
.hd-twitter { background: #111111 !important; }
.hd-pinterest { background: #E60023 !important; }
.hd-linkedin { background: #0A66C2 !important; }
.hd-email { background: #555555 !important; }
.hd-sms { background: #16A34A !important; }/* IMPRIMIR E COPIAR LINK */.hd-sharebar button.hd-tool {
background: #f1f1f1 !important;
color: #333333 !important;
}.hd-sharebar button.hd-tool:hover {
background: #e3e3e3 !important;
}/* CONFIRMAÇÃO DE LINK COPIADO */.hd-sharebar button.hd-copied,
.hd-sharebar button.hd-copied:hover {
background: #16a34a !important;
color: #ffffff !important;
}.hd-tool .hd-check-icon {
display: none;
}.hd-copied .hd-link-icon {
display: none;
}.hd-copied .hd-check-icon {
display: block;
}/* GOOGLE - FONTE PREFERIDA */.hd-sharebar a.hd-google-preferred {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
border: 1px solid #ffc001;
border-radius: 30px;
background: #ffffff;
padding: 7px 12px;
color: #171717 !important;
text-decoration: none !important;
box-sizing: border-box;
transition: background .2s ease;
max-width: 100%;
}.hd-sharebar a.hd-google-preferred:hover {
background: #fff8df;
}.hd-google-icon {
width: 24px;
height: 24px;
flex-shrink: 0;
}.hd-google-text {
display: flex;
flex-direction: column;
gap: 2px;
text-align: left;
}.hd-google-title {
font-size: 12px;
font-weight: 700;
line-height: 1.3;
color: #171717;
}.hd-google-subtitle {
font-size: 10px;
font-weight: 400;
line-height: 1.3;
color: #666666;
}.hd-google-plus {
width: 15px;
height: 15px;
flex-shrink: 0;
color: #bd9000;
margin-left: 2px;
}/* ACESSIBILIDADE */.hd-sharebar a:focus-visible,
.hd-sharebar button:focus-visible {
outline: 2px solid #bd9000;
outline-offset: 3px;
}.hd-share-status {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}/* ==========================================
MOBILE - TODOS OS ÍCONES NA MESMA LINHA
========================================== */@media (max-width: 767px) {.hd-sharebar {
flex-direction: column;
align-items: stretch;
gap: 10px;
margin: 14px 0 20px;
}.hd-sharebar-social {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
width: 100%;
min-width: 0;
gap: 4px;
}.hd-sharebar a.hd-social,
.hd-sharebar button.hd-tool {
flex: 0 1 32px;
width: 32px;
max-width: 32px;
height: auto;
min-width: 0;
min-height: 0;
aspect-ratio: 1 / 1;
padding: 0;
border-radius: 50%;
}.hd-social svg,
.hd-tool svg {
width: 58%;
max-width: 18px;
height: auto;
}.hd-sharebar a.hd-google-preferred {
width: 100%;
padding: 10px 16px;
}.hd-google-text {
flex: 1;
}.hd-google-title {
font-size: 13px;
}.hd-google-subtitle {
font-size: 11px;
}.hd-google-icon {
width: 28px;
height: 28px;
}
}/* CELULARES MUITO ESTREITOS */@media (max-width: 360px) {.hd-sharebar-social {
gap: 3px;
}.hd-sharebar a.hd-social,
.hd-sharebar button.hd-tool {
flex-basis: 28px;
max-width: 28px;
}
}/* REDUÇÃO DE MOVIMENTO */@media (prefers-reduced-motion: reduce) {
.hd-sharebar a,
.hd-sharebar button {
transition: none !important;
}
}/* OCULTAR A BARRA NA IMPRESSÃO */@media print {
.hd-sharebar {
display: none !important;
}
}
(function () {'use strict';/* ======================================
CAPTURA OS DADOS DA NOTÍCIA
====================================== */function hdGetPostData() {var canonical = document.querySelector(
'link[rel="canonical"]'
);var ogTitle = document.querySelector(
'meta[property="og:title"]'
);var ogImage = document.querySelector(
'meta[property="og:image"]'
);var featuredImage = document.querySelector(
'.tdb_single_featured_image img, ' +
'.td-post-featured-image img, ' +
'img.wp-post-image'
);var pageUrl = canonical && canonical.href
? canonical.href
: window.location.href.split('#')[0];var pageTitle = ogTitle && ogTitle.content
? ogTitle.content
: document.title;var pageImage = ogImage && ogImage.content
? ogImage.content
: featuredImage
? featuredImage.currentSrc ||
featuredImage.src
: '';if (pageImage) {try {pageImage = new URL(
pageImage,
document.baseURI
).href;if (!/^https?:\/\//i.test(pageImage)) {
pageImage = '';
}} catch (error) {
pageImage = '';
}}return {
url: pageUrl,
title: pageTitle,
image: pageImage
};}/* ======================================
CONFIGURA OS COMPARTILHAMENTOS
====================================== */function hdInitSharebar() {var post = hdGetPostData();var url = encodeURIComponent(post.url);
var title = encodeURIComponent(post.title);
var image = encodeURIComponent(post.image);var message = encodeURIComponent(
post.title + '\n\n' + post.url
);/* Identifica Android e iOS */var ua = navigator.userAgent || '';var isIOS =
/iPhone|iPad|iPod/i.test(ua) ||
(/Macintosh/i.test(ua) &&
navigator.maxTouchPoints > 1);var isAndroid = /Android/i.test(ua);var isMobile = isIOS || isAndroid;/* Links de compartilhamento */var links = {whatsapp:
'https://api.whatsapp.com/send?text=' +
message,facebook:
'https://www.facebook.com/sharer/sharer.php?u=' +
url,telegram:
'https://t.me/share/url?url=' +
url + '&text=' + title,twitter:
'https://twitter.com/intent/tweet?text=' +
title + '&url=' + url,pinterest:
post.image
? 'https://www.pinterest.com/pin/create/button/?url=' +
url + '&media=' + image +
'&description=' + title
: '',linkedin:
'https://www.linkedin.com/sharing/share-offsite/?url=' +
url,email:
'mailto:?subject=' +
title + '&body=' + message,sms:
'sms:' +
(isIOS ? '&' : '?') +
'body=' + message};document.querySelectorAll(
'.hd-sharebar [data-hd-share]'
).forEach(function (button) {var network = button.getAttribute(
'data-hd-share'
);/* SMS somente no celular */if (network === 'sms' && !isMobile) {
button.hidden = true;
return;
}/* Pinterest precisa de uma imagem */if (network === 'pinterest' && !post.image) {
button.hidden = true;
return;
}if (links[network]) {button.href = links[network];
button.hidden = false;}});/* Habilita impressão e copiar link */document.querySelectorAll(
'.hd-sharebar .hd-tool'
).forEach(function (button) {
button.hidden = false;
});}/* ======================================
COPIAR LINK
====================================== */async function hdCopyLink(button) {var pageUrl = hdGetPostData().url;try {if (!navigator.clipboard ||
!navigator.clipboard.writeText) {throw new Error(
'Clipboard indisponível'
);}await navigator.clipboard.writeText(pageUrl);} catch (error) {/* Alternativa para outros navegadores */var temp = document.createElement(
'textarea'
);temp.value = pageUrl;
temp.style.position = 'fixed';
temp.style.left = '-9999px';
temp.style.opacity = '0';temp.setAttribute('readonly', '');document.body.appendChild(temp);temp.select();
temp.setSelectionRange(
0, temp.value.length
);var copied = false;try {
copied = document.execCommand('copy');
} catch (e) {}temp.remove();
button.focus();/* Alternativa manual */if (!copied) {window.prompt(
'Copie o link da notícia:',
pageUrl
);return;}}/* Confirmação visual */button.classList.add('hd-copied');button.setAttribute(
'title', 'Link copiado!'
);button.setAttribute(
'aria-label', 'Link copiado!'
);var bar = button.closest('.hd-sharebar');var status = bar
? bar.querySelector('.hd-share-status')
: null;if (status) {
status.textContent = 'Link copiado!';
}clearTimeout(button.hdCopyTimer);button.hdCopyTimer = setTimeout(function () {button.classList.remove('hd-copied');button.setAttribute(
'title', 'Copiar link da notícia'
);button.setAttribute(
'aria-label', 'Copiar link da notícia'
);if (status) {
status.textContent = '';
}}, 2000);}/* ======================================
CLIQUES: IMPRIMIR E COPIAR
====================================== */function hdHandleClick(event) {if (!event.target.closest) return;var printButton = event.target.closest(
'.hd-sharebar .hd-print'
);if (printButton) {event.preventDefault();
window.print();
return;}var copyButton = event.target.closest(
'.hd-sharebar .hd-copy'
);if (copyButton) {event.preventDefault();
hdCopyLink(copyButton);}}/* Evita duplicação dos eventos */if (!window.hdSharebarEventsLoaded) {document.addEventListener(
'click',
hdHandleClick
);window.hdSharebarEventsLoaded = true;}/* Inicialização */if (document.readyState === 'loading') {document.addEventListener(
'DOMContentLoaded',
hdInitSharebar
);} else {hdInitSharebar();}/* Atualiza após o carregamento das imagens */window.addEventListener(
'load',
hdInitSharebar
);})();