/*
 * Styles for blog content generated by CKEditor 5.
 * Used wherever blog content is rendered outside the editor (frontend article page, admin show page).
 */

/* Images */
.blog-rich-content img { max-width: 100%; height: auto; border-radius: 8px; }
.blog-rich-content figure.image { display: table; clear: both; margin: 1.5rem auto; text-align: center; }
.blog-rich-content figure.image img { display: block; margin: 0 auto; }
.blog-rich-content figure.image.image-style-side { float: right; max-width: 50%; margin: 0 0 1rem 1.5rem; }
.blog-rich-content figure.image_resized { max-width: 100%; }
.blog-rich-content figure.image_resized img { width: 100%; }
.blog-rich-content figure figcaption {
    display: table-caption;
    caption-side: bottom;
    font-size: .9rem;
    color: #6c757d;
    padding: .5rem 0;
}

/* Tables */
.blog-rich-content figure.table {
    display: block;
    width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.blog-rich-content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: .95rem;
    line-height: 1.5;
}
.blog-rich-content table th,
.blog-rich-content table td {
    border: 1px solid #dee2e6;
    padding: .65rem .85rem;
    vertical-align: top;
    text-align: left;
    min-width: 2em;
}
.blog-rich-content table th,
.blog-rich-content table thead td {
    background: #f1f5f2;
    font-weight: 600;
}
.blog-rich-content table tbody tr:nth-child(even) { background: #fafbfa; }
.blog-rich-content table p { margin: 0; }

/* Block quotes */
.blog-rich-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #2d6a4f;
    background: #f8f9fa;
    font-style: italic;
}
.blog-rich-content blockquote p:last-child { margin-bottom: 0; }

/* Embedded media */
.blog-rich-content figure.media { margin: 1.5rem 0; clear: both; }

/* Clear floated side images at the end of the content */
.blog-rich-content::after { content: ""; display: table; clear: both; }
