pre {
  position: relative;
}

pre:hover .copy-button,
pre .copy-button:focus {
  opacity: 1;
}

.copy-button {
  display: flex;
  opacity: 0;
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 4px;
  background-color: var(--codeBackground);
  border: none;
  cursor: pointer;
  transition: all 150ms;
  font-family: var(--defaultFontFamily);
  font-size: 14px;
  line-height: 24px;
  color: currentColor;
}

.copy-button svg {
  opacity: 0.5;
  transition: all 150ms;
}

pre .copy-button:hover svg,
pre .copy-button:focus-visible svg {
  opacity: 1;
}

.copy-button svg {
  width: 20px;
}

.copy-button.clicked {
  opacity: 1;
  color: var(--success);
}

.copy-button.clicked svg {
  display: none;
  color: currentColor;
}
