/* Spinner */
.slakttrad-spinner {
  width: 40px;
  height: 40px;
  border: 5px solid rgba(0,0,0,0.1);
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

#treeLoading {
    display: none;
    position: absolute;
    top: 10px; /* eller justera efter behov */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Träd: fokus/highlight */
.slakttrad-has-selection .slakttrad-node {
  opacity: 0.35;
}

.slakttrad-has-selection .slakttrad-node.slakttrad-selected,
.slakttrad-has-selection .slakttrad-node.slakttrad-related {
  opacity: 1;
}

.slakttrad-node.slakttrad-selected > .slakttrad-node-header {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Sök: tooltip med träff-förklaring */
.slakttrad-search-tooltip {
  position: fixed;
  z-index: 99999;
  max-width: 520px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 15px rgba(0,0,0,0.2);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

.slakttrad-search-tooltip > div {
  margin: 2px 0;
}

.slakttrad-search-tooltip mark {
  background: transparent;
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
}
