﻿/* vt-form.css — ช่องแนบรูปหน้าลูกค้า (ใช้คู่กับ assets/vt-form.js) */
/* ช่องแนบรูป: ปุ่มถ่ายรูป (มือถือ) + เลือกรูป + รูปตัวอย่างพร้อมปุ่มลบ */
.photo-real { display: none; }
.photo-picker.fallback .photo-actions { display: none; }   /* เบราว์เซอร์เก่า: ใช้ช่องไฟล์ธรรมดาแทนปุ่ม */
.photo-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.photo-list:empty { display: none; }
.photo-item { position: relative; width: 104px; height: 104px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--ice); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item.busy::after { content: "กำลังย่อรูป..."; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.75); font-size: 12px; color: var(--muted); }
.photo-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(9,24,62,.75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.photo-btn { position: relative; gap: 0; cursor: pointer; }
.photo-btn i { margin-right: 8px; }   /* เว้นระยะไอคอนกับข้อความ (ใช้ margin แทน gap ให้ใช้ได้กับมือถือรุ่นเก่า) */
.photo-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-btn.disabled { opacity: .45; pointer-events: none; }
.photo-count { color: var(--muted); font-size: 13px; }
.photo-error { margin-top: 8px; color: #b42318; font-size: 14px; }
.photo-error:empty { display: none; }
/* ปุ่มถ่ายรูปแสดงเฉพาะอุปกรณ์จอสัมผัส (มือถือ / แท็บเล็ต) */
@media (hover: hover) and (pointer: fine) { .photo-camera { display: none; } }

/* ไฟล์ PDF (แสดงเป็นไอคอน + ชื่อไฟล์) */
.photo-item.pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; text-align: center; }
.photo-item.pdf i { color: #c0392b; font-size: 34px; line-height: 1; }
.photo-item.pdf span { width: 100%; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }

/* คลิปวิดีโอ (data-video="1") */
.photo-item.video { width: 150px; background: #0b1530; cursor: pointer; }
.photo-item.video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item.video.busy::after { content: "กำลังตรวจคลิป..."; }
.photo-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(255,255,255,.9); font-size: 38px; pointer-events: none; text-shadow: 0 2px 8px rgba(0,0,0,.4); }

/* หน้าจอ Loading ตอนกำลังบันทึก / ตรวจสอบ (vtShowLoading) */
.vt-loading { position: fixed; z-index: 2000; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(9,24,62,.55); color: #fff; font-size: 16px; opacity: 0; visibility: hidden; transition: .15s; }
.vt-loading.show { opacity: 1; visibility: visible; }
.vt-spinner { width: 48px; height: 48px; border: 4px solid rgba(255,255,255,.3); border-top-color: var(--orange, #ff6b1b); border-radius: 50%; animation: vt-spin .8s linear infinite; }
@keyframes vt-spin { to { transform: rotate(360deg); } }
