/* Reusable copy-to-clipboard button for any <pre> on the page.
   Works with lab-shell.css code blocks and plain <pre> snippets. */

.copy-wrap { position: relative; }

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
}

.copy-btn i { font-size: 13px; }

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
}

/* If the pre is inside a lab-shell code-pane that scrolls, keep the button pinned visually */
.code-pane { position: relative; }
.code-pane .copy-btn { top: 8px; right: 12px; }
