/* news_prose.css — isolation layer for user-generated content on news pages.
 *
 * Tailwind preflight resets browser defaults for tables, lists, and headings.
 * On the public news page (base_nonav.html, no Keenthemes admin chrome) those
 * resets are not compensated for, so webmaster-applied formatting disappears.
 *
 * This class restores expected rendering for HTML authored via TinyMCE:
 * - tables with border="" attribute show visible borders
 * - inline font-family styles are respected (not overridden by the cascade)
 * - ul/ol show their standard bullet/number markers
 * - headings carry sensible margins and weights
 *
 * Scope: .news-prose wrapper is applied on extern_detail.html (public page)
 * and detail.html (admin app page).
 */

.news-prose table {
    border-collapse: collapse;
    border-color: inherit;
}

.news-prose table[border] {
    border: 1px solid currentColor;
}

.news-prose table[border] th,
.news-prose table[border] td {
    border: 1px solid currentColor;
    padding: 0.25rem 0.5rem;
}

.news-prose ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.news-prose ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.news-prose h1,
.news-prose h2,
.news-prose h3,
.news-prose h4,
.news-prose h5,
.news-prose h6 {
    font-family: inherit;
    margin: 0.75rem 0 0.5rem;
}

.news-prose h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.news-prose h2 {
    font-size: 1.25rem;
    font-weight: bold;
}

.news-prose h3 {
    font-size: 1.125rem;
    font-weight: bold;
}

.news-prose p {
    margin: 0.5rem 0;
}

/* Respect user-defined font-family on inline styles.
 * The revert keyword restores the element's font-family to the browser
 * user-agent default, preventing the platform cascade from clobbering
 * inline style="font-family: ..." declarations set by the webmaster. */
.news-prose [style*="font-family"] {
    font-family: revert;
}

/* TinyMCE sometimes emits <font face="..."> for legacy font selection. */
.news-prose font[face] {
    font-family: revert;
}

/* Undo Tailwind preflight's img{display:block} so text-align:center on
 * the parent paragraph still centres the image. The inline style path
 * (display:block; margin-left:auto; margin-right:auto) wins over this
 * class rule, so TinyMCE's alternative centering path is unaffected.
 * Do NOT override max-width:100%; height:auto (responsive stays intact). */
.news-prose img {
    display: inline-block;
    vertical-align: baseline;
}

/* Undo Tailwind preflight's a{color:inherit; text-decoration:inherit}.
 * Use the platform link token — per-org colour override is respected. */
.news-prose a {
    color: var(--ordolio-default-primary);
    text-decoration: underline;
}
