/* The map owns the workspace surface; its controls float above the geography. */
main#main.map-workspace { flex: none; height: calc(100dvh - var(--ribbon-height)); min-height: 300px; padding: 0; position: relative; }
[data-field-map] { height: 72dvh; min-height: 300px; position: relative; }
.map-surface { container-type:inline-size; position: relative; isolation: isolate; width: 100%; height: 100%; overflow: hidden; background: #245B73 url('/map-water.svg') repeat; }
.map-surface .map-canvas { position: absolute; inset: 0; z-index: 0; background: #245B73 url('/map-water.svg') repeat; font-family: "Segoe UI", Arial, sans-serif; }
.map-zoom-controls, .map-notice { position: absolute; z-index: 2; color: var(--brand-navy); font: 13px/1.4 "Segoe UI", Arial, sans-serif; }
.map-surface button { min-height: 36px; padding: 7px 12px; font-weight: 600; }
.map-surface button:focus-visible { outline: 3px solid var(--brand-navy); outline-offset: -3px; }
.map-surface button:disabled { opacity: .5; cursor: default; }
.map-zoom-controls { bottom: 28px; right: 14px; display: flex; align-items: flex-end; gap: 8px; }
.map-zoom-controls > button, .map-zoom-pair { border: 1px solid #63778B; border-radius: 6px; background: var(--brand-ivory); box-shadow: 0 2px 6px #12345726; }
.map-zoom-pair { display: grid; overflow: hidden; }
.map-zoom-pair button { width: 38px; height: 38px; padding: 0; font-size: 23px; font-weight: 400; }
.map-zoom-pair button + button { border-top: 1px solid #63778B; }
.map-notice { top: 14px; left: 52px; max-width: min(360px,calc(100% - 66px)); display: flex; align-items: center; gap: 6px; padding: 2px 3px 2px 12px; border: 1px solid #718096; border-radius: 6px; background: #FAF8F4F5; box-shadow: 0 2px 6px #1234571A; }
.map-notice button { min-width: 30px; padding: 5px; font-size: 20px; font-weight: 400; }
.map-notifications { position: absolute; z-index: 500; left: 52px; bottom: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: min(400px, calc(100% - 265px)); max-height: calc(100% - 110px); overflow: auto; }
.map-status { display: flex; flex: none; max-width: 100%; flex-wrap: wrap; align-items: center; color: var(--brand-navy); font-size: 13px; gap: 10px; padding: 9px 12px; border: 1px solid #63778B; border-radius: 6px; background: #FAF8F4F5; }
.map-status-error { border-color: #A34B39; }
.map-status button { border: 1px solid #63778B; border-radius: 5px; background: white; }
.map-surface [hidden] { display: none; }
.map-surface .leaflet-control-attribution { background: #FAF8F4ED; color: #34485E; font-size: 10px; margin: 0; padding: 2px 6px; }
.map-surface .leaflet-control-attribution a { color: #123457; }
.map-canvas:focus-visible { outline: 3px solid var(--brand-gold-dark); outline-offset: -3px; }
.map-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .map-notifications { left: 14px; bottom: 88px; width: min(400px, calc(100% - 78px)); max-height: calc(100% - 167px); }
}

.map-filters { display:flex; flex-direction:column; align-items:flex-end; gap:6px; position:absolute; z-index:600; top:12px; right:14px; color:#123457; font:13px/1.4 "Segoe UI",sans-serif; }
.map-filter-trigger { display:flex; align-items:center; gap:7px; border:1px solid #63778B; border-radius:5px; background:#FAF8F4; box-shadow:0 2px 6px #12345726; color:#123457; }
.map-filter-panel { position:absolute; top:calc(100% + 7px); right:0; width:min(280px,calc(100vw - 80px)); width:min(280px,calc(100cqw - 28px)); max-height:calc(100dvh - 150px); overflow:auto; border:1px solid #63778B; border-radius:6px; background:#FAF8F4; box-shadow:0 5px 18px #12345733; }
.map-filter-panel button { color:#123457; font:inherit; cursor:pointer; }
.map-filter-row { display:grid; grid-template-columns:minmax(0,1fr) 12px; align-items:center; gap:6px; width:100%; min-height:36px; padding:8px 10px; text-align:left; border-bottom:1px solid #d7dce1; }
.map-filter-row > span:first-child { font-weight:600; }
.map-filter-panel header { display:flex; align-items:center; gap:4px; padding:4px; border-bottom:1px solid #d7dce1; }
.map-filter-panel header button { font-size:20px; }
.map-filter-options { padding:4px; max-height:55dvh; overflow:auto; }
.map-filter-option { display:block; width:100%; text-align:left; border-radius:4px; padding:7px 8px; }
.map-filter-option[aria-pressed=true] { background:#e0e9e7; font-weight:600; }
.map-filter-panel button:hover, .map-contract-option:hover { background:#e8edef; }
.map-contract-option { display:flex; align-items:center; gap:9px; padding:6px 10px; min-height:36px; border-radius:4px; cursor:pointer; }
.map-contract-option input { width:17px; height:17px; accent-color:#123457; }
.map-specific-date { display:grid; gap:6px; padding:10px; }
.map-specific-date input { min-height:36px; width:100%; border:1px solid #63778B; border-radius:4px; padding:6px; background:white; color:#123457; font:inherit; }
.map-filter-empty { padding:8px 10px; color:#40576b; }
.map-filter-panel footer { display:grid; gap:5px; padding:8px 10px; border-top:1px solid #b5bec8; }
.map-filter-panel footer button { justify-self:start; padding:4px 8px; min-height:32px; border:1px solid #63778B; border-radius:4px; background:white; font-size:12px; }
.map-filter-panel [data-map-count] { font-size:11px; color:#40576b; }
.map-location-actions { display:grid; gap:7px; }
.map-location-actions button { margin-top:8px; }
.map-location-actions [data-map-import-status]:empty { display:none; }
.map-missing { max-width: 100%; flex-shrink: 0; overflow-wrap: anywhere; padding:10px; background:#FAF8F4F5; border:1px solid #63778B; border-radius:5px; color:#123457; font:13px/1.4 "Segoe UI",sans-serif; }
.map-missing summary { cursor:pointer; }
.map-missing [data-map-missing-list] > div { display:grid; grid-template-columns:1fr auto; gap:3px 8px; padding:7px 0; border-bottom:1px solid #b5bec8; }
.map-missing small { grid-row:2; }
.map-missing button { grid-column:2; grid-row:1 / 3; border:1px solid #63778B; border-radius:4px; }
.map-pin { background:none; border:0; }
.map-pin > span { display:flex; align-items:center; justify-content:center; width:100%; height:100%; border:2px solid white; border-radius:50%; background:#123457; color:white; box-shadow:0 1px 5px #0008; font:bold 13px "Segoe UI",sans-serif; }
.map-pin-dot { width:8px; height:8px; background:#c49a58; border-radius:50%; }
.map-pin-cluster > span { background:#95662f; }
.map-route { position:absolute; z-index:610; top:12px; left:56px; color:var(--primary); font:13px/1.45 var(--font-sans); }
.map-route-panel { width:min(320px,calc(100cqw - 70px)); max-height:calc(100dvh - 165px); overflow:auto; margin-top:7px; padding:16px; border:1px solid var(--border); border-radius:var(--radius-card); background:var(--card); box-shadow:var(--shadow-pop); }
.map-route-panel label { display:grid; gap:5px; font-weight:600; }
.map-route-panel input { width:100%; min-height:38px; padding:7px 9px; border:1px solid var(--input); border-radius:var(--radius-control); color:var(--primary); background:var(--card); font:inherit; }
.map-route-results, .map-route-stops, .map-route-summary ul { list-style:none; padding:0; margin:7px 0; }
.map-route-results { max-height:145px; overflow:auto; border:1px solid var(--border); border-radius:var(--radius-control); }
.map-route-results li + li { border-top:1px solid var(--border); }
.map-route-results button { width:100%; text-align:left; }
.map-route-results button:hover, .map-route-stops button:hover { background:var(--muted); }
.map-route-results small { display:block; }
.map-route-unlocated, .map-route-stops li, .map-route-footer, .map-route-summary li { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.map-route-unlocated { padding:0 7px; }
.map-route-unlocated button { width:auto; }
.map-route-stops li { padding:4px 0; border-bottom:1px solid var(--border); }
.map-route-stops li > span { flex:1; min-width:0; overflow-wrap:anywhere; }
.map-route-stops li > div { display:flex; gap:1px; }
.map-route-stops b { flex:none; display:grid; place-items:center; width:21px; height:21px; border-radius:50%; background:var(--primary); color:var(--primary-foreground); }
.map-surface .map-route-stops button { min-width:36px; min-height:36px; padding:4px; font-size:16px; }
.map-route-footer { flex-wrap:wrap; }
.map-route-footer span, .map-route-credit { color:var(--muted-foreground); font-size:11px; }
.map-route-summary { margin:8px 0; }
.map-route-summary li + li { margin-top:4px; }
.map-route-credit { display:flex; flex-wrap:wrap; gap:3px 7px; }
.map-route-credit a { text-decoration:underline; }
.map-route-pin > span { border-radius:16px; background:var(--primary); }
.map-route :focus-visible { outline:2px solid var(--ring); outline-offset:1px; }
.map-property-popup article + article { margin-top:10px; padding-top:10px; border-top:1px solid #b5bec8; }
.map-property-popup strong { display:block; font-size:15px; color:#123457; }
.map-property-popup .contract-badge { margin:5px 0; }
.map-property-popup button { border:1px solid #63778B; border-radius:4px; background:#FAF8F4; color:#123457; }
.map-property-popup .map-visit-link { display:block; margin-top:7px; text-align:left; width:100%; font-size:12px; }
.map-visit-link small { display:block; }
.map-pin:focus-visible { outline:3px solid #c49a58; outline-offset:3px; border-radius:50%; }
.map-filters :focus-visible, .map-missing :focus-visible { outline:3px solid #123457; outline-offset:1px; }

.map-filter-badges { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; width:max-content; max-width:min(330px,calc(100cqw - 28px)); }
.map-surface .map-filter-badge { display:flex; align-items:center; gap:8px; min-height:27px; max-width:100%; padding:4px 7px; border:1px solid #63778B; border-radius:5px; background:#FAF8F4; color:#123457; box-shadow:0 1px 3px #12345726; font:12px/1.3 "Segoe UI",sans-serif; cursor:pointer; }
.map-filter-badge > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.map-filter-badge > span:last-child { flex:none; font-size:16px; line-height:1; }
