.container {
  position: relative;
}

.code {
  border: none;
  display: block;
  background-color: var(--cmm-color-code-block);
  padding: 1rem;
  border-radius: var(--cmm-radius-xl);
  font-weight: var(--cmm-font-weight-normal);
  font-size: 0.85em;
  max-height: 28em;
  overflow: auto;
}

$margin: 0.75rem;
$size: 2rem;
$iconSize: 1.2rem;

.copy-button {
  width: $size;
  height: $size;
  border: 1px solid var(--cmm-color-border-base);
  border-radius: var(--cmm-radius-md);
  background-color: var(--cmm-color-surface-1);
  display: grid;
  place-content: center;
  transition: var(--cmm-transition-bg);

  &:hover {
    background: var(--cmm-color-surface-2);
  }

  > svg {
    width: $iconSize;
    height: $iconSize;
  }
}

.tooltip-wrap {
  position: absolute;
  top: $margin;
  right: $margin;
  opacity: 0;

  &.shown {
    opacity: 1;
  }
}
