/* Card name container: inline-flex to keep icon + text together (Newspaper theme) */
.hs-card-tooltip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  cursor: help;
  border-bottom: 1px dashed currentColor;
}

.hs-set-icon {
  height: 1.1em;
  width: auto;
  margin-right: 4px;
  box-shadow: none !important;
  border-radius: 0 !important;
  vertical-align: middle;
}

/* Rarity colors (Hearthstone palette), border uses currentColor */
.hs-rarity-legendary {
  color: #ff7d0a;
}

.hs-rarity-epic {
  color: #a335ee;
}

.hs-rarity-rare {
  color: #0070dd;
}

/* Common: white/gray. Newspaper theme fallback for light/dark */
.hs-rarity-common {
  color: #ffffff;
}

/* Light theme (Newspaper default): dark text for readability */
.td-post-content .hs-rarity-common,
.entry-content .hs-rarity-common,
.td-container .hs-rarity-common {
  color: #4a4a4a;
}

.hs-tooltip-box {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(20, 24, 30, 0.9);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  contain: layout style paint;
  will-change: opacity;
}

.hs-tooltip-box.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hs-tooltip-box {
    transition: none;
    will-change: auto;
  }
}

.hs-tooltip-box img {
  display: block;
  width: 240px;
  height: auto;
  border-radius: 6px;
}

.hs-tooltip-box.is-loading img {
  opacity: 0.2;
}

.hs-tooltip-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: hsTooltipSpin 0.8s linear infinite;
}

@keyframes hsTooltipSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-tooltip-loader {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.9);
  }
}
