/* แบบฟอร์มออนไลน์ (eform_r09_page.php) — หน้าจอ + แผ่นพิมพ์ (@media print) */

.ef-hero { background: linear-gradient(135deg, #003366 0%, #001a33 50%, #0a1628 100%); padding: 12px 0; margin-bottom: 8px; }
.ef-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; box-shadow: 0 6px 24px rgba(15, 23, 42, .06); }
.ef-summary { position: sticky; top: 90px; }
.ef-h { font-size: 1.1rem; font-weight: 700; color: #003366; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ef-h span { width: 28px; height: 28px; border-radius: 50%; background: #003366; color: #ffd700; display: inline-grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
.req { color: #dc2626; font-weight: 700; }
.ef-use { background: #eef4fb; border-left: 4px solid #ffd700; border-radius: 10px; padding: 10px 14px; color: #003366; font-size: .92rem; }
.ef-steps { background: #eef4fb; border-left: 4px solid #003366; border-radius: 10px; padding: 12px 14px; font-size: .88rem; color: #1e293b; }
.ef-steps ol { padding-left: 18px; }
.ef-steps li { margin-bottom: 4px; }
.ef-lookup { background: linear-gradient(135deg, #fffbeb, #fff7ed); border: 1px solid #fde68a; border-radius: 14px; padding: 14px 16px; }
.ef-lookup .ok { color: #047857; } .ef-lookup .bad { color: #b91c1c; }
.ef-pick { display: block; width: 100%; text-align: left; border: 1px solid #cbd5e1; background: #fff; border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
.ef-pick:hover, .ef-pick:focus-visible { border-color: #003366; background: #eef4fb; }
.ef-filled { animation: ef-flash 1.2s ease; }
@keyframes ef-flash { 0% { background: #fef3c7; } 100% { background: #fff; } }
@media (prefers-reduced-motion: reduce) { .ef-filled { animation: none; } }
.ef-page legend.form-label { font-size: 1rem; }
.ef-chip { cursor: pointer; margin: 0; }
.ef-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ef-chip span { display: inline-block; padding: 7px 16px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #334155; }
.ef-chip input:checked + span { background: #003366; border-color: #003366; color: #fff; }
.ef-chip input:focus-visible + span { outline: 3px solid #ffd700; outline-offset: 2px; }
.ef-other { width: 230px; }
.ef-inst-row { padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.ef-inst-row.is-off { display: none; }
.ef-note { background: #fff7ed; border-radius: 10px; padding: 10px 12px; font-size: .86rem; color: #7c2d12; }
.ef-badge { font-size: .85rem; font-weight: 600; color: #003366; background: #eef4fb; border-radius: 8px; padding: 6px 10px; }
.ef-total { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px; padding: 12px; border-radius: 12px; background: #fff7ed; color: #92400e; }
.ef-total b { font-size: 1.8rem; color: #003366; margin-left: auto; }
.ef-sum-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: #334155; border-bottom: 1px dotted #e2e8f0; }
.ef-sum-check.ok { color: #047857; } .ef-sum-check.bad { color: #b91c1c; }
@media (max-width: 767.98px) { .ef-other { width: 100%; } }

/* ---------- แผ่น A4 สำหรับพิมพ์ ---------- */
.ef-sheet { display: none; }
@media print {
    @page { size: A4; margin: 9mm 14mm 8mm; }
    /* แผ่นถูกย้ายเป็นลูกตรงของ body ก่อนพิมพ์ → ซ่อนส่วนอื่นทั้งหมด (ไม่กินพื้นที่หน้ากระดาษ) */
    body > *:not(#ef-sheet) { display: none !important; }
    #ef-sheet { display: block !important; position: static !important; width: 100%; }
    html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
}
.ef-sheet { font-family: 'Sarabun', 'TH Sarabun New', Tahoma, sans-serif; font-size: 11pt; line-height: 1.45; color: #000; }
.ef-sheet .hd { position: relative; height: 19mm; }
.ef-sheet .hd img { height: 19mm; position: absolute; left: 0; top: 0; }
.ef-sheet .hd .code { position: absolute; right: 0; top: 0; font-size: 12pt; font-weight: 700; }
.ef-sheet .ttl { text-align: center; font-size: 13.5pt; font-weight: 700; margin-top: -8mm; }
.ef-sheet .sub { text-align: center; font-size: 10pt; }
.ef-sheet p { margin: 0 0 .8mm; }
.ef-sheet .r { text-align: right; margin-top: 2mm; }
.ef-sheet .gap { margin-top: 2mm; }
.ef-sheet .ind { text-indent: 14mm; }
.ef-sheet .u { border-bottom: 1px dotted #000; padding: 0 2mm; font-weight: 600; }
.ef-sheet .ub { display: inline-block; min-width: 26mm; text-align: center; text-indent: 0; }
.ef-sheet .ub.s { min-width: 10mm; }
.ef-sheet .ub.l { min-width: 50mm; }
.ef-sheet .cb { display: inline-block; width: 3.4mm; height: 3.4mm; border: 1px solid #000; margin: 0 1.2mm 0 0; position: relative; top: .5mm; text-align: center; line-height: 3.1mm; font-size: 9.5pt; font-weight: 700; text-indent: 0; }
.ef-sheet .lv .cb { margin-left: 3mm; }
.ef-sheet .inst { margin: .5mm 0 1mm 24mm; border-collapse: collapse; }
.ef-sheet .inst td { padding: 0 2mm 0 0; }
.ef-sheet .nt { font-size: 10pt; }
.ef-sheet .sign { display: flex; justify-content: space-around; margin: 3mm 0 1mm; text-align: center; }
.ef-sheet table.ap { width: 100%; border-collapse: collapse; font-size: 10.5pt; line-height: 1.35; }
.ef-sheet table.ap td { border: 1px solid #000; padding: 1mm 2mm 1.5mm; vertical-align: top; width: 50%; }
.ef-sheet table.ap .sg { text-align: center; margin-top: 1.5mm; }
.ef-sheet .ft { text-align: right; font-size: 8pt; margin-top: 1mm; color: #555; }
