/* Shared document look of the preview panel and the PDF export (BuildPdfHtml inlines this file).
   Keep it to plain CSS that both the browser and iText pdfHTML understand. */

.doc_preview_container {
    font-family: Calibri, Carlito, Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.15;
    color: #000;
}

.doc_preview_container h3,
.doc_preview_container h4 {
    font-family: Calibri, Carlito, Arial, sans-serif;
    font-size: 11pt;
    font-weight: bold;
    line-height: 1.15;
    color: #000;
    text-align: center;
    margin: 6pt 0;
    padding: 0;
}

.doc_preview_container p {
    margin: 0 0 6pt 0;
}

.doc_preview_container .form-group {
    margin: 0 0 6pt 0;
}

/* Ticket 259371: inside an article, the client's paragraph settings - 0pt before/after, no indentation
   (cases/subcases included); blank lines come from the template's explicit <br />s. Scoped by class to
   the template's OWN elements: user content rendered with [innerHtml] (their <p>s, lists, tables) and
   the rest of the document (header, signatures, part titles) keep the 6pt spacing above. */
.doc_preview_container .doc-article-heading,
.doc_preview_container .doc-article-title {
    margin: 0;
}

.doc_preview_container ul.doc-cases,
.doc_preview_container ul.doc-cases > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Paragraph/case numbers + their space as one unit: justification stretches the gaps between units,
   not inside one, so the gap after «3.» / «α)» stays a single space wide (ticket 259371).
   white-space: pre keeps that trailing space, which an inline-block would otherwise drop. It is a plain
   space, not &nbsp;: the Word export turned «1.&nbsp;» into a no-break space plus a space. */
.doc_preview_container .doc-number {
    display: inline-block;
    white-space: pre;
}

/* Parts/chapters are accordion panels in the editor; on paper they are plain headings */
.doc_preview_container .panel-group,
.doc_preview_container .panel,
.doc_preview_container .panel-heading,
.doc_preview_container .panel-body {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.doc_preview_container .part_title {
    display: block;
    text-align: center;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    margin: 6pt 0;
}

.doc_preview_container .col-md-12 {
    padding-left: 0;
    padding-right: 0;
}

/* The app gives every .input-group 1em bottom padding (one per empty chapter on screen) */
.doc_preview_container .input-group {
    padding-bottom: 0;
}

.doc_preview_container .article_box {
    margin: 0;
    border: 0;
}

.doc_preview_container label {
    font-weight: normal;
}

/* Tables: the Word upload writes them as class="table table-bordered" with plain cells, and the
   preview gets their frame and cell spacing from style.css/Bootstrap, which the PDF export doesn't
   load. Here they reach both (a table's own inline borders, e.g. the law's contents, still apply). */
.doc_preview_container table {
    border-collapse: collapse;
}

.doc_preview_container td,
.doc_preview_container th {
    border: 1px solid #000;
    padding: 2pt 4pt;
    vertical-align: top;
}
