/**
 * SwiftSpot HoverTip — global floating tip (instant hover, no native title).
 * Pair with data-ss-tip on interactive elements. See HoverTip.js.
 */

.ss-hover-tip {
  --ss-tip-bg: #0f172a;
  --ss-tip-fg: #f8fafc;
  --ss-tip-shadow: 0 4px 14px rgba(15, 23, 42, 0.18), 0 1px 3px rgba(15, 23, 42, 0.12);
  position: fixed;
  z-index: 2147483000;
  left: 0;
  top: 0;
  max-width: min(16.5rem, calc(100vw - 1rem));
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--ss-tip-bg);
  color: var(--ss-tip-fg);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: var(--ss-tip-shadow);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px) scale(0.98);
  transition:
    opacity 90ms ease,
    transform 90ms ease,
    visibility 90ms ease;
  will-change: opacity, transform;
}

.ss-hover-tip--measuring {
  visibility: hidden !important;
  opacity: 0 !important;
  transition: none !important;
}

.ss-hover-tip--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ss-hover-tip__label {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.ss-hover-tip__arrow {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--ss-tip-bg);
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
}

.ss-hover-tip--top .ss-hover-tip__arrow {
  bottom: -4px;
  top: auto;
}

.ss-hover-tip--bottom .ss-hover-tip__arrow {
  top: -4px;
  bottom: auto;
}

html.dark .ss-hover-tip,
body.dark .ss-hover-tip,
.dark .ss-hover-tip {
  --ss-tip-bg: #1e293b;
  --ss-tip-fg: #f1f5f9;
  --ss-tip-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .ss-hover-tip {
    transition: none;
  }
}

/* Touch: slightly larger type; still non-interactive floating layer */
@media (hover: none) {
  .ss-hover-tip {
    max-width: min(18rem, calc(100vw - 1.25rem));
    font-size: 0.8125rem;
    padding: 0.45rem 0.7rem;
  }
}
