.post-content pre.has-copy-button {
  position: relative;
  border-radius: 14px;
  overflow: auto;
  padding: 2.35rem 16px 14px;
}

.code-copy-button {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.85;
  padding: 0.4rem 0.7rem;
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  z-index: 1;
}

.code-copy-button:hover,
.code-copy-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(248, 113, 113, 0.42);
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
}

.code-copy-button[data-copied="true"] {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
  opacity: 1;
}

html.carol-dark-background .post-content pre.has-copy-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html.carol-dark-background .post-content :not(pre) > code {
  background-color: rgba(15, 23, 42, 0.26) !important;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 5px;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.84em;
  padding: 1px 4px;
  white-space: nowrap;
}

html.carol-dark-background .code-copy-button {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e5e7eb;
}

html.carol-dark-background .code-copy-button:hover,
html.carol-dark-background .code-copy-button:focus-visible {
  background: rgba(15, 23, 42, 0.92);
}
