/* Definition tooltip styles */
.definition-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  width: min(32rem, 90vw);
  z-index: 9999;
  display: none;
  pointer-events: none;
}

.definition-tooltip.is-visible {
  display: block;
}

/* Block link icon - positioned absolutely within blocks */
.block-link-icon {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: #4b5563;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  z-index: 10;
  padding: 0;
}

.block-link-icon:hover {
  background: #374151;
  opacity: 1 !important;
}

/* Show icon when parent block is hovered */
[data-block-link]:hover .block-link-icon {
  opacity: 1;
}

/* Block link tooltip specific styles */
.block-link-tooltip {
  pointer-events: auto;
}

.definition-tooltip:has(.block-link-tooltip) {
  pointer-events: auto;
  width: min(28rem, 90vw);
  padding: 0.75rem;
}

