/* DOCX Block — frontend base styles.
 * Typography (font, size, color, spacing) is handled by the .docx-p-* and
 * .docx-r-* classes embedded in each block's <style> tag.
 * Override those classes in the block's Custom CSS field.
 */

.docx-block {
    line-height: 1.6;
}

/* Tables */
.docx-block table,
.docx-table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}
.docx-block td,
.docx-block th,
.docx-table td,
.docx-table th {
    border: 1px solid #ccc;
    padding: 6px 10px;
    vertical-align: top;
    text-align: left;
}
.docx-block th,
.docx-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}
.docx-block tr:nth-child(even) td,
.docx-table tr:nth-child(even) td {
    background-color: #fafafa;
}

/* Images */
.docx-block img,
.docx-image {
    max-width: 100%;
    height: auto;
    margin: 0.5em 0;
}

/* Empty paragraphs */
.docx-empty {
    margin: 0;
    line-height: 1;
}

/* contextualSpacing: collapse margin between consecutive paragraphs of the same style */
.docx-contextual-spacing + .docx-contextual-spacing {
    margin-top: 0 !important;
}

/* Admin-only error indicator */
.docx-block-error {
    color: #c00;
    font-style: italic;
    border-left: 3px solid #c00;
    padding-left: 8px;
}
