DOCX Preview Styles
.docx-preview {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.docx-preview h1, .docx-preview h2, .docx-preview h3, 
.docx-preview h4, .docx-preview h5, .docx-preview h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #2c3e50;
}

.docx-preview h1 { font-size: 2em; }
.docx-preview h2 { font-size: 1.75em; }
.docx-preview h3 { font-size: 1.5em; }
.docx-preview h4 { font-size: 1.25em; }
.docx-preview h5 { font-size: 1.1em; }
.docx-preview h6 { font-size: 1em; }

.docx-preview p {
    margin-bottom: 1em;
    text-align: justify;
}

.docx-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    border: 1px solid #ddd;
    max-width: 100%;        /* prevent table from exceeding container */
    table-layout: auto;     /* allow cells to adjust width */
    word-break: break-word; /* wrap long text inside cells */
}

.docx-preview th, .docx-preview td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.docx-preview th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.docx-preview tr:nth-child(even) {
    background-color: #f8f9fa;
}

.docx-preview tr:hover {
    background-color: #e9ecef;
}

.docx-preview ul, .docx-preview ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.docx-preview li {
    margin-bottom: 0.5em;
}

.docx-preview blockquote {
    border-left: 4px solid #007bff;
    margin: 1em 0;
    padding-left: 1em;
    font-style: italic;
    color: #6c757d;
}

.docx-preview img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.docx-preview .page-break {
    page-break-before: always;
    margin-top: 2em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .docx-preview table {
        font-size: 0.9em;
    }
    
    .docx-preview th, .docx-preview td {
        padding: 6px 8px;
    }
}
