/* Code blocks and their copy buttons on the GSB data page
   (/bible/versions/gsb/data/; script: copy.js). Layered on
   /shared/styles/openword-theme.css and its color variables. */

/* A long query scrolls inside its own box instead of widening the page. */
pre[data-copy] {
  overflow-x: auto;
  max-width: 100%;
  margin: 0.5rem 0 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
}

.copy-block {
  position: relative;
}
/* Room above the first line for the button, so it never covers the text. */
.copy-block pre[data-copy] {
  padding-top: 2.4rem;
}

.copy-button {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.25rem 0.5rem;
  font: inherit;
  font-size: 0.85em;
  color: var(--color-secondary);
  background: var(--color-primary);
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
  cursor: pointer;
}
.copy-button:hover {
  color: var(--link-color-start);
  border-color: var(--link-color-start);
}
.copy-button:focus-visible {
  outline: 2px solid var(--link-color-start);
  outline-offset: 2px;
}

.copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
