/* Container */
.highlight {
  position: relative;
}

/* Minimalist Button */
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  padding: 5px;
  background: transparent; /* No background by default */
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.3; /* Faint until needed */
  transition: all 0.2s ease;
  color: currentColor; /* Matches your text color automatically */
}

/* Only highlight when the mouse is directly over the button */
.copy-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Adjustments for Dark Mode */
@media (prefers-color-scheme: dark) {
  .copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Success state */
.copy-btn.copied {
  color: #10b981; /* Green */
  opacity: 1;
}