/* ============================================================================
   flood_help.css — สไตล์กลางของระบบ "แจ้งพิกัดพื้นที่น้ำท่วม / ขอความช่วยเหลือ"
   ใช้ร่วมกับ Bootstrap 4 + Font Awesome 5 ที่โหลดจาก header.php อยู่แล้ว
   โทนสีเดียวกับระบบกลุ่มเปราะบาง / NST Flood
   ============================================================================ */

:root {
    --fh-1: #0d4d7a;
    --fh-2: #0f7db2;
    --fh-3: #1292a9;
    --fh-ink: #12303f;
    --fh-body: #2c4056;
    --fh-muted: #6b8299;
    --fh-line: #e2eef9;
    --fh-soft: #f6fbff;
    --fh-gold: #f6d375;
    --fh-green: #2e7d32;
    --fh-orange: #e08600;
    --fh-red: #c62828;
}

/* ---------- โครงหน้า ---------- */
.fh-section {
    padding: 26px 0 70px;
    background: linear-gradient(180deg, #f5f9ff 0%, #eef5fb 100%);
    min-height: calc(100vh - 120px);
}
.fh-container { max-width: 1280px; margin: 0 auto; padding: 0 14px; }

.fh-card {
    background: #fff;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 16px 38px rgba(13, 77, 122, .11);
    overflow: hidden;
}
.fh-card__head {
    position: relative; overflow: hidden;
    padding: 22px 26px;
    color: #fff;
    background: linear-gradient(95deg, #0d4d7a 0%, #0f7db2 62%, #1292a9 100%);
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
}
/* แสงกวาดเบา ๆ บนหัวการ์ด */
.fh-card__head::after {
    content: ''; position: absolute; top: -60%; left: -30%; width: 40%; height: 220%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
    transform: rotate(16deg); pointer-events: none;
    animation: fhSheen 9s ease-in-out infinite;
}
@keyframes fhSheen {
    0%, 100% { transform: translateX(-30%) rotate(16deg); }
    50%      { transform: translateX(240%) rotate(16deg); }
}
.fh-card__head--gold { background: linear-gradient(95deg, #a9491a 0%, #d97706 60%, #eab308 100%); }
.fh-card__title { margin: 0; font-size: clamp(1.35rem, 2.4vw, 2rem); font-weight: 800; }
.fh-card__sub { margin: 4px 0 0; font-size: .84rem; opacity: .9; font-weight: 600; }
.fh-card__body { padding: 22px 24px 28px; }

/* ---------- ปุ่ม ---------- */
.fh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 13px; border: 1px solid #dbe7f2;
    background: #fff; color: #2d4d66 !important; font-weight: 800; font-size: .88rem;
    text-decoration: none !important; cursor: pointer; line-height: 1.2;
    box-shadow: 0 6px 14px rgba(13, 77, 122, .07);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.fh-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(13, 77, 122, .16); text-decoration: none; }
.fh-btn--primary {
    color: #fff !important; border-color: transparent;
    background: linear-gradient(120deg, #0f7db2, #0d4d7a);
}
.fh-btn--gold { color: #4a2c00 !important; border-color: transparent; background: linear-gradient(120deg, #ffe9a8, #fbc95b); }
.fh-btn--green { color: #fff !important; border-color: transparent; background: linear-gradient(120deg, #43a047, #2e7d32); }
.fh-btn--danger { color: #b3261e !important; border-color: #f6d5d3; background: #fff; }
.fh-btn--sm { padding: 8px 13px; font-size: .8rem; border-radius: 11px; }
.fh-btn--icon { padding: 9px 13px; }
.fh-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- กล่อง KPI ---------- */
.fh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 14px; }
.fh-kpi {
    position: relative; padding: 16px 16px 15px; border-radius: 16px; overflow: hidden;
    background: #fff; border: 1px solid var(--fh-line);
    box-shadow: 0 10px 22px rgba(13, 77, 122, .07);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fh-kpi:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 125, 178, .35);
    box-shadow: 0 18px 34px rgba(13, 77, 122, .15);
}
.fh-kpi::after {
    content: ""; position: absolute; right: -28px; top: -28px; width: 78px; height: 78px;
    border-radius: 50%; background: linear-gradient(135deg, rgba(15, 125, 178, .14), rgba(18, 146, 169, .05));
}
.fh-kpi__ic {
    width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.02rem; color: #fff; margin-bottom: 10px;
    background: linear-gradient(135deg, #0f7db2, #0d4d7a);
}
.fh-kpi__ic.c-red { background: linear-gradient(135deg, #e35d5d, #c62828); }
.fh-kpi__ic.c-orange { background: linear-gradient(135deg, #f5a623, #e08600); }
.fh-kpi__ic.c-green { background: linear-gradient(135deg, #4caf50, #2e7d32); }
.fh-kpi__ic.c-purple { background: linear-gradient(135deg, #9b6bd4, #6d4aa8); }
.fh-kpi__val { font-size: 1.6rem; font-weight: 800; color: var(--fh-1); line-height: 1.1; }
.fh-kpi__lbl { font-size: .78rem; font-weight: 700; color: var(--fh-muted); margin-top: 3px; }

/* ---------- ป้ายกำกับ ---------- */
.fh-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800;
    color: #fff; white-space: nowrap;
}
.fh-need {
    display: inline-block; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 999px;
    font-size: .71rem; font-weight: 800; border: 1px solid transparent; white-space: nowrap;
}
.fh-need--water    { color: #0b5f92; background: #e7f4ff; border-color: #c7e5fb; }
.fh-need--food     { color: #8a5a00; background: #fff6e5; border-color: #ffe3ae; }
.fh-need--medicine { color: #a33a3a; background: #fff0f0; border-color: #f8d6d6; }
.fh-need--boat     { color: #1f7a4d; background: #ecfbf2; border-color: #c6ecd6; }
.fh-need--shelter  { color: #5d3f8c; background: #f6eeff; border-color: #e0cdfa; }
.fh-need--electric { color: #855c00; background: #fffbe6; border-color: #f4e6a8; }
.fh-need--toilet   { color: #0f6b7a; background: #e8f8fb; border-color: #c5eaf2; }
.fh-need--other    { color: #5a6b7a; background: #f2f5f8; border-color: #dde5ec; }

/* ---------- ตัวกรองแบบชิป ---------- */
.fh-filters {
    position: relative;
    background: var(--fh-soft); border: 1px solid var(--fh-line); border-radius: 16px; padding: 14px 16px;
    overflow: hidden;
}
.fh-filters::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 4px;
    background: linear-gradient(90deg, #0f7db2, #1292a9 55%, #f6d375);
}
.fh-filters__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
/* แถบตัวกรองแบบกระชับ (2026-10-16): ตัวกรองหลักแถวเดียว + ปุ่มชิดขวา + ตัวกรองเพิ่มเติมยุบได้ */
.fh-filters__bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.fh-filters__bar .fh-fld--q { flex: 1 1 240px; min-width: 200px; }
.fh-filters__bar .fh-fld:not(.fh-fld--q) { flex: 0 1 160px; min-width: 130px; }
.fh-filters__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.fh-filters__more { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #cfe0ec; }
.fh-filters__more.on { display: block; }
.fh-filters__foot { display: flex; justify-content: flex-end; margin-top: 8px; }
#fhMoreTog .fa-chevron-down { transition: transform .2s ease; }
#fhMoreTog.open .fa-chevron-down { transform: rotate(180deg); }
.fh-fld { display: flex; flex-direction: column; gap: 5px; }
.fh-fld > label { font-size: .74rem; font-weight: 800; color: #4c6274; letter-spacing: .01em; margin: 0; }
.fh-inp, .fh-sel {
    width: 100%; padding: 9px 12px; border-radius: 11px; border: 1px solid #d6e4f0;
    background: #fff; color: var(--fh-body); font-weight: 600; font-size: .86rem;
    font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.fh-inp:focus, .fh-sel:focus { border-color: var(--fh-2); box-shadow: 0 0 0 3px rgba(15, 125, 178, .14); }
textarea.fh-inp { resize: vertical; min-height: 74px; }
.fh-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.fh-chip {
    padding: 7px 13px; border-radius: 999px; cursor: pointer; user-select: none;
    font-size: .79rem; font-weight: 800; color: #40607a;
    background: #fff; border: 1px solid #d8e6f2; transition: all .15s ease;
}
.fh-chip:hover { border-color: var(--fh-2); color: var(--fh-1); }
.fh-chip.on { color: #fff; border-color: transparent; background: linear-gradient(120deg, #0f7db2, #0d4d7a); box-shadow: 0 6px 14px rgba(13, 77, 122, .24); }
.fh-chip--req.on { background: linear-gradient(120deg, #e08600, #c62828); }

/* ---------- ตารางข้อมูล ---------- */
.fh-tblwrap { overflow-x: auto; border: 1px solid var(--fh-line); border-radius: 14px; }
/* แถบ "แสดง X รายการ + เปลี่ยนหน้า" — แยกออกจากพื้นที่เลื่อนตาราง (JS ย้าย .dataTables_info/.dataTables_paginate มาไว้ที่นี่)
   → ตัวเปลี่ยนหน้าอยู่ชิดขวาสุด ไม่ซ้อนกับแถบเลื่อนแนวนอนของตาราง */
.fh-tblbar {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px 16px;
    margin-top: 10px; padding: 9px 14px;
    background: #fff; border: 1px solid var(--fh-line); border-radius: 13px;
    box-shadow: 0 6px 16px rgba(13, 77, 122, .05);
}
.fh-tblbar .dataTables_info { padding: 0; color: var(--fh-muted); font-size: .82rem; font-weight: 700; }
.fh-tblbar .dataTables_paginate { margin: 0 !important; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; justify-self: end; }
.fh-tblbar .paginate_button {
    display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
    margin: 0 !important; padding: 0 10px; border-radius: 9px; border: 1px solid #dbe7f2; cursor: pointer;
    background: #fff; color: #2d4d66 !important; font-weight: 700; font-size: .82rem; box-sizing: border-box;
    transition: background .15s, box-shadow .15s, border-color .15s;
}
.fh-tblbar .paginate_button:hover { background: #eef7ff; border-color: #9fd4ee; text-decoration: none; }
.fh-tblbar .paginate_button.current {
    color: #fff !important; background: linear-gradient(120deg, #0f7db2, #0d4d7a); border-color: transparent;
    box-shadow: 0 6px 14px -6px rgba(13, 77, 122, .55);
}
.fh-tblbar .paginate_button.disabled { opacity: .45; pointer-events: none; }
@media (max-width: 767.98px) {
    .fh-tblbar { grid-template-columns: 1fr; justify-items: center; }
    .fh-tblbar .dataTables_paginate { justify-content: center; justify-self: auto; }
}
table.fh-tbl { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: .84rem; }
table.fh-tbl thead th {
    padding: 12px 10px; text-align: center; white-space: nowrap;
    color: #fff; font-weight: 800; font-size: .78rem;
    background: linear-gradient(180deg, #0d4d7a, #0f6f9e);
    position: sticky; top: 0; z-index: 2;
}
table.fh-tbl tbody td { padding: 11px 10px; text-align: center; vertical-align: middle; border-bottom: 1px solid #edf3f8; color: var(--fh-body); }
table.fh-tbl tbody td.left { text-align: left; }
table.fh-tbl tbody tr:hover td { background: #f7fcff; }
.fh-act { display: inline-flex; gap: 5px; }
.fh-act button {
    border: 1px solid #dbe7f2; background: #fff; border-radius: 9px; cursor: pointer;
    padding: 5px 9px; font-size: .74rem; font-weight: 800; color: #2d4d66;
    transition: all .15s;
}
.fh-act button:hover { background: #eef7ff; }
.fh-act button.del { color: #b3261e; border-color: #f6d5d3; }
.fh-act button.del:hover { background: #fff2f1; }
.fh-act button.map { color: #1565c0; border-color: #d4e6fb; }

/* ---------- ฟอร์ม + modal ---------- */
.fh-modal-bg { position: fixed; inset: 0; background: rgba(6, 26, 40, .5); z-index: 3000; display: none; backdrop-filter: blur(1.5px); }
.fh-modal {
    position: fixed; z-index: 3001; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(1020px, 96vw); max-height: 92vh; display: none; flex-direction: column;
    background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 26px 60px rgba(6, 26, 40, .38);
}
/* บนเดสก์ท็อป: เลื่อนหน้าต่างป็อปอัปมาอยู่กึ่งกลางพื้นที่ด้านขวาของแถบเมนู
   (เดิม center ที่ viewport เต็ม → ตัวฟอร์มซ้อนทับ sidebar ซ้าย) */
@media (min-width: 992px) {
    body.n2-has-sidebar .fh-modal-bg { left: var(--smart-side-w, 264px); }
    body.n2-has-sidebar .fh-modal {
        left: calc(var(--smart-side-w, 264px) + (100vw - var(--smart-side-w, 264px)) / 2);
        width: min(1020px, calc(100vw - var(--smart-side-w, 264px) - 28px));
    }
}
.fh-modal__hd {
    padding: 14px 18px; color: #fff; display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(95deg, #0d4d7a, #1292a9);
}
.fh-modal__hd b { font-size: 1.02rem; font-weight: 800; }
.fh-modal__hd button { background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.fh-modal__bd { padding: 18px 20px; overflow: auto; }
.fh-formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 13px; }
.fh-formgrid .full { grid-column: 1 / -1; }
.fh-formgrid label { display: block; font-size: .76rem; font-weight: 800; color: #46617a; margin-bottom: 5px; }
.fh-modal__ft { padding: 13px 18px; border-top: 1px solid var(--fh-line); background: #f8fbff; display: flex; justify-content: flex-end; gap: 9px; }
.fh-msg { min-height: 20px; font-size: .84rem; font-weight: 700; margin: 10px 0 2px; }
.fh-msg.err { color: #b3261e; }
.fh-msg.ok { color: #1f7a4d; }
.fh-hint { font-size: .75rem; color: var(--fh-muted); font-weight: 600; }

/* ---------- แผนที่ ---------- */
/* Leaflet ตั้งฟอนต์ Helvetica/Arial ของตัวเอง → ข้อความไทยใน popup/tooltip จะเป็นกล่อง
   จึงบังคับให้ใช้ฟอนต์เดียวกับหน้าเว็บ */
.leaflet-container, .leaflet-popup-content, .leaflet-tooltip, .leaflet-control {
    font-family: inherit;
}
.fh-map { width: 100%; height: 460px; border-radius: 14px; border: 1px solid var(--fh-line); }
.fh-map--sm { height: 300px; }

/* ---------- หมุดเข็มปัก (เน้นความฉุกเฉิน) — ใช้ร่วมหน้าแผนที่และบล็อกแผนที่บนหน้าแรก ---------- */
.leaflet-marker-icon.fh-pin-wrap { background: none; border: 0; transition: transform .15s ease; }
.leaflet-marker-icon.fh-pin-wrap:hover { transform: scale(1.16); }
.fh-pin { position: relative; width: 100%; height: 100%; transform-origin: 50% 100%; }
/* ลำดับชั้นภายในหมุด (z-index) — จำเป็นมาก!
   leaflet.css มีกฎ `.leaflet-map-pane svg { z-index: 200 }` ซึ่งมี specificity สูงกว่า `.fh-pin__svg`
   → ตัวเข็ม (svg) จะถูกวาดทับ "ไอคอน" ที่อยู่ข้างใน ทำให้วงกลมขาวดูว่างเปล่า
   จึงต้องเขียนเป็น `.fh-pin .fh-pin__svg` (2 คลาส ชนะ 1 คลาส + 1 แท็ก) และกำหนดชั้นให้ชัดเจน */
.fh-pin .fh-pin__ring { z-index: 1; }   /* วงแหวน halo — หลังตัวเข็ม */
.fh-pin .fh-pin__svg  { z-index: 2; }   /* ตัวเข็ม */
.fh-pin .fh-pin__ico  { z-index: 3; }   /* ไอคอนข้างใน — ต้องอยู่บนสุดเสมอ */
.fh-pin__svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(6, 26, 40, .18)); }
.fh-pin__ico { position: absolute; left: 50%; top: 37%; transform: translate(-50%, -50%); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* (เอาออกแล้ว 2026-10-16: เงาวงรีสีดำใต้หมุด .fh-pin::after — ผู้ใช้ไม่ต้องการ) */
/* วงแหวนรอบหัวหมุด (halo) */
.fh-pin__ring {
    position: absolute; left: 50%; top: 37%; width: 30%; height: 23%;
    transform: translate(-50%, -50%); border: 2px solid currentColor; border-radius: 50%;
    pointer-events: none; animation: fhRing 1.9s ease-out infinite;
}
@keyframes fhRing {
    0%   { width: 32%; height: 24%; opacity: .95; }
    100% { width: 165%; height: 126%; opacity: 0; }
}

/* ===== หมุดวิกฤต (สีแดง) — เด้ง + ย่อ-ยืด + เรืองแสง + วงน้ำกระเพื่อมบนพื้น ===== */
.fh-pin--critical {
    transform-origin: 50% 100%;
    animation: fhHop 1.45s cubic-bezier(.36, .07, .19, .97) infinite;
}
@keyframes fhHop {
    0%   { transform: translateY(0) scale(1, 1); }
    10%  { transform: translateY(-2px) scale(.96, 1.05); }
    32%  { transform: translateY(-10px) scale(1.02, .97); }
    50%  { transform: translateY(-12px) scale(1, 1); }
    68%  { transform: translateY(-5px) scale(1.01, .99); }
    84%  { transform: translateY(2px) scale(1.09, .9); }
    93%  { transform: translateY(0) scale(.97, 1.03); }
    100% { transform: translateY(0) scale(1, 1); }
}
/* เงาใต้หมุดวิกฤตถูกเอาออกพร้อมกับ .fh-pin::after (2026-10-16) */
/* วงน้ำกระเพื่อมบนพื้นรอบหมุดวิกฤต */
.fh-pin--critical::before {
    content: ''; position: absolute; left: 50%; bottom: 0; width: 58%; height: 26%;
    transform: translateX(-50%) scale(.35); border-radius: 50%; pointer-events: none;
    border: 2px solid rgba(198, 40, 40, .9);
    animation: fhRipple 1.45s ease-out infinite;
}
@keyframes fhRipple {
    0%   { transform: translateX(-50%) scale(.35); opacity: .9; }
    70%  { transform: translateX(-50%) scale(1); opacity: .16; }
    100% { transform: translateX(-50%) scale(1.3); opacity: 0; }
}
/* เรืองแสงเต้นเป็นจังหวะ + เส้นขอบขาวหนาขึ้น → มองเห็นชัดบนภาพดาวเทียม */
.fh-pin--critical .fh-pin__svg { animation: fhGlow 1.45s ease-in-out infinite; }
@keyframes fhGlow {
    0%, 100% { filter: drop-shadow(0 6px 9px rgba(198, 40, 40, .5)) drop-shadow(0 0 2px rgba(255, 90, 90, .35)); }
    50%      { filter: drop-shadow(0 9px 15px rgba(198, 40, 40, .72)) drop-shadow(0 0 12px rgba(255, 96, 96, .7)); }
}
.fh-pin--critical .fh-pin__svg path { stroke-width: 3; }
.fh-pin--critical .fh-pin__ring { animation-duration: 1.45s; }

/* หมุดเร่งด่วน (ส้ม) — หายใจเบา ๆ ไม่แรงเท่าวิกฤต */
.fh-pin--urgent { transform-origin: 50% 100%; animation: fhBreath 2.6s ease-in-out infinite; }
@keyframes fhBreath {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}
.fh-pin--urgent .fh-pin__svg { filter: drop-shadow(0 6px 9px rgba(224, 134, 0, .45)); }

/* ── หมุดกลุ่มเปราะบาง (js/vulnerable_pin_style.js — ใช้โครงเข็มปักชุดเดียวกับหมุดแจ้งเหตุ
      index.php + vulnerable_map.php ร่วมกัน) ── */
.fh-pin--vpm .fh-pin__ico,
.fh-pin--vpm-cluster .fh-pin__ico {
    display: flex; align-items: center; justify-content: center;
}
.fh-pin--vpm .fh-pin__ico svg { display: block; }
.fh-pin--vpm .fh-pin__svg,
.fh-pin--vpm-cluster .fh-pin__svg { filter: drop-shadow(0 3px 4px rgba(6, 26, 40, .16)); }
/* ป้าย "♥ N" ใต้หัวหมุดรวมกลุ่ม — พื้นขาว อ่านชัดบนตัวเข็มสี */
.fh-pin--vpm-cluster .fh-cluster-heart {
    position: absolute; left: 50%; top: 63%; transform: translate(-50%, -50%);
    background: #fff; border-radius: 999px; padding: 1px 5px;
    font-family: Prompt, Arial, sans-serif; font-size: 8px; font-weight: 800; line-height: 1.25;
    white-space: nowrap; box-shadow: 0 2px 5px rgba(6, 26, 40, .35);
    pointer-events: none;
}

/* ── ป้ายชื่อจุดสนับสนุนใต้หมุด (ที่พัก / แจกอาหาร / อาสา-มูลนิธิ ฯลฯ) ──
      โมดูล js/flood_support_points.js ใช้ร่วมทั้งหน้าแรกและแผนที่เต็มจอ */
.fh-sup-pinwrap { display: flex; flex-direction: column; align-items: center; }
.fh-sup-tag {
    margin-top: 2px; padding: 2px 7px; border-radius: 999px;
    background: #fff; border: 1.2px solid #94a3b8;
    font-family: Prompt, Arial, sans-serif; font-size: 9.5px; font-weight: 800; line-height: 1.3;
    white-space: nowrap; text-align: center;
    box-shadow: 0 1px 3px rgba(8, 25, 20, .18);
}

@media (prefers-reduced-motion: reduce) {
    .fh-card__head::after, .fh-pin--critical, .fh-pin--urgent, .fh-pin--critical::before,
    .fh-pin--critical .fh-pin__svg, .fh-pin__ring { animation: none; }
}

/* ---------- popup ของหมุด ---------- */
.fh-pin-pop { min-width: 240px; max-width: 330px; font-size: .84rem; }
.fh-pin-pop h4 { margin: 0 0 6px; font-size: .95rem; font-weight: 800; color: #0d4d7a; }
.fh-pin-pop__row { display: flex; gap: 6px; margin: 3px 0; }
.fh-pin-pop__k { color: #6b8299; font-weight: 700; min-width: 76px; }
.fh-pin-pop__v { color: #2c4056; font-weight: 700; }
/* กล่องข้อมูลผู้แจ้ง/ผู้ติดต่อใน popup — แยกชื่อ-เบอร์ให้อ่านง่าย (2026-10-16) */
.fh-pin-contact {
    display: flex; flex-direction: column; gap: 6px;
    margin: 8px 0; padding: 9px 11px; border-radius: 12px;
    background: #f1f8fe; border: 1px solid #d6e9f7;
}
.fh-pin-contact__row { display: flex; align-items: center; gap: 8px; }
.fh-pin-contact__ic {
    width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0f7db2, #0d4d7a); color: #fff; font-size: .72rem;
}
.fh-pin-contact__k { flex: 0 0 auto; font-size: .72rem; font-weight: 700; color: #6b8299; min-width: 60px; }
.fh-pin-contact__v { font-size: .86rem; color: #17384d; font-weight: 800; word-break: break-word; }
.fh-pin-contact__v a { color: #0d4d7a; font-weight: 800; text-decoration: underline; }
.fh-pin-pop__coord {
    display: flex; align-items: center; gap: 7px; margin: 7px 0 9px; padding: 7px 9px;
    border-radius: 10px; background: #eef7ff; border: 1px solid #d9e9f6;
    color: #0d4d7a; font-size: .8rem; font-weight: 800; letter-spacing: .01em;
}
.fh-pin-pop__coord > i { color: #0f7db2; }
.fh-copy {
    margin-left: auto; padding: 3px 8px; border-radius: 8px; cursor: pointer;
    border: 1px solid #d9e9f6; background: #fff; color: #0d4d7a; font-size: .74rem;
}
.fh-copy:hover { background: #e0f0ff; }
.fh-pin-pop__acts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.fh-nav {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 12px; border-radius: 11px; font-size: .82rem; font-weight: 800;
    text-decoration: none !important; color: #fff !important;
    background: linear-gradient(120deg, #0f7db2, #0d4d7a);
    box-shadow: 0 6px 14px rgba(13, 77, 122, .22);
}
.fh-nav--ghost { color: #0d4d7a !important; background: #eef7ff; border: 1px solid #d9e9f6; box-shadow: none; }
.fh-nav:hover { filter: brightness(1.07); }
.fh-pop-warn { margin-top: 7px; padding: 6px 9px; border-radius: 9px; background: #fff5e5; color: #8a5a00; font-weight: 800; font-size: .76rem; }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 16px 34px rgba(6, 26, 40, .3); }
.fh-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fh-legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: #47617a; }
.fh-legend__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .22); }
.fh-legend__sq { width: 13px; height: 13px; border-radius: 4px; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .22); }
/* ตัวครอบคำอธิบายจุดสนับสนุน (สร้างจากข้อมูลจริงด้วย FH_SUPPORT.legendHtml) */
.fh-sup-lgwrap { display: contents; }
/* รายการคำอธิบายสัญลักษณ์แบบชิป (หน้าแรก) */
.fh-sup-lg { display: inline-flex; align-items: center; gap: 6px; }
.fh-sup-lg__sw { width: 11px; height: 11px; border-radius: 50%; flex: none; }

/* ---------- อื่น ๆ ---------- */
.fh-empty { padding: 26px; text-align: center; color: var(--fh-muted); font-weight: 700; }
.fh-note { padding: 12px 15px; border-radius: 13px; font-weight: 700; font-size: .84rem; }
.fh-note--info { background: #eefcff; color: #10506e; border-left: 5px solid #17a2b8; }
.fh-note--warn { background: #fff7e8; color: #8a5a00; border-left: 5px solid #eab308; }
.fh-note--danger { background: #fff1f1; color: #7b1d1d; border-left: 5px solid #d9534f; }
.fh-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.fh-step {
    display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 13px;
    background: #fff; border: 1px solid var(--fh-line); font-weight: 700; font-size: .84rem; color: #3d5567;
    box-shadow: 0 5px 12px rgba(13, 77, 122, .06);
}
.fh-step b { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px; color: #fff; font-size: .76rem; background: linear-gradient(135deg, #0f7db2, #0d4d7a); }

@media (max-width: 767.98px) {
    .fh-card__body { padding: 16px 14px 22px; }
    .fh-map { height: 340px; }
    .fh-modal { width: 96vw; }
}

/* ============================================================================
   ระบายสีพื้นที่อำเภอที่มีหมุด (ใช้ร่วมกับ js/flood_area_shading.js)
   ============================================================================ */
/* พื้นที่อำเภอที่มีหมุดวิกฤต → เส้นขอบกระพริบเบา ๆ ให้ดูฉุกเฉิน
   (animation ชนะ inline style ของ Leaflet ในลำดับ cascade) */
path.leaflet-interactive.fh-area--critical {
    animation: fhAreaBlink 2.1s ease-in-out infinite;
}
@keyframes fhAreaBlink {
    0%, 100% { fill-opacity: .34; stroke-width: 3; }
    50%      { fill-opacity: .17; stroke-width: 2.2; }
}

/* ป้ายชื่ออำเภอบนแผนที่ (กึ่งกลางกลุ่มหมุด) */
.fh-area-lb-wrap { width: 0 !important; height: 0 !important; background: none; border: 0; }
.fh-area-lb {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 5px 11px 6px; border-radius: 13px; white-space: nowrap;
    background: rgba(255, 255, 255, .95);
    font-family: 'Prompt', 'Sarabun', 'Tahoma', sans-serif;
    box-shadow: 0 8px 18px -8px rgba(9, 38, 56, .55), 0 0 0 1px rgba(255, 255, 255, .8) inset;
    pointer-events: none;
}
.fh-area-lb b { font-size: .82rem; font-weight: 800; line-height: 1.2; color: #12303f; }
.fh-area-lb span { font-size: .68rem; font-weight: 700; line-height: 1.3; color: #5d7488; }
.fh-area-lb--critical { border: 2px solid #d32f2f; box-shadow: 0 10px 22px -8px rgba(183, 28, 28, .7); }
.fh-area-lb--critical b { color: #b71c1c; }
.fh-area-lb--critical span { color: #c62828; }
.fh-area-lb--urgent { border: 2px solid #ef6c00; }
.fh-area-lb--urgent b { color: #bf360c; }
.fh-area-lb--urgent span { color: #e65100; }
.fh-area-lb--normal { border: 2px solid #0288a8; }
.fh-area-lb--normal b { color: #0b5f78; }

/* tooltip ของพื้นที่ */
.fh-area-tip {
    font-family: 'Prompt', 'Sarabun', 'Tahoma', sans-serif;
    display: flex; flex-direction: column; gap: 2px; padding: 2px 3px; text-align: left;
}
.fh-area-tip b { font-size: .86rem; font-weight: 800; color: #12303f; }
.fh-area-tip span { font-size: .74rem; font-weight: 600; color: #4c6274; }
.leaflet-tooltip.fh-area-tip-box { border-radius: 12px; border: 0; padding: 7px 10px; box-shadow: 0 10px 24px -10px rgba(9, 38, 56, .6); }

/* ปุ่มเปิด/ปิดการระบายสีพื้นที่ (อยู่ในแผงคำอธิบายสัญลักษณ์) */
.fh-legend__tog {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
    border-radius: 999px; border: 1.5px solid #cfe3f0; background: #f4f9fc;
    font-family: 'Prompt', 'Sarabun', 'Tahoma', sans-serif;
    font-size: .78rem; font-weight: 800; color: #7d94a8; cursor: pointer; transition: .18s ease;
}
.fh-legend__tog .fh-legend__sw {
    position: relative; width: 34px; height: 19px; border-radius: 999px;
    background: #c9d9e4; transition: .18s ease;
}
.fh-legend__tog .fh-legend__sw::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: .18s ease;
}
.fh-legend__tog.on { color: #0b5f78; border-color: #7fd0e6; background: #eaf8fd; }
.fh-legend__tog.on .fh-legend__sw { background: linear-gradient(100deg, #0f7db2, #1292a9); }
.fh-legend__tog.on .fh-legend__sw::after { left: 17px; }
.fh-legend__tog:hover { border-color: #7fd0e6; }

@media (prefers-reduced-motion: reduce) {
    path.leaflet-interactive.fh-area--critical { animation: none; }
}
@media print {
    .fh-filters, .fh-btn, .fh-act { display: none !important; }
    .fh-card { box-shadow: none; }
}
