.code-container {
  position: relative;
  z-index: 1;
  &:has(.is-white) {
    .buttons:not(.head .buttons) {
      &:after {
        background-color: #fff;
      }
    }
  }
  &:has(.head) {
    &::after {
      display: none;
    }
    pre {
      border-radius: 0px;
    }
  }

  pre {
    border-radius: 4px;
    border: 1px solid $color-border;
    font-size: 12px;
    white-space: normal;
  }

  .buttons {
    position: relative;

    &:not(.head .buttons) {
      position: absolute;
      content: "";
      right: 8px;
      top: 8px;
      z-index: 3;
      &:after {
        position: absolute;
        content: "";
        right: -7px;
        top: -7px;
        width: 100%;
        height: 40px;
        border-radius: 4px;
        background-color: #f5f5f5;
        z-index: -1;
      }
    }
  }
}
