@import "../../../styles/_import.scss";

.text {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p {
    width: 100%;

    &:not(:first-child) {
      margin-top: spacer(4);
    }

    a {
      display: inline-block;
      width: fit-content;
      margin-top: 0;
    }
  }

  h1 {
    width: fit-content;
    margin-bottom: spacer(5);
  }

  a {
    all: inherit;
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    text-decoration-thickness: 0.15rem;
    text-decoration-skip-ink: none;
    cursor: pointer;
  }

  ul,
  ol {
    list-style-position: outside;
    color: color(gray-500);
    margin: 0 spacer(7);
  }

  ul {
    list-style-type: disc;
  }

  ol {
    list-style-type: decimal;
  }

  ul ul,
  ol ul,
  ol ol,
  ul ol {
    list-style-position: outside;
    margin-left: 2ch;
  }

  ul ul,
  ol ul {
    list-style-type: square;
  }

  ol ol,
  ul ol {
    list-style-type: lower-latin;
  }

  li {
    margin-top: spacer(4);
  }

  span {
    @include inherit-type;
    display: inline;
  }

  blockquote {
    background: color(white-dim);
    border-left: 5px solid color(white-dim);
    margin: spacer(5);
    padding: spacer(4);

    footer {
      &::before {
        content: "—";
        margin-right: 1ch;
      }
    }
  }

  hr {
    margin: spacer(7) 0;
    height: 1px;
    border: none;
    background: linear-gradient(
      to right,
      transparent 0%,
      color(text-secondary) 10%,
      color(text-secondary) 90%,
      transparent 100%
    );
  }

  .nowrap {
    white-space: nowrap;
  }
}
