/* Cloudflare UI v1.3: scoped to existing components. */
#modalOverlay{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(16,38,29,.48)}
#modalOverlay .modal{background:#fff;max-height:94vh;max-height:94dvh}
#qrReaderBox{background:#f4f8f5;border:1px solid #c9ded3;border-radius:12px;overflow:hidden}
#qrReader{background:#eef4f0;min-height:80px}
#qrReader video{display:block;width:100%;height:300px;height:min(38dvh,340px);min-height:140px;max-height:340px;object-fit:contain;background:#183d30}
.camera-placeholder{padding:24px 16px;color:#355548;line-height:1.6;margin:0;text-align:center}
#qrMessage{color:#254c3a;line-height:1.5}
#satelliteHelp{max-width:min(92vw,440px);font-size:13px;line-height:1.5}
#satelliteHelp button{margin-top:6px}
.manage-shortcuts{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.release-tag{font-size:11px;color:#577063;white-space:nowrap}
@media(max-width:600px){#qrReader video{height:230px;height:32dvh;min-height:130px}.manage-shortcuts .btn{font-size:12px;padding:8px 10px}}

.gps-status{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#fff;color:#254d38;border:1px solid #c8dbcd;border-radius:10px;box-shadow:0 4px 16px #1b35251a;font-size:13px;line-height:1.5;max-width:360px;z-index:1000}
#mapView>.gps-status{position:absolute;left:12px;bottom:20px;max-width:calc(100% - 78px)}
#mapView{position:relative}
#modalOverlay .gps-status{flex-basis:100%;margin-top:8px;box-shadow:none}
.gps-status button{flex-shrink:0;min-height:36px}
@media(max-width:600px){.gps-status{font-size:12px}#mapView>.gps-status{bottom:20px;left:8px;max-width:calc(100% - 72px)}}

/* Always show location filters; collapsing affects record results only. */
.signed-staff-entry{display:flex;justify-content:flex-end;padding:8px 0}
#streetChoice{width:100%;min-height:44px;border:1px solid #c6d6cc;border-radius:9px;padding:10px;background:#fff;color:#234b37}
#satelliteHelp{max-height:25vh;overflow:auto;font-size:12px;padding:8px 10px}
#satelliteHelp button{display:inline-block;margin:5px 12px 0 0;min-height:32px;font-size:12px}
.mobile-survey-actions{display:none}
@media(max-width:820px){
 body:not(.is-picking) .maplayout{height:auto;min-height:0;display:flex;flex-direction:column}
 body:not(.is-picking) .mapleft,body:not(.is-picking) .mapleft.collapsed{height:auto;max-height:none;flex-shrink:0}
 body:not(.is-picking) .mapleft.collapsed .selectors{display:grid!important}
 body:not(.is-picking) .mapleft .selectors{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 body:not(.is-picking) .mapleft .records{max-height:200px;overflow:auto}
 body:not(.is-picking) .mapleft.collapsed .records{display:none}
 body:not(.is-picking) .maparea{height:52vh;height:52dvh;min-height:320px;flex:none}
 .mobile-survey-actions:not(.hidden){display:flex;position:fixed;bottom:0;left:0;right:0;z-index:1200;gap:8px;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px));background:#fffffff5;border-top:1px solid #d3e1d7;box-shadow:0 -4px 18px #193b2310}
 .mobile-survey-actions .btn{min-height:44px;font-size:13px;text-align:center;text-decoration:none;justify-content:center;flex:1}
 body.workspace-mode[data-role="staff"],body.workspace-mode[data-role="admin"]{padding-bottom:80px}
 body.is-picking .mobile-survey-actions{display:none!important}
 #modalOverlay:not(.hidden)~.mobile-survey-actions{display:none!important}
 .pagehead .actions{width:100%;flex-wrap:wrap}
 #newBtn{width:100%;min-height:46px}
 body.is-picking #satelliteHelp{max-width:calc(100% - 70px);max-height:22vh}
}

/* Keep popup actions reachable in phone WebViews. */
.house-popup .popup-button{min-height:44px;touch-action:manipulation}
.house-popup .leaflet-popup-content{max-width:calc(100vw - 84px);overflow-wrap:anywhere}

.unit-footer{padding:14px 20px;background:#e7f1ee;color:#153c35;font:600 13px system-ui;text-align:center}body.map-pick-mode .unit-footer{display:none}
