/* ============================================
   Doc Miners — Document Rendering Styles
   F22: Contains ONLY OCR document output styles
   Never references UI elements (#mybutler-app-shell)
   Never changes based on UI language
   ============================================ */


/* ============================================
   DOCUMENT PREVIEW
   ============================================ */

.mybutler-doc-preview {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 32px 40px;
    min-height: 400px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}


/* ============================================
   DOCUMENT RENDER STYLES (inside preview)
   ============================================ */

/* RTL/LTR awareness — per-page direction */
.mybutler-page[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

.mybutler-page[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* Page sections */
.mybutler-page {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #ddd;
}

/* Page separator (between pages, replaces old "Page X" header) */
.mybutler-page-break {
    border: none;
    border-top: 1px dashed #cbd5e1;
    margin: 24px 0;
}

/* Paragraphs */
.mybutler-p {
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Headings (document title, major headings) */
.mybutler-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 16px 0 8px 0;
    line-height: 1.4;
}

/* Page numbers */
.mybutler-page-num {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin: 8px 0;
}

/* Sections (from Layout Detector) */
.mybutler-section {
    margin: 16px 0 10px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.mybutler-sec-num {
    unicode-bidi: isolate;
    direction: ltr;
    font-weight: 700;
    margin-inline-end: 8px;
}

.mybutler-page[dir="rtl"] .mybutler-sec-num {
    margin-inline-end: 0;
    margin-inline-start: 8px;
}

.mybutler-sec-title {
    unicode-bidi: plaintext;
}

/* Tables */
.mybutler-table-wrap {
    margin: 10px 0;
    overflow-x: auto;
    max-width: 100%;
}

.mybutler-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    margin: 0;
    direction: inherit;
    border: 2px solid #94a3b8;
}

.mybutler-doc table {
    direction: inherit;
}

.mybutler-table td,
.mybutler-table th {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    vertical-align: top;
    text-align: start;
    unicode-bidi: plaintext;
    line-height: 1.5;
}

.mybutler-table thead th {
    font-weight: 700;
    background-color: #f1f5f9;
    border-bottom: 2px solid #94a3b8;
    color: #1e293b;
}

.mybutler-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.mybutler-table tbody tr:hover td {
    background: #e2e8f0;
}

/* Preformatted (table fallback) */
.mybutler-pre {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
    background: #f8f8f8;
    padding: 8px;
    border: 1px solid #ddd;
}

/* Lists */
.mybutler-list {
    margin: 6px 0 10px 0;
    padding-inline-start: 24px;
    line-height: 1.6;
}

.mybutler-list li {
    margin-bottom: 6px;
    padding-inline-start: 4px;
}

/* Ordered lists: use decimal by default, works for both LTR and RTL */
ol.mybutler-list {
    list-style-type: decimal;
}

/* Unordered lists: disc bullet */
ul.mybutler-list {
    list-style-type: disc;
}

/* Signature blocks */
.mybutler-signature {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #ccc;
}

.mybutler-signature-line {
    margin-bottom: 4px;
    color: #444;
}


/* ============================================
   HEADER / FOOTER / PAGE NUMBER BLOCKS
   ============================================ */

.mybutler-header,
.mybutler-footer {
    font-size: 12px;
    color: #94a3b8;
    padding: 6px 10px;
    border-left: 3px solid #e2e8f0;
    margin: 4px 0;
    background: #f8fafc;
}
