@use 'sass:math';

@import '../variables';

$margin: 1em;

.wrapper {
  blockquote {
    border-left: 4px solid $color_primary;
    padding: $margin * 0.5 0;
    margin-bottom: $margin;
    color: $color_primary;
    font-size: 0.9em;
    background-color: $content_bg_success;

    p {
      margin: 0 $margin;
    }

    & + blockquote {
      margin-top: -$margin;
    }
  }

  pre {
    background-color: $content_bg_info;
    font-family: monospace;
    font-size: 0.8em;
    border-radius: 2px;
    width: 100%;
    overflow: auto;
    padding: $gap;
    box-sizing: border-box;
    margin-bottom: $margin;

    code {
      color: $gray_50;
      font-family: monospace;
      white-space: pre-wrap;
    }
  }

  p,
  li {
    code {
      background-color: $content_bg_info;
      padding: 2px 4px;
      border-radius: 0.3em;
      color: $gray_25;
      font-size: 0.8em;
    }
  }

  img {
    max-width: 100%;
    margin-bottom: $margin;
  }

  h5,
  h4,
  h3,
  h2,
  h1 {
    line-height: 1.2em;
    margin: $margin * 1.5 0 $margin * 0.5;

    &:first-child {
      margin-top: $margin * 0.25;
    }
  }

  ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: $margin;

    li {
      margin: math.div($margin, 3) 0;
    }
  }

  strong {
    font-weight: bold;
    color: white;
  }

  em {
    font-style: italic;
  }

  :global(.grey) {
    color: #666666;
    white-space: pre-line;
  }
}
