article a, #previewModal a {
    color: rgb(59, 130, 246);
}

article a:hover, #previewModal a:hover {
    cursor: pointer;
    color: rgb(37, 99, 235);
}


article li, #previewModal li {
    margin-bottom: 0.75rem !important;
}
article ul, #previewModal ul {
    display: block !important;
    list-style-type: disc !important;
    margin-block-start: 1em !important;
    margin-block-end: 1em !important;
    padding-inline-start: 40px !important;
}

article ol, #previewModal ol {
    display: block !important;
    list-style-type: decimal !important;
    margin-block-start: 1em !important;
    margin-block-end: 1em !important;
    padding-inline-start: 40px !important;
}

article > img,
article p img,
article .carousel img,
#previewModal img {
    max-width: 100%;
    object-fit: contain !important;
}

article {
    padding: 0.5rem;
}

article .carousel {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.bgp-article .rich-text .carousel {
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    overflow: hidden;
}

.bgp-article .rich-text .carousel:not(.slick-initialized) {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.bgp-article .rich-text .carousel:not(.slick-initialized) > div {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.bgp-article .rich-text .carousel img {
    display: block;
    width: 100%;
    max-height: 70vh;
    margin: 0;
    object-fit: contain;
}

.bgp-article .rich-text a.file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Keep gallery images in one row while the carousel script initializes. */
article .carousel:not(.slick-initialized) {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

article .carousel:not(.slick-initialized) > div {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
}

article .carousel img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

article a.file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

article a.file-attachment .bi {
    flex: none;
    font-size: 1.25rem;
}

/* Sehr lange Wörter / URLs umbrechen, statt aus dem Container zu laufen. */
article,
article p,
article li,
article h1,
article h2,
article h3,
article h4,
article blockquote,
#previewModal,
#previewModal p,
#previewModal li {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Code-Blöcke nicht umbrechen, sondern horizontal scrollen lassen. */
article pre,
#previewModal pre {
    overflow-x: auto;
    max-width: 100%;
}
