/* The final paragraph shares a line with the timestamp and takes its alignment from this container. */
div:has(> .chat-markdown) {
    max-inline-size: 100%;
    text-align: start;
}

.chat-markdown {
    display: contents;
    overflow-wrap: anywhere;
}

.chat-markdown :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6) {
    margin: 0;
    text-align: start;
}

.chat-markdown > :not(:last-child) {
    margin-bottom: 0.65em;
}

.chat-markdown > p:last-child {
    display: inline;
}

.chat-markdown p {
    white-space: pre-wrap;
}

.chat-markdown :is(h1, h2, h3, h4, h5, h6) {
    font-size: 1.1em;
    font-weight: bold;
}

.chat-markdown :is(ul, ol) {
    padding-inline-start: 1.5em;
}

.chat-markdown ul {
    list-style: disc outside;
}

.chat-markdown ol {
    list-style: decimal outside;
}

.chat-markdown blockquote {
    padding-inline-start: 0.75em;
    border-inline-start: 2px solid currentColor;
    font: inherit;
    color: inherit;
}
