/* The article page's Share buttons (articles/_share_links.html.erb): big round icons that are easy
   to hit with a thumb, each in its network's colour. Uses the Bootstrap Icons font the layout
   already loads. */
.share-panel { display: flex; flex-direction: column; gap: 1rem; }

/* Share sheet and Copy link: wide, easy targets on top of the network icons. */
.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.share-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  min-width: 10rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid #212529;
  border-radius: 2rem;
  background: #fff;
  color: #212529;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

/* [hidden] loses to display: inline-flex above, so say it again. */
.share-action[hidden] { display: none; }

.share-action:hover,
.share-action:focus-visible { background: #212529; color: #fff; }
.share-action:focus-visible { outline: 3px solid #212529; outline-offset: 3px; }
.share-action .bi { font-size: 1.4rem; }

.share-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Selectors start from .share-links so they beat the article theme's blanket
   ".con-energy-page a { color: pink }", which otherwise tints the white icons. */
.share-links .share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--share-color, #495057);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.share-links .share-link:hover,
.share-links .share-link:focus-visible {
  color: #fff;
  filter: brightness(1.12);
  transform: scale(1.06);
}

.share-links .share-link:focus-visible { outline: 3px solid var(--share-color, #495057); outline-offset: 3px; }

.share-links .share-link-facebook  { --share-color: #1877f2; }
.share-links .share-link-x         { --share-color: #000; }
.share-links .share-link-whatsapp  { --share-color: #25a244; }
.share-links .share-link-pinterest { --share-color: #e60023; }
.share-links .share-link-reddit    { --share-color: #ff4500; }
.share-links .share-link-email     { --share-color: #495057; }

@media (prefers-reduced-motion: reduce) {
  .share-links .share-link { transition: none; }
  .share-links .share-link:hover, .share-links .share-link:focus-visible { transform: none; }
}
