/* R209 FF Maps. Scoped to its own stage, leaves the existing GPS, TX and RX interfaces unchanged. */
.ffmap-root{color:#e8f2ff;font-size:13px;line-height:1.5}
.ffmap-root .ffhub-stage-title{margin-bottom:13px}
.ffmap-actions,.ffmap-export-buttons,.ffmap-edit-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ffmap-actions{margin:0 0 13px}
.ffmap-file-label{cursor:pointer}
.ffmap-guest-note,.ffmap-connection-note,.ffmap-info{color:#a6bdd9;font-size:12px;line-height:1.55;margin:9px 0}
.ffmap-layout{display:grid;grid-template-columns:minmax(240px,290px) minmax(0,1fr);gap:12px;align-items:start}
.ffmap-side,.ffmap-main{background:#0a1729;border:1px solid #2a4467;border-radius:12px;padding:11px;min-width:0}
.ffmap-side>label{display:block;font-size:12px;font-weight:650;color:#b9cde6;margin:0 0 12px}
.ffmap-side select,.ffmap-side input{display:block;width:100%;min-width:0;box-sizing:border-box;background:#101f35;color:#f5f8ff;border:1px solid #375377;border-radius:7px;font-size:14px;padding:9px;margin-top:4px}
.ffmap-side select:focus,.ffmap-side input:focus{outline:2px solid #4ca4ff;outline-offset:1px}
.ffmap-selected-status{font-weight:750;color:#aebdce;margin:4px 0 12px}
.ffmap-selected-status.saved{color:#5be6a1}
.ffmap-edit-buttons .ffhub-btn{flex:1 1 110px}
.ffmap-point-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;max-height:190px;overflow:auto}
.ffmap-point-chip{border:1px solid #335375;border-radius:9px;background:#0c2038;color:#c7d9ef;padding:6px 9px;cursor:pointer;font-size:11px}
.ffmap-point-chip.selected{border-color:#46a9ff;color:white;background:#174677}
.ffmap-main{padding:9px}
.ffmap-map{height:470px;min-height:340px;position:relative;overflow:hidden;background:#0b1f30;touch-action:none;user-select:none;border:1px solid #365476;border-radius:9px;cursor:grab;isolation:isolate;overscroll-behavior:contain}
.ffmap-map:before{content:'Map tiles require an internet connection';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#93a9c3;font-size:13px;z-index:0;pointer-events:none}
.ffmap-tiles,.ffmap-markers{position:absolute;inset:0;pointer-events:none}
.ffmap-tiles img{position:absolute;width:256px;height:256px;max-width:none!important;min-width:256px!important;pointer-events:none;user-select:none}
.ffmap-markers{z-index:2}
.ffmap-marker{position:absolute;pointer-events:auto;transform:translate(-50%,-100%);border:2px solid #fff;background:#2679d1;color:white;border-radius:50% 50% 50% 4px;min-width:30px;height:33px;font-size:12px;font-weight:850;cursor:pointer;box-shadow:0 2px 8px #051b30c7;z-index:2}
.ffmap-marker.home{background:#138c54}
.ffmap-marker.selected{outline:3px solid #f4b541;z-index:3}
.ffmap-zoom{position:absolute;right:10px;top:10px;display:grid;gap:3px;z-index:4}
.ffmap-zoom button{width:34px;height:35px;cursor:pointer;border:1px solid #7e9aa8;border-radius:5px;background:white;color:#14283f;font-weight:bold;font-size:22px;line-height:1}
.ffmap-coord{position:absolute;top:10px;left:10px;z-index:4;background:#0b192dde;color:#e1edff;padding:5px 8px;border-radius:5px;font-size:11px;pointer-events:none}
.ffmap-attribution{position:absolute;z-index:4;right:4px;bottom:4px;padding:1px 5px;background:#ffffffe8;border-radius:3px;color:#333;font-size:10px;pointer-events:auto}
.ffmap-attribution a{color:#1463a4;text-decoration:underline}
.ffmap-bottom{display:flex;justify-content:space-between;align-items:center;gap:9px;flex-wrap:wrap;margin-top:10px}
.ffmap-stats{color:#b0c8e3;font-size:12px}
.ffmap-lab{border-top:1px solid #2a4467;margin-top:12px;padding-top:10px;color:#aebfda}
.ffmap-lab summary{cursor:pointer;color:#bdcfee;font-weight:650}
.ffmap-lab p{font-size:12px;max-width:720px}
.ffmap-message{min-height:34px;background:#0e2842;border:1px solid #255175;border-radius:7px;margin:12px 0 4px;padding:8px 11px;color:#bfe2ff}
.ffmap-message.is-error{color:#ffb1bc;border-color:#92384e;background:#32131d}
.ffmap-connection-note{margin:9px 0 0}
@media(max-width:760px){.ffmap-layout{grid-template-columns:1fr}.ffmap-map{height:400px}.ffmap-side{order:2}.ffmap-main{order:1}.ffmap-actions .ffhub-btn{font-size:12px}}

.ffmap-map.is-dragging{cursor:grabbing}
.ffmap-tiles img{transition:none!important;animation:none!important;-webkit-user-drag:none}

/* R210: one retained canvas; remote tile downloads never blank the existing view. */
.ffmap-tiles{z-index:1;overflow:hidden;contain:paint}
.ffmap-tile-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;display:block}

.ffmap-device-sync{display:flex;align-items:center;gap:7px;flex-wrap:wrap;border:1px solid #365477;border-radius:9px;padding:10px;margin:0 0 12px;background:#0b1b2e}
.ffmap-sync-label{color:#e2efff;font-weight:700;margin-right:5px}
.ffmap-usb-status{flex:1 1 220px;font-size:12px;color:#b5cee7}
.ffmap-device-sync button:disabled{opacity:.48;cursor:not-allowed}

.ffmap-admin-backup{margin-top:12px;padding:10px 12px;border:1px solid #35536d;border-radius:8px;color:#c0d1e6;font-size:12px}
.ffmap-admin-backup summary{cursor:pointer;font-weight:650}
.ffmap-admin-backup p{margin:8px 0}

/* R211: backup-first USB point transfer (only on compatible running application). */
.ffmap-device-sync .ffmap-usb-backup:not(:disabled){border-color:#5383ba}

/* R212 · lab-only physical read-back compare, not shown to customers. */
.ffmap-admin-verify-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.ffmap-admin-result{border:1px solid #365477;background:#10233b;padding:9px;border-radius:6px;white-space:normal;overflow-wrap:anywhere}
.ffmap-admin-report:disabled{opacity:.5;cursor:not-allowed}

/* R228 — read-only WebHID VID/PID diagnostics, visible only to WP administrator. */
.ffmap-usb-diagnostics-output{white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow-y:auto;margin:8px 0;padding:10px;border:1px solid rgba(120,145,170,.3);border-radius:6px;font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;}

/* R240: compact Maps controls, diagnostics collapsed for administrators. */
.ffmap-device-sync{gap:8px;padding:10px 12px;align-items:center}
.ffmap-usb-status{flex:1 1 230px;min-width:150px}
.ffmap-device-sync .ffmap-admin-debug{flex:1 0 100%;border-top:1px solid #274463;padding-top:6px;font-size:11px;color:#90abc8}
.ffmap-admin-debug summary{cursor:pointer;width:max-content;color:#8eafcf}
.ffmap-admin-debug button{margin-top:8px}
.ffmap-admin-debug .ffmap-lab-usb-status{display:block;margin-top:6px}
.ffmap-export-buttons{justify-content:flex-end}
.ffmap-export-buttons .ffmap-file-label{display:inline-flex;align-items:center;justify-content:center}
@media(max-width:760px){.ffmap-device-sync .ffmap-usb-status{flex-basis:100%;order:4}.ffmap-export-buttons{justify-content:flex-start}}

/* R241: four point file actions fit within the 430px map panel. */
.ffmap-root .ffmap-bottom{align-items:stretch;flex-direction:column;gap:7px}
.ffmap-root .ffmap-export-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px;justify-content:stretch;flex-wrap:nowrap}
.ffmap-root .ffmap-export-buttons>.ffhub-btn,
.ffmap-root .ffmap-export-buttons>.ffmap-file-label{display:inline-flex;justify-content:center;align-items:center;min-width:0;width:100%;box-sizing:border-box;padding:7px 2px!important;font-size:11px!important;white-space:nowrap;line-height:1.2;text-align:center}
@media(max-width:380px){.ffmap-root .ffmap-export-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* R243: customer Maps only: no diagnostics or lab backup surfaces. */
.ffmap-root .ffmap-connection-note{margin-top:3px;font-size:11px;opacity:.80}
.ffmap-root .ffmap-device-sync .ffmap-usb-status{font-size:12px;line-height:1.45}
.ffmap-root .ffmap-device-sync .ffmap-usb-write{white-space:nowrap}

/* R244: one compact basemap switch; zoom/drag and GPS markers stay in place. */
.ffmap-map-style{position:absolute;top:45px;left:9px;z-index:5;display:inline-flex;gap:2px;padding:3px;border-radius:7px;background:#0d1e33ea;border:1px solid #365579;box-shadow:0 2px 7px #0a142c66}
.ffmap-map-style .ffmap-style-button{appearance:none;border:0;border-radius:5px;padding:6px 8px;min-width:0;font-weight:650;font-size:11px;line-height:1.25;font-family:inherit;cursor:pointer;background:transparent;color:#e2efff;white-space:nowrap}
.ffmap-map-style .ffmap-style-button[aria-pressed="true"]{background:#2166bc;color:white}
.ffmap-map-style .ffmap-style-button:focus-visible{outline:2px solid #9dcfff;outline-offset:1px}
.ffmap-attribution{max-width:calc(100% - 10px);line-height:1.15;text-align:right}
@media(max-width:420px){.ffmap-map-style{left:6px;top:42px}.ffmap-map-style .ffmap-style-button{padding:5px 6px;font-size:10px}}

/* R247: single-click color selection after Select spots; Import spots beside it. */
.ffmap-coordinate-share{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:9px 0 4px}
.ffmap-coordinate-share .ffhub-btn{flex:1 1 116px;min-width:0;padding:7px 5px!important;font-size:11px!important}
.ffmap-share-toolbar{display:grid;gap:8px;border-top:1px solid #314e70;margin-top:12px;padding-top:10px}
.ffmap-share-buttons,.ffmap-share-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.ffmap-share-buttons>.ffhub-btn,.ffmap-share-buttons>.ffmap-file-label{display:inline-flex;align-items:center;justify-content:center;flex:1 1 110px;min-width:0;box-sizing:border-box}
.ffmap-share-toolbar .ffhub-btn,.ffmap-share-toolbar .ffmap-file-label{font-size:12px!important;padding:8px 10px!important;line-height:1.35;cursor:pointer}
.ffmap-share-select[aria-pressed="true"]{background:#2368bf!important;color:#fff!important;border-color:#68b5ff!important}
.ffmap-share-count{font-weight:650;color:#c7dff8;margin-right:auto;font-size:12px}
.ffmap-share-actions .ffmap-share-export{flex:1 1 125px}
.ffmap-share-actions .ffmap-share-clear{flex:0 0 auto}
.ffmap-share-export:disabled,.ffmap-share-clear:disabled{opacity:.5;cursor:not-allowed}
.ffmap-point-chip.share-selected{background:#0c8c9b!important;border-color:#76f5f1!important;color:#fff!important;box-shadow:0 0 0 2px rgba(64,226,225,.24) inset}
.ffmap-marker.share-selected{background:#067e91!important;border-color:#8bf9ee!important;outline:3px solid #56e2d8;z-index:5}
.ffmap-selecting-spots .ffmap-point-chip,.ffmap-selecting-spots .ffmap-marker{cursor:pointer}
.ffmap-import-hint{margin:7px 0 1px;color:#a6bdd9;font-size:11px;line-height:1.5}
@media(max-width:380px){.ffmap-share-toolbar .ffhub-btn,.ffmap-share-toolbar .ffmap-file-label{font-size:11px!important;padding:8px 5px!important}}

.ffmap-share-import input[type="file"][hidden]{display:none!important}
