﻿.typography-container {
    display: flex;
    max-width: 75ch;
    width: 100%;
    font-size: 1.25rem;
    margin: 0 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tiptap-editor.typography-container {
    max-width: calc(75ch + 24px);
}

.rendered-typography {
    max-width: 75ch;
    width: 100%;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
    line-height: 1.75;
}

.rendered-typography > p:first-child, .rendered-typography > h1:first-child, .rendered-typography > h2:first-child {
    margin-top: 0 !important;
}

.rendered-typography > p:first-child::before {
    content: '';
    display: block;
    margin-top: -4px;
}

.rendered-typography > h2:first-child::before {
    content: '';
    display: block;
    margin-top: -3px;
}

.rendered-typography > h1:first-child::before {
    content: '';
    display: block;
    margin-top: -5px;
}

.rendered-typography > :last-child {
    margin-bottom: 10px !important;
}

.typography-container > * {
    max-width: 75ch;
    width: 100%;
    line-height: 1.75;
    font-size: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.typography-container h1,
.typography-container h2,
.typography-container h3,
.typography-container h4 {
    text-align: left;
}

.typography-container a {
    color: #3C81FF !important;
    text-decoration: underline;
    &:hover {
        cursor: pointer;
        font-weight: 500;
    }
}

.typography-container p {
    margin: 0.5em 0;
    margin-top: 1em !important;
}

.typography-container a span {
    color: #3C81FF !important;
}

.typography-container h1 {
    font-size: 2em;
    line-height: 1.2;
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
    font-weight: 600 !important;
}

.typography-container h2 {
    font-size: 1.5em;
    line-height: 1.3;
    font-weight: 600 !important;
    margin-top: 1.25em !important;
    margin-bottom: -0.5em !important;
}

.typography-container h3 {
    font-size: 1.25em;
    font-weight: bold;
    margin: 0.5em 0;
}

.typography-container ul, .typography-container ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
    & li, & li p {
        margin: 0.1em 0 !important;
    }
    & ul, & ol {
        margin: 0;
    }
}

.typography-container mark {
    background-color: yellow;
}

.rendered-typography hr {
    display: block;
    width: 100%;
    height: 2px;
    border: 0;
    padding: 0;
    margin: 1em 0;
    background-color: var(--mud-palette-lines-default);
}

.typography-container td {
    vertical-align: top !important;
}