.copy-code-block {
  position: relative;
  margin: 0 0 20px;
}

.copy-code-block pre {
  margin: 0;
}

.copy-code-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  color: #f8f8f2;
  background-color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: opacity 120ms ease, background-color 120ms ease, border-color 120ms ease;
  opacity: 0.85;
}

.copy-code-button:hover,
.copy-code-button:focus {
  background-color: rgba(0, 0, 0, 0.8);
}

.copy-code-button:focus-visible {
  outline: 2px solid #268bd2;
  outline-offset: 2px;
}

.copy-code-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  pointer-events: none;
}

.copy-code-button.is-copied {
  background-color: #1f8f4d;
  border-color: rgba(255, 255, 255, 0.5);
}

.copy-code-button.is-error {
  background-color: #a94442;
}

.copy-code-button::after {
  content: attr(data-status);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  padding: 2px 6px;
  font-size: 11px;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.85);
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.copy-code-button.is-copied::after {
  background-color: #1f8f4d;
}

.copy-code-button.is-error::after {
  background-color: #a94442;
}

.copy-code-button.is-copied::after,
.copy-code-button.is-error::after {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
