/**
 * @file
 * Kategorie-Newsletter-Icon in #artikel_share.
 */

.st-category-newsletter-icon {
  --fa-primary-color: var(--st-text);
  --fa-secondary-color: color-mix(in srgb, var(--st-text) 38%, transparent);
  --fa-secondary-opacity: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  margin: 0 5px 0 0;
  padding: 0;
  border: 0;
  font-size: 1.125rem;
  line-height: 1;
  background: transparent;
  color: var(--fa-primary-color);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
}

.st-category-newsletter-icon .fa-duotone {
  font-size: inherit;
  line-height: 1;
}

.st-category-newsletter-icon--interactive.is-subscribed {
  color: var(--st-link, #e2007a);
  --fa-primary-color: var(--st-link, #e2007a);
  --fa-secondary-color: color-mix(in srgb, var(--st-link, #e2007a) 35%, transparent);
}

.st-category-newsletter-icon--interactive.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

/* Tooltip am Button, nicht am <i> – Duotone nutzt ::before/::after am Icon. */
#artikel_share .st-category-newsletter-icon--interactive[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--st-hell);
  background: var(--st-dunkel);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 10;
}

#artikel_share .st-category-newsletter-icon--interactive[data-tooltip]:hover::after,
#artikel_share .st-category-newsletter-icon--interactive[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
