/* โปรโมชันต่อประกาศ (th/inc/promo.lib.php ; prefix lbpm-) + ใกล้ฉัน (th/inc/nearme.lib.php ; prefix lbnm-) + ช่องตำแหน่งในฟอร์ม (.lbx-geo-nm)
   ป้ายบนการ์ด (.lbl-tc-onphoto .lbl-tc-promo .lbl-tc-dist) อยู่ใน tcard-v2.css (โหลดทุกหน้าที่มีการ์ด)
   ใช้ที่ : directory.php market.php services.php (ค้นหา / รายละเอียด) , promote.php + owner.php (ฟอร์ม / ประกาศของฉัน) */

/* ---------- ใกล้ฉัน : หัวข้อแรกของแถบตัวกรอง (ขนาดเท่า .lbf-pill) ; หน้าบริการอยู่หน้าชิปบริการหลัก ---------- */
.lbnm { --c: #4153b8; --t: #eceffd; position: relative; display: inline-flex; }
.lbnm.m-travel { --c: #167a93; --t: #e5f5f8; }
.lbnm.m-rent { --c: #6f45c2; --t: #f1ebfc; }
.lbnm.m-services { --c: #4f46e5; --t: #eef0ff; }	/* ธีมหลัก (accent-dark) ให้เข้ากับปุ่มค้นหาและไอคอนการ์ดของหน้าบริการ */
.lbd .lbnm-pill { gap: 8px; padding-left: 5px; border-color: color-mix(in srgb, var(--c) 35%, #fff); background: var(--t); color: var(--c); font: inherit; font-size: 14px; font-weight: 700; }
@media (hover: hover) { .lbd .lbnm-pill:hover { border-color: var(--c); background: #fff; } }	/* จอสัมผัส (iPhone) : :hover ค้างหลังแตะ -> ปุ่มดูเหมือนเปิดแล้วกลายเป็นสีเทาตอนเลื่อน */
.lbd .lbnm-pill:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); outline-offset: 2px; }
/* จุดตำแหน่งกระพริบ (วงแหวนขยาย) : ชวนให้กด ; ปิด animation เมื่อผู้ใช้ตั้งค่าลดการเคลื่อนไหว */
.lbnm-dot { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; font-size: 14px; }
.lbd .lbnm-dot .fa { color: #fff; }
.lbnm-dot::before, .lbnm-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); animation: lbnm-ring 1.8s ease-out infinite; pointer-events: none; }
.lbnm-dot::after { animation-delay: .9s; }
.lbnm-dot .fa { animation: lbnm-blink 1.8s ease-in-out infinite; }
@keyframes lbnm-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes lbnm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lbnm.is-busy .lbnm-dot .fa { animation: lbnm-spin 1s linear infinite; opacity: 1; }
@keyframes lbnm-spin { to { transform: rotate(360deg); } }
/* เปิดอยู่ : เขียว + รัศมี + อัปเดต + ปิด */
.lbd .lbnm-pill.is-on { gap: 6px; padding-right: 4px; border-color: #9fd9bf; background: #e9f8f0; color: #0f6e4b; cursor: default; }
.lbnm-dot.is-on { background: #0f8a5f; }
.lbnm-dot.is-on::before, .lbnm-dot.is-on::after { border-color: #0f8a5f; animation: none; opacity: 0; }
.lbnm-dot.is-on .fa { animation: none; }
.lbd .lbnm-pill select { height: 30px; margin: 0 0 0 2px; padding: 0 24px 0 10px; border: 0; border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230f6e4b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 9px center; -webkit-appearance: none; appearance: none; font: inherit; font-size: 13.5px; font-weight: 700; color: #0f6e4b; cursor: pointer; box-shadow: none; }
.lbnm-again, .lbnm-off { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #fff; cursor: pointer; font-size: 13px; }
.lbd .lbnm-again .fa { color: #0f6e4b; }
.lbd .lbnm-off .fa { color: #b42318; }
.lbnm-again:hover, .lbnm-off:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 3px currentColor; }
.lbnm-msg { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: max-content; max-width: min(360px, 80vw); margin: 0; padding: 9px 12px; border-radius: 12px; background: #eef4ff; color: #233a7a; font-size: 13.5px; font-weight: 500; line-height: 1.45; box-shadow: 0 10px 24px -12px rgba(23, 50, 65, .45); }
.lbnm-msg.is-bad { background: #fff1f0; color: #9b1c1c; }
.lbnm-msg[hidden] { display: none; }
/* สถานะในแถบผลการค้นหา */
.lbnm-status { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px; padding: 4px 12px; border-radius: 999px; background: #e9f8f0; color: #0f6e4b; font-size: 13.5px; font-weight: 600; }
.lbnm-status.is-empty { background: #fff6e6; color: #8a5300; }
/* หน้าบริการ : ปุ่มใกล้ฉัน + ชิปบริการหลักแถวเดียวกัน */
.lbsv-toprow { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.lbsv-toprow > .lbnm { flex: none; padding-top: 2px; }
.lbsv-toprow > .lbsv-mainbar { flex: 1 1 auto; min-width: 0; }
@media (max-width: 760px) { .lbsv-toprow { flex-direction: column; align-items: stretch; } .lbsv-toprow > .lbnm { align-self: flex-start; } .lbsv-toprow > .lbsv-mainbar { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .lbnm-dot::before, .lbnm-dot::after, .lbnm-dot .fa { animation: none !important; } }

/* การ์ด : ไม่มีพิกัด (คำนวณระยะไม่ได้) */
.lbl-tc-dist.is-none { background: #fff; color: #3f4d58; font-weight: 600; }
.lbl-tc-dist.is-none .fa { color: #8795a1; }

/* ---------- ช่องตำแหน่งในฟอร์มลงประกาศ (lbx_form_geo) ---------- */
.lbx-geo-nm { padding: 16px 18px 18px; border-radius: 16px; border: 1.5px solid #dfe6fb; background: linear-gradient(180deg, #f7f9ff, #fff 60%); }
.lbx-nm-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: #4153b8; color: #fff; font-size: 12px; font-weight: 600; vertical-align: 2px; }
.lbx-nm-why { display: flex; gap: 8px; margin: 6px 0 12px; padding: 9px 12px; border-radius: 12px; background: #fff8e6; color: #5b4a12; font-size: 13.5px; line-height: 1.5; }
.lbx-nm-why .fa { color: #c48a00; margin-top: 3px; }
.lbx-geo-nm.has-pin .lbx-nm-why { background: #ecf8f1; color: #1e5a3c; }
.lbx-geo-nm.has-pin .lbx-nm-why .fa { color: #1f8a56; }

/* ---------- โปรโมชัน : ฟอร์ม ---------- */
.lbpm-form { padding: 16px 18px 18px !important; border-radius: 16px; border: 1.5px dashed #f2c7a5 !important; background: #fffaf6; }
.lbpm-form.is-on { border-style: solid !important; background: linear-gradient(180deg, #fff4ea, #fff 70%); }
.lbpm-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 0 6px; font-weight: 700; color: #8a3d0e; }
.lbpm-legend .fa { color: #e0601d; }
.lbpm-legend small { flex-basis: 100%; color: #7a6a5e; font-weight: 400; font-size: 13px; }
.lbpm-alert { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.lbpm-alert .fa { font-size: 18px; margin-top: 1px; }
.lbpm-alert b { margin-right: 4px; }
.lbpm-alert.is-active { background: #e8f7ef; color: #155237; }
.lbpm-alert.is-active .fa { color: #1f8a56; }
.lbpm-alert.is-scheduled { background: #eef3ff; color: #233a7a; }
.lbpm-alert.is-scheduled .fa { color: #3b5bdb; }
.lbpm-alert.is-expired { background: #fff1f0; color: #8f1d1d; border: 1px solid #f6caca; }
.lbpm-alert.is-expired .fa { color: #d63b3b; }
.lbpm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: #14252b; user-select: none; }
.lbpm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lbpm-switch-ui { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #cfd8de; transition: background .15s; flex: none; }
.lbpm-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.lbpm-switch input:checked + .lbpm-switch-ui { background: #e0601d; }
.lbpm-switch input:checked + .lbpm-switch-ui::after { transform: translateX(20px); }
.lbpm-switch input:focus-visible + .lbpm-switch-ui { outline: 3px solid rgba(224, 96, 29, .35); outline-offset: 2px; }
.lbpm-fields { display: grid; gap: 14px; margin-top: 14px; }
.lbpm-fields[hidden] { display: none; }
.lbpm-period { display: grid; gap: 8px; }
.lbpm-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.lbpm-quick button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #f0d2bd; background: #fff; color: #8a3d0e; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lbpm-quick button:hover { border-color: #e0601d; }
.lbpm-sum { margin: 0; padding: 9px 14px; border-radius: 12px; background: #fff; border: 1px solid #f0d2bd; color: #6b3410; font-weight: 600; font-size: 14px; }
.lbpm-sum:empty { display: none; }
.lbpm-sum.is-bad { background: #fff1f0; border-color: #f6caca; color: #9b1c1c; }
.lbpm-imgrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lbpm-thumb { display: inline-flex; align-items: center; justify-content: center; width: 132px; height: 96px; border-radius: 12px; overflow: hidden; background: #f3eee9; border: 1px solid #ecdccf; color: #c9a88e; font-size: 28px; }
.lbpm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lbpm-thumb img[hidden] { display: none; }
.lbpm-imgact { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lbpm-pick { position: relative; cursor: pointer; }
.lbpm-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lbpm-del { display: inline-flex; gap: 6px; align-items: center; color: #9b1c1c; font-size: 13.5px; cursor: pointer; }

/* ---------- โปรโมชัน : หน้ารายละเอียด ---------- */
.lbpm-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 !important; overflow: hidden; border: 1.5px solid #f5cfb2; background: linear-gradient(135deg, #fff6ee, #fff); }
.lbpm-box.has-img { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.lbpm-img { display: block; min-height: 100%; background: #f6ece4; }
.lbpm-img img { display: block; width: 100%; height: 100%; max-height: 300px; object-fit: cover; }
.lbpm-body { padding: 20px 24px 22px; }
.lbpm-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 3px 12px; border-radius: 999px; background: #e0601d; color: #fff; font-size: 13px; font-weight: 700; }
.lbpm-box h2 { margin: 2px 0 8px; color: #6b2a07; font-size: 22px; line-height: 1.35; }
.lbpm-detail { margin: 0 0 12px; color: #3f3a36; line-height: 1.65; }
.lbpm-until { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: #8a3d0e; font-weight: 600; font-size: 14.5px; }
.lbpm-until small { padding: 2px 10px; border-radius: 999px; background: #fde6d6; color: #8a3d0e; font-weight: 600; font-size: 12.5px; }
@media (max-width: 760px) { .lbpm-box.has-img { grid-template-columns: minmax(0, 1fr); } .lbpm-img img { max-height: 220px; } .lbpm-body { padding: 16px 18px 18px; } }
.lbpm-owner-note { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.lbpm-owner-note.is-expired { background: #fff1f0; color: #8f1d1d; border: 1px solid #f6caca; }
.lbpm-owner-note.is-scheduled { background: #eef3ff; color: #233a7a; }

/* ---------- โปรโมชัน : ประกาศของฉัน ---------- */
.lbpm-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.lbpm-tag.is-active { background: #fff0e4; color: #b4500f; }
.lbpm-tag.is-scheduled { background: #eef3ff; color: #3b5bdb; }
.lbpm-tag.is-expired { background: #fff1f0; color: #c22a2a; }
.lbpm-expired-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff1f0; border: 1px solid #f6caca; color: #8f1d1d; font-size: 13.5px; font-weight: 600; }
.lbpm-expired-note small { font-weight: 400; }
.lbpm-renew { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: #b4500f; font-size: 13.5px; font-weight: 600; }

/* โปรโมชัน : ช่องวันที่ / textarea / ระยะห่าง ให้เหมือนช่องอื่นของฟอร์ม (promote.css) */
.lbd .lbpm-form .lbp-field input[type="date"] { box-sizing: border-box; width: 100%; height: 50px; margin: 0; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--lbd-line, #dfe6ec); background: #fff; font: inherit; font-size: 16px; color: var(--lbd-ink, #14252b); }
.lbd .lbpm-form .lbp-field input[type="date"]:focus { outline: 0; border-color: #e0601d; box-shadow: 0 0 0 4px rgba(224, 96, 29, .15); }
.lbd .lbpm-form textarea, .lbd .lbsv-form .lbpm-form textarea { box-sizing: border-box; width: 100%; height: 92px; min-height: 92px; padding: 10px 14px; line-height: 1.55; }
.lbpm-form .lbp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lbr-form .lbpm-form .lbp-row .lbp-label, .lbpm-form .lbp-row .lbp-label { min-height: 0; margin-bottom: 6px; }
.lbpm-switch-t { color: #14252b !important; }
@media (max-width: 520px) { .lbpm-form .lbp-row { grid-template-columns: minmax(0, 1fr); } }
/* ผู้พัฒนาโครงการ "อื่น ๆ" : .lbp-field { display: block } ทับ [hidden] */
.lbp-field[hidden], .lbr-brand-row [hidden] { display: none !important; }
.lbr-brand-row { align-items: end; }
/* แถบตัวกรอง v2 : ใกล้ฉันไม่ตัดคำ สูงเท่าปุ่มอื่น (40) */
.lbf.is-v2 .lbnm-pill { max-width: none; white-space: nowrap; padding-left: 5px; }
.lbf.is-v2 .lbnm-dot { width: 28px; height: 28px; font-size: 13px; }
.lbf.is-v2 .lbnm-pill select { height: 28px; }
.lbf.is-v2 .lbnm-again, .lbf.is-v2 .lbnm-off { width: 28px; height: 28px; }

/* ---------- ฟอร์มลงประกาศทุกหมวด : ส่วน (section) มีเลขลำดับ (th/inc/listing.lib.php lbx_sec) ---------- */
.lbx-sec { min-width: 0; margin: 0; border: 1px solid #e3e9ee; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px -16px rgba(23, 50, 65, .35); }
.lbx-sec-h { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid #eef1f4; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, #fafbff, #fff); }
.lbx-sec-n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--lbd-accent, #6161ff); color: #fff; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; font-weight: 700; line-height: 1; }
.lbx-sec-ico { display: none; }
.lbx-sec-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lbx-sec-t b { color: #14252b; font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.lbx-sec-t small { color: #6b7a86; font-size: 13px; line-height: 1.45; }
.lbx-sec-opt { margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 600; vertical-align: 2px; }
.lbx-sec-b { display: grid; gap: 18px; min-width: 0; padding: 20px 22px 22px; }
/* ภายในส่วน : ไม่มีกรอบซ้อน , ช่องในแถวเดียวกันชิดล่างเสมอ (หัวข้อสั้น-ยาวไม่ทำให้ช่องเหลื่อม) */
.lbx-sec .lbp-row { align-items: end; }
.lbx-sec .lbp-row .lbp-label, .lbr-form .lbx-sec .lbp-row .lbp-label, .lbx-sec .lbr-specs .lbp-label { min-height: 0; }
.lbx-sec .lbr-specs { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.lbx-sec .lbx-geo-nm { padding: 0; border: 0; background: none; }
.lbx-sec .lbx-geo-nm .lbx-nm-why { margin-top: 0; }
.lbx-sec .lbx-geo-nm .lbx-latlng { margin-top: 12px; }
.lbx-sec .lbpm-form { padding: 0 !important; border: 0 !important; background: none !important; }
.lbx-sec .lbpm-legend { display: none; }
.lbx-sec .lbx-more-body { display: grid; gap: 18px; padding: 0; }
.lbx-sec .lbk-langs { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.lbd .lbx-sec .lbk-main select { box-sizing: border-box; min-width: 220px; height: 46px; padding: 0 36px 0 14px; border: 1.5px solid var(--lbd-line, #dfe6ec); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; font: inherit; font-size: 15px; color: #14252b; }
.lbx-sec .lbr-brand { display: grid; gap: 12px; }
.lbx-sec .lbp-hint { margin: 0; color: #6b7a86; font-size: 13px; }
.lbx-sec .lbp-hint .fa { color: #94a3b8; }
/* ส่วนท้าย : ยืนยัน + CAPTCHA + ปุ่ม กึ่งกลาง */
.lbx-submit { display: grid; gap: 14px; justify-items: center; padding: 22px; border: 1px solid #e3e6ff; border-radius: 18px; background: #f7f8ff; text-align: left; }
.lbx-submit .lbp-check { max-width: 560px; }
.lbx-submit .lbp-msg:empty { display: none; }
.lbx-submit .lbp-submit { width: min(440px, 100%); }
@media (max-width: 760px) {
	.lbx-sec-h { padding: 14px 16px; gap: 10px; }
	.lbx-sec-b { padding: 16px; gap: 16px; }
	.lbx-sec .lbr-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lbd .lbx-sec .lbk-main select { width: 100%; min-width: 0; }
	.lbx-submit { padding: 16px; }
}
.lbx-sec .lbx-geo-nm > .lbp-label[hidden] { display: none; }
/* หน่วย / คำอธิบายสั้นต่อท้ายชื่อช่อง (ไม่ขึ้นบรรทัดใหม่) -> หัวช่องในแถวเดียวกันสูงเท่ากัน */
.lbx-sec .lbp-row .lbp-label small, .lbx-sec .lbr-specs .lbp-label small { display: inline; margin: 0 0 0 6px; }
.lbx-sec textarea.lbo-textarea, .lbd .lbx-sec .lbsv-form textarea, .lbd .lbsv-form .lbx-sec textarea { height: 140px; min-height: 120px; }

/* ฟอร์มหมวดซื้อ : สภาพทรัพย์ 3 ตัวเลือก (การ์ดเลือก) */
.lbr-hands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }	/* 4 ตัวเลือก (มือ 1 / มือ 2 / ขายดาวน์ / หลุดจำนอง) : 2 x 2 */
.lbr-hand-opt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.lbr-hand-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lbr-hand-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--ht, #eef2f7); color: var(--hc, #475569); }
.lbr-hand-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lbr-hand-t b { color: #14252b; font-size: 15px; }
.lbr-hand-t small { color: #6b7a86; font-size: 12.5px; line-height: 1.45; }
.lbr-hand-opt.is-first { --hc: #0f8a5f; --ht: #e7f6ee; }
.lbr-hand-opt.is-second { --hc: #2457bd; --ht: #eaf0fd; }
.lbr-hand-opt.is-down { --hc: #6d28d9; --ht: #f1ebfd; }
.lbr-hand-opt.is-npa { --hc: #c2410c; --ht: #fff1e8; }
.lbr-hand-opt:hover { border-color: var(--hc); }
.lbr-hand-opt:has(input:checked) { border-color: var(--hc); background: var(--ht); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hc) 18%, transparent); }
.lbr-hand-opt:has(input:checked) .lbr-hand-ico { background: var(--hc); color: #fff; }
.lbr-hand-opt:has(input:focus-visible) { outline: 2px solid var(--hc); outline-offset: 2px; }
.lbr-hand-need { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #fff6e6; color: #8a5300; font-size: 13.5px; }
/* หน้ารายละเอียด : ชิปสภาพทรัพย์ */
.lbm-chips .lbm-hand { color: #fff !important; border: 0 !important; font-weight: 700; }
.lbm-hand.is-first { background: #0f8a5f !important; }
.lbm-hand.is-second { background: #2457bd !important; }
.lbm-hand.is-down { background: #6d28d9 !important; }
.lbm-hand.is-npa { background: #c2410c !important; }
@media (max-width: 760px) { .lbr-hands { grid-template-columns: minmax(0, 1fr); } }
/* ข้อความปฏิเสธตำแหน่ง : บอกวิธีแก้ + ปุ่มลองอีกครั้ง */
.lbnm-msg.is-bad { max-width: min(440px, 88vw); line-height: 1.6; }
.lbd .lbnm-retry { display: inline-flex; align-items: center; height: 30px; margin: 6px 0 0; padding: 0 14px; border: 0; border-radius: 999px; background: #b42318; color: #fff; font: inherit; font-size: 13px; font-weight: 600; box-shadow: none; cursor: pointer; }
.lbd .lbnm-retry:hover { background: #912018; }
/* ปุ่มอัปเดตตำแหน่ง / ปิด : ปุ่มของธีมเดิมมี margin-bottom (~9px) + line-height สูง -> ลอยขึ้นจากแนวกลาง (เห็นชัดบน iPad) ; รีเซ็ตให้อยู่กลางแถว */
.lbd .lbnm button.lbnm-again, .lbd .lbnm button.lbnm-off { flex: none; align-self: center; margin: 0; line-height: 1; vertical-align: middle; -webkit-appearance: none; appearance: none; }
.lbd .lbnm button.lbnm-again .fa, .lbd .lbnm button.lbnm-off .fa { line-height: 1; }

/* ---------- ใกล้ฉัน ยังไม่เปิด = เทา (บอกว่ายังไม่ได้ใช้ ; ค่าเริ่มต้นปิด) ; ชี้ / กำลังหาตำแหน่ง = สีหมวด ; เปิดแล้ว = เขียว (.is-on ด้านบน) ---------- */
.lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on) { border-color: #dde3ea; background: #f4f6f9; color: #64748b; }
.lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on) .lbnm-dot { background: #aab4c2; }
.lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on) .lbnm-dot::before, .lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on) .lbnm-dot::after { animation: none; opacity: 0; }
.lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on) .lbnm-dot .fa { animation: none; }
.lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on):focus-visible, .lbd .lbnm.lbnm.is-busy > button.lbnm-pill { border-color: var(--c); background: #fff; color: var(--c); }
.lbd .lbnm.lbnm.is-busy > button.lbnm-pill .lbnm-dot { background: var(--c); }
@media (hover: hover) { .lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on):hover { border-color: var(--c); background: #fff; color: var(--c); } .lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on):hover .lbnm-dot { background: var(--c); } }
.lbd .lbnm.lbnm.is-busy > button.lbnm-pill .lbnm-dot .fa { animation: lbnm-spin 1s linear infinite; }
.lbd .lbnm.lbnm.is-busy > button.lbnm-pill .lbnm-dot::before { border-color: var(--c); animation: lbnm-ring 1.2s ease-out infinite; opacity: 1; }
/* ข้อความใกล้ฉัน (กำลังขอตำแหน่ง / ไม่ได้รับสิทธิ์ + ลองอีกครั้ง) บนจอ <= 900px : แถบลอยล่างจอ ; เดิมอยู่ใต้ปุ่มในแถวที่เลื่อนซ้ายขวาได้ -> iPhone ตัดทิ้ง มองไม่เห็น */
@media (max-width: 900px) {
	.lbd .lbnm-msg { position: fixed; top: auto; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 9100; width: auto; max-width: 560px; margin: 0 auto; padding: 12px 14px; font-size: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .28); }
	.lbd .lbnm-msg.is-bad { max-width: 560px; }
}

/* ---------- โปรโมชันแบบคูปอง (2026-11-28 ; lbpm_detail_box) : ตั๋วซ้าย | เนื้อหา | นับถอยหลัง , รอยปรุ + รอยเว้าแบบตั๋ว ---------- */
.lbpm-box.is-coupon { --po: #ea580c; --po2: #f97316; --pt: #fff7ed; display: block; padding: 0 !important; overflow: hidden; border: 0; border-radius: 22px; background: none; box-shadow: 0 18px 40px -18px rgba(234, 88, 12, .45); }
.lbpm-box.is-coupon .lbpm-img { display: block; aspect-ratio: 16 / 6; background: #f6ece4; }
.lbpm-box.is-coupon .lbpm-img img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.lbpm-ticket { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) 120px; align-items: stretch; background: linear-gradient(110deg, #fff 30%, var(--pt)); border: 1.5px solid #fdba8c; border-radius: 22px; }
.lbpm-box.has-img .lbpm-ticket { border-top: 0; border-radius: 0 0 22px 22px; }
.lbpm-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: -1.5px 0 -1.5px -1.5px; border-radius: 22px 0 0 22px; background: linear-gradient(160deg, var(--po2), var(--po) 60%, #c2410c); color: #fff; }
.lbpm-box.has-img .lbpm-stub { border-top-left-radius: 0; }
.lbpm-stub .fa { font-size: 34px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .2)); }
.lbpm-stub span { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
/* รอยปรุ (เส้นประ) + รอยเว้าครึ่งวงกลมบน / ล่าง ระหว่างตั๋วกับเนื้อหา และเนื้อหากับนับถอยหลัง */
.lbpm-body { position: relative; padding: 20px 26px 20px 28px !important; border-right: 2px dashed #fdba8c; }
.lbpm-body::before, .lbpm-body::after { content: ""; position: absolute; right: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--lbd-bg, #f3f6f9); box-shadow: inset 0 0 0 1.5px #fdba8c; }
.lbpm-body::before { top: -11px; } .lbpm-body::after { bottom: -11px; }
.lbpm-box.is-coupon .lbpm-kicker { margin: 0 0 6px; padding: 3px 11px; background: #ffedd5; color: #c2410c; font-size: 12px; }
.lbpm-box.is-coupon h2 { margin: 0 0 6px !important; color: #7c2d12; font-size: 24px; font-weight: 800; line-height: 1.3; }
.lbpm-box.is-coupon .lbpm-detail { margin: 0 0 8px; color: #7a4a2a; font-size: 14.5px; line-height: 1.6; }
.lbpm-box.is-coupon .lbpm-until { color: #9a3412; font-size: 14px; }
.lbpm-count { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 14px 8px; color: #9a3412; text-align: center; }
.lbpm-count b { color: var(--po); font-size: 40px; font-weight: 800; line-height: 1.05; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.lbpm-count small { font-size: 12.5px; font-weight: 600; }
.lbpm-count.is-soon b { color: #dc2626; animation: lbpm-pulse 1.6s ease-in-out infinite; }
@keyframes lbpm-pulse { 50% { transform: scale(1.08); } }
@media (max-width: 760px) {
	.lbpm-ticket { grid-template-columns: 76px minmax(0, 1fr); }
	.lbpm-stub .fa { font-size: 26px; } .lbpm-stub span { font-size: 11.5px; }
	.lbpm-body { padding: 16px 16px 14px 18px !important; border-right: 0; }
	.lbpm-body::before, .lbpm-body::after { display: none; }
	.lbpm-box.is-coupon h2 { font-size: 19px; }
	/* นับถอยหลัง : แถบล่างเต็มกว้าง ใต้เนื้อหา */
	.lbpm-count { grid-column: 2; flex-direction: row; justify-content: flex-start; gap: 6px; padding: 10px 18px 14px; border-top: 2px dashed #fdba8c; }
	.lbpm-count b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .lbpm-count.is-soon b { animation: none; } }

/* ใกล้ฉัน = สวิตช์เปิด / ปิด (2026-11-28) : ปิด = เทา , กำลังหาตำแหน่ง / เปิด = สีของหมวด + ปุ่มกลมเลื่อนขวา */
.lbnm-sw { position: relative; display: inline-block; flex: none; width: 34px; height: 20px; margin-left: 4px; border-radius: 999px; background: #c5cdd8; transition: background .18s; }
.lbnm-sw i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .3); transition: transform .18s; }
.lbnm-sw.is-on, .lbd .lbnm.lbnm.is-busy .lbnm-sw { background: var(--c); }
.lbnm-sw.is-on i, .lbd .lbnm.lbnm.is-busy .lbnm-sw i { transform: translateX(14px); }
.lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on) { padding-right: 6px; }
@media (hover: hover) { .lbd .lbnm.lbnm > button.lbnm-pill:not(.is-on):hover .lbnm-sw { background: color-mix(in srgb, var(--c) 45%, #c5cdd8); } }
.lbd .lbnm-pill.is-on { border-color: color-mix(in srgb, var(--c) 35%, #fff); background: var(--t); color: var(--c); padding-left: 3px; }
.lbd .lbnm-tg { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 6px 0 2px; border-radius: 999px; cursor: pointer; font-weight: 700; }
.lbd .lbnm-tg:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); outline-offset: 1px; }
.lbd .lbnm-tg:hover .lbnm-sw { background: color-mix(in srgb, var(--c) 70%, #fff); }
.lbd .lbnm-pill.is-on .lbnm-dot.is-on { background: var(--c); }
.lbd .lbnm-pill.is-on select { color: var(--c); }
.lbd .lbnm-pill.is-on .lbnm-again { color: var(--c); }
.lbd .lbnm-pill.is-on .lbnm-again:hover { background: #fff; }

/* ใกล้ฉัน ทุกหมวด (2026-11-28) : สีหมวดซื้อ / โครงการใหม่ + สวิตช์ "เฉพาะในรัศมี" */
.lbnm.m-buy { --c: #187655; --t: #e5f5ee; }
.lbnm.m-new-projects { --c: #b85a22; --t: #fcefe6; }
.lbnm { gap: 6px; flex-wrap: wrap; }
.lbd .lbnm-only { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; border: 1px solid #dde3ea; background: #fff; color: #475467; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lbd .lbnm-only:hover { border-color: var(--c); color: var(--c); }
.lbd .lbnm-only.is-on { border-color: color-mix(in srgb, var(--c) 35%, #fff); background: var(--t); color: var(--c); }
.lbd .lbnm-only:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); outline-offset: 2px; }
/* ฟอร์มลงประกาศ : สถานะปักหมุด (listing.lib.php lbx_sec_geo) */
.lbx-geo-nudge { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px !important; padding: 10px 12px; border-radius: 12px; border: 1px solid #fde4c4; background: #fff8ef; color: #9a4a0b; font-size: 13.5px; line-height: 1.55; }
.lbx-geo-nudge .fa { margin-top: 3px; }
.lbx-geo-nudge.is-ok { border-color: #c8eedb; background: #effaf4; color: #0f6e4b; }

/* ใกล้ฉัน : มุมมองแผนที่ (th/js/web/nearme-map.js ; Leaflet) ; ปุ่มสลับ รายการ / แผนที่ ต่อจากข้อความสถานะ */
.lbnm-views { display: inline-flex; gap: 2px; margin: 0 6px; padding: 3px; border-radius: 999px; background: #f2f3f7; border: 1px solid #e4e7ec; vertical-align: middle; }
.lbnm-view { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #475467; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lbnm-view.is-on { background: #fff; color: #3f3fb8; box-shadow: 0 2px 8px -3px rgba(16, 24, 64, .25); }
.lbnm-view:focus-visible { outline: 2px solid #6161ff; outline-offset: 2px; }
.lbv-main.is-nmap > :not(.lbd-resultbar):not(.lbnm-mapbox) { display: none !important; }
.lbnm-mapbox { margin: 4px 0 28px; }
.lbnm-mapinfo { margin: 0 0 10px !important; color: #475467; font-size: 14px; }
.lbnm-mapinfo.is-bad { color: #b54708; }
.lbnm-map { position: relative; z-index: 0; height: min(72vh, 640px); min-height: 380px; border: 1px solid #e3e6f0; border-radius: 20px; overflow: hidden; background: #eef0f6; }
.lbnm-pin-wrap { background: none; border: 0; }
.lbnm-pin { display: inline-block; transform: translate(-50%, -100%); padding: 5px 10px; border-radius: 999px; background: #fff; border: 1.5px solid #6161ff; color: #14252b; font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(16, 24, 64, .45); font-family: "IBM Plex Sans Thai Looped", sans-serif; }
.lbnm-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -5px; border: 5px solid transparent; border-top-color: #6161ff; border-bottom: 0; }
.leaflet-marker-icon:hover .lbnm-pin, .leaflet-marker-icon:focus .lbnm-pin, .leaflet-marker-icon.is-on .lbnm-pin { background: #6161ff; color: #fff; }	/* หมุดซ้อนกัน : ชี้ / เลือกแล้วลอยขึ้นบนสุด (riseOnHover + zIndexOffset) */
.lbnm-pop { display: grid; gap: 3px; color: #14252b !important; text-decoration: none !important; font-family: "IBM Plex Sans Thai Looped", sans-serif; }
.lbnm-pop img { width: 100%; height: 130px; margin-bottom: 6px; border-radius: 10px; object-fit: cover; }
.lbnm-pop-t { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.lbnm-pop-p { color: #0f8a5f; font-size: 14px; font-weight: 700; }
.lbnm-pop-d { color: #667085; font-size: 12.5px; }
.lbnm-pop-go { margin-top: 4px; color: #4b4bd6; font-size: 13.5px; font-weight: 600; }
.leaflet-popup-content { margin: 12px 14px; }
@media (max-width: 640px) {
	.lbnm-views { margin: 8px 0 0; }
	.lbnm-map { height: 66vh; min-height: 340px; border-radius: 16px; }
}
.lbv-main.is-nmap .lbv-right { visibility: hidden; }	/* ปุ่มสลับกริด / แถว ไม่มีผลกับแผนที่ */

/* แถบตัวกรองด้านซ้าย (มุมมอง side-grid / side-list) : ปุ่มใกล้ฉันตอนเปิด (สวิตช์ + รัศมี + อัปเดตตำแหน่ง) ไม่ล้นกล่อง (แจ้ง 2026-11-29)
   หัวข้อหมวด "ใกล้ฉัน" อยู่เหนือปุ่มแล้ว -> ซ่อนคำซ้ำในปุ่ม (font-size 0 ; ยังมี role=switch + title) ให้ทั้งหมดอยู่แถวเดียวพอดีความกว้างแถบ */
@media (min-width: 901px) {
	.lbv[data-view^="side"] .lbnm { max-width: 100%; }
	.lbv[data-view^="side"] .lbnm-pill.is-on { box-sizing: border-box; max-width: 100%; gap: 6px; }
	.lbv[data-view^="side"] .lbnm-pill.is-on .lbnm-tg { font-size: 0; gap: 6px; }
	.lbv[data-view^="side"] .lbnm-pill.is-on .lbnm-tg .lbnm-dot .fa { font-size: 14px; }
	.lbv[data-view^="side"] .lbnm-only { max-width: 100%; }
}
