.codeBlockContainer {
  position: relative;
  overflow: hidden;
  background-color: var(--code-block-bg);
  border: 1px solid var(--vscode-editorGroup-border, transparent);
  padding: 10px;
  border-radius: 5px;
}
.codeBlockContainer .codeBlockButtonWrapper {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s; /* Keep opacity transition for buttons */
}
.codeBlockContainer[data-partially-visible="true"]:hover
  .codeBlockButtonWrapper {
  opacity: 1;
  pointer-events: all;
  cursor: pointer;
}

.preWrapper {
  background-color: var(--code-block-bg);

  /* max-height: 400px; */
  overflow-y: auto;
  padding: 10px;
  border-radius: 5px;
}

.preWrapper code {
  background-color: transparent !important;
}

.preWrapper .hljs {
  color: var(--vscode-editor-foreground, #fff);
  background-color: var(--code-block-bg);
}
.preWrapper pre {
  background-color: var(--code-block-bg);
  border-radius: 5px;
  margin: 0;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}
.preWrapper pre,
.preWrapper code {
  /* Undefined wordwrap defaults to true (pre-wrap) behavior. */
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  font-size: var(--vscode-editor-font-size, var(--vscode-font-size, 10px));
  font-family: var(--vscode-editor-font-family);
  outline: none;
}

.button {
  background: transparent;
  border: none;
  color: var(--vscode-foreground);
  cursor: var(--copy-button-cursor, default);
  padding: 4px;
  margin: 0 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  border-radius: 3px;
  pointer-events: var(--copy-button-events, none);
  margin-left: 4px;
  height: 24px;
  width: 24px;
  outline: none;
}
.button:hover {
  background: var(--vscode-toolbar-hoverBackground);
  opacity: 1;
}
.button span {
  display: block;
}

.codeBlockButtonWrapper {
  position: absolute;
  top: 4px;
  right: 4px;
  height: auto;
  z-index: 40;
  background: var(--code-block-bg);
  overflow: visible;
  pointer-events: none;
  opacity: var(--copy-button-opacity, 0);
  padding: 4px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.codeBlockButtonWrapper:hover {
  opacity: 1 !important;
}

.codeBlockButtonWrapper .button {
  position: relative;
  top: 0;
  right: 0;
}
