:root {
  --code-block-bg: var(--card-bg);
  --code-block-border: var(--card-border);
  --code-block-shadow: var(--card-shadow);
}

code.ui-code {
  box-sizing: border-box;
  font-family: "Fira Code", mono;
  border-radius: 4px;

  .token.operator {
    background: transparent;
  }
}

pre.ui-code-block {
  box-sizing: border-box;
  position: relative;

  background: var(--code-block-bg, transparent);
  border: 1px solid var(--code-block-border, transparent);
  border-radius: 4px;
  box-shadow: inset 0 1px 5px var(--code-block-shadow);

  &, & > code {
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  &.dense {
    padding: 4px 6px;
    font-size: 14px;
  }

  & > .code-controls {
    opacity: 0.1;
    transition: opacity 0.1s ease-out 0.1s;
    position: absolute;
    top: 6px; right: 6px;
  }

  &:hover, &.focus {
    & > .code-controls {
      opacity: 0.4;
    }
  }
}
