﻿.indented {
    text-indent: 4em;
}

.terms-conditions-content .h4 {
    font-size: 1.25rem !important;
    line-height: 1.5;
}

.terms-conditions-content .h6 {
    font-size: 1rem !important;
    line-height: 1.5;
}

.terms-conditions-content ul li {
    padding-left: 1rem;
}

ul.list-style-decimal li {
    list-style-type: decimal;
}

ol.list-style-none {
    padding: 0;
}

    ol.list-style-none li {
        list-style-type: none;
        padding: 0 !important;
    }

        ol.list-style-none li span.number {
            display: inline-block;
            min-width: 40px;
        }

@media print {
    @page {
        margin: 0;
    }

    body {
        margin: 0;
        padding: 0;
    }

    .print-page-border,
    .no-print {
        display: none !important;
    }

    .img-logo-agreement {
        display: block;
        position: absolute;
        top: 40px !important;
        right: 50px !important;
        width: auto;
        height: 70px;
    }

    .print-font-weight-regular {
        font-weight: normal !important;
    }

    #terms-and-conditions .img-watermark {
        display: block !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        height: 100% !important;
        text-align: center !important;
        z-index: 9999 !important;
        page-break-inside: avoid !important;
    }

        #terms-and-conditions .img-watermark img {
            opacity: .2 !important;
            max-width: 80% !important;
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            transform: none !important;
            transform: translate(-50%, -50%) !important;
            rotate: 0deg !important;
        }

    /* ---------- Layout หลัก ---------- */
    #terms-and-conditions {
        font-family: Tahoma, sans-serif !important;
        color: #000;
        padding: 2cm 2.5cm;
        page-break-inside: auto;
    }
        #terms-and-conditions.th {
            font-family: THSarabunNew, sans-serif !important;
        }

    .font-weight-bold {
        font-weight: bold;
    }

    /* ---------- โครงสร้างเนื้อหา ---------- */
    .terms-conditions-content {
        margin: 0;
    }

    #terms-and-conditions .h2 {
        display: none !important;
    }

        .terms-conditions-content .h4 {
            font-weight: bold;
            text-align: center;
            margin-top: 1em;
            margin-bottom: 0.5em;
            page-break-after: avoid;
            color: #000;
        }
        .terms-conditions-content.th .h4 {
            font-size: 12pt !important;
        }
        .terms-conditions-content:not(.th) .h4 {
            font-size: 14pt !important;
        }

    .terms-conditions-content.th .h6 {
        line-height: 1.5 !important;
    }
    .terms-conditions-content .h6 {
        margin-top: 0.5em;
        margin-bottom: 0.5em;
        line-height: 1.75 !important;
    }
            .terms-conditions-content .h6.text-center {
                text-align: center;
            }
            .terms-conditions-content.th .h6 {
                font-size: 12pt !important;
            }
    .terms-conditions-content:not(.th) .h6.text-center {
        font-size: 12pt !important;
    }
    .terms-conditions-content:not(.th) .h6 {
        font-size: 11pt !important;
    }

        .terms-conditions-content .indented {
            text-indent: 3em;
        }

         /*---------- รายการลำดับ / bullet ----------*/ 
        .terms-conditions-content ul,
        .terms-conditions-content ol {
            padding-left: 2em;
            margin-top: 0.5em;
            margin-bottom: 0.5em;
        }

            .terms-conditions-content ul li,
            .terms-conditions-content ol li {
                font-size: 11pt;
                line-height: 1.6;
            }
    .terms-conditions-content.th ul li,
    .terms-conditions-content.th ol li {
        font-size: 12pt;
        line-height: 1.6;
    }

    ul.list-style-decimal li {
        list-style-type: decimal;
    }

    ol.list-style-none {
        list-style: none;
        padding-left: 0;
    }

        ol.list-style-none li span.number {
            display: inline-block;
            min-width: 40px;
        }

     /*---------- การควบคุมการแบ่งหน้า ----------*/ 
    #terms-and-conditions h2,
    #terms-and-conditions h3,
    #terms-and-conditions h4,
    #terms-and-conditions .h4,
    #terms-and-conditions .h6.font-weight-bold {
        page-break-after: avoid;
        page-break-before: auto;
    }

    #terms-and-conditions ul,
    #terms-and-conditions ol {
        page-break-inside: auto;
    }

    .page-break {
        page-break-before: always;
        margin-top: 50px;
    }

     /*---------- ซ่อน element ที่ไม่ต้องปริ้น ----------*/ 
    .no-print {
        display: none !important;
    }

     /*---------- โลโก้ / watermark / เส้นแบ่ง ----------*/ 
    #terms-and-conditions .img-watermark {
        display: block !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 9999 !important;
        text-align: center !important;
        page-break-inside: avoid !important;
    }

        #terms-and-conditions .img-watermark img {
            opacity: 0.2 !important;
            max-width: 80% !important;
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            transform: translate(-50%, -50%) !important;
        }

    #terms-and-conditions .print-page-border {
        display: block;
        border: 1px solid #c7cbdc;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    #terms-and-conditions .title-line {
        display: none;
    }

    .print-txt-i-agree {
        margin-top: 50px !important;
    }

}