/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

.codeBlockContainer {
  margin-bottom: var(--ifm-leading);
  border-radius: var(--ifm-global-radius);
  box-shadow: var(--ifm-global-shadow-lw);
}

.codeBlockContent {
  position: relative;
  /* rtl:ignore */
  direction: ltr;
}

.codeBlockTitle {
  border-bottom: 1px solid var(--ifm-color-emphasis-300);
  font-size: var(--ifm-code-font-size);
  font-weight: 500;
  padding: 0.75rem var(--ifm-pre-padding);
  border-top-left-radius: var(--ifm-global-radius);
  border-top-right-radius: var(--ifm-global-radius);
}

.codeBlock {
  margin: 0;
  padding: 0;
  border-radius: var(--ifm-global-radius);
  --ifm-pre-background: var(--prism-background-color);
}

.codeBlockTitle + .codeBlockContent .codeBlock {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.codeBlockStandalone {
  padding: 0;
  border-radius: var(--ifm-global-radius);
}

.defaultCodeBlock div[class*="buttonGroup_"] :global(.clean-btn),
.copyButton {
  border-radius: var(--ifm-global-radius);
  color: #dfdfdf;
  user-select: none;
  right: calc(var(--ifm-pre-padding) / 2);
  top: calc(var(--ifm-pre-padding) / 2);
  transition: opacity 200ms ease-in-out;
  opacity: 1;
  width: 28px;
  height: 28px;
}
.defaultCodeBlock div[class*="buttonGroup_"] :global(.clean-btn) > span,
.copyButton > span {
  width: 20px;
  height: 20px;
  display: block;
}

.defaultCopyButton {
  position: absolute;
}

.copyButton:focus,
.codeBlockContent:hover > .copyButton,
.codeBlockTitle:hover + .codeBlockContent .copyButton {
  opacity: 1;
}

.codeBlockLines {
  font: inherit;
  /* rtl:ignore */
  float: left;
  min-width: 100%;
  padding: var(--ifm-pre-padding);
}

@media print {
  .codeBlockLines {
    white-space: pre-wrap;
  }
}

.defaultCodeBlock div[class*="buttonGroup_"],
.buttonGroup {
  display: flex;
  gap: 4px;
  align-items: center;
  position: absolute;
  right: calc(var(--ifm-pre-padding) / 2);
  top: calc(var(--ifm-pre-padding) / 2);
  padding: 6px 8px;
  background-color: #242834;
  border-radius: var(--ifm-global-radius);
  transition: opacity 200ms ease-in-out;
  opacity: 1;
  z-index: 1;
}
.defaultCodeBlock div[class*="buttonGroup_"] button,
.buttonGroup button {
  display: flex;
  align-items: center;
  background: inherit;
  /* width: inherit;
  height: inherit; */
  color: #dfdfdf;
  border: 0;
  line-height: 0;
  transition: opacity 200ms ease-in-out;
  padding: 4px;
  width: 28px;
  height: 28px;
}

.defaultCodeBlock div[class*="buttonGroup_"] button svg,
.buttonGroup button svg {
  width: 20px;
  height: 20px;
}

.buttonGroup button:focus-visible,
.buttonGroup button:hover {
  opacity: 1;
}

button {
  cursor: pointer;
}

pre {
  margin: 0;
}

/* .copyButton:hover, */
.defaultCodeBlock div[class*="buttonGroup_"] button:hover,
.buttonGroup button:hover {
  color: #eb318a !important;
}

:global(.theme-code-block:hover) .buttonGroup,
:global(.theme-code-block:hover) div[class*="buttonGroup_"] {
  opacity: 1 !important;
}

.immutableCodeBlock {
  position: relative;
}

/* .defaultCodeBlock {
} */
