#mapa-firm.cm2{display:grid;grid-template-columns:minmax(300px,35%) minmax(0,1fr);gap:16px;align-items:start;margin:24px 0}
#mapa-firm.cm2 .explorer-list{max-height:850px;overflow:auto;padding:18px;background:#fff;border:1px solid #dbe4ed;border-radius:16px}
#mapa-firm.cm2 .explorer-map{position:sticky;top:16px;min-width:0;padding:12px;background:#fff;border:1px solid #dbe4ed;border-radius:16px}
#mapa-firm.cm2 .map-canvas{height:680px;min-height:400px;border-radius:12px}
#mapa-firm.cm2 .why-panel{grid-column:1/-1}
.cm2-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.cm2-filters label{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600}.cm2-filters input,.cm2-filters select{width:100%;min-width:0;min-height:42px}
.cm2-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.cm2-actions button,.cm2-actions a{min-height:42px;font-size:14px}
.cm2-row{padding:16px 8px;border-bottom:1px solid #dde6ee;border-left:4px solid transparent}.cm2-row.is-selected{border-left-color:#0865bb;background:#edf6ff}.cm2-row h3{margin:0 0 8px;font-size:19px}.cm2-row p{margin:7px 0;font-size:14px}
.cm2-badge{display:inline-block;padding:4px 9px;border-radius:20px;background:#e8ecef;color:#394451;font-size:13px;font-weight:700}.cm2-badge.active{background:#d9f6e8;color:#08643d}
.cm2-select{border:0;background:transparent;color:#073b70;font:inherit;font-weight:700;text-align:left;cursor:pointer;padding:0}.cm2-select:focus-visible{outline:3px solid #267fcc;outline-offset:4px}
.cm2-meta{font-size:13px;color:#4d5e70}.cm2-notice{padding:10px;background:#fff3d2;border-radius:8px}.cm2-mobile{display:none}.cm2-origin{width:20px;height:20px;border:4px solid #fff;background:#0755a5;border-radius:50%;box-shadow:0 0 0 2px #0755a5}.cm2-pin{border:3px solid white;border-radius:50%;background:#6b7280;box-shadow:0 1px 6px #3349}.cm2-pin.active{background:#16824a}
#mapa-firm.cm2 .maplibregl-popup-content{color:#123;max-height:350px;overflow:auto;padding:15px}#mapa-firm.cm2 .maplibregl-popup-content h3{font-size:17px}
@media(max-width:760px){#mapa-firm.cm2{display:flex;flex-direction:column}#mapa-firm.cm2 .explorer-list,#mapa-firm.cm2 .explorer-map{width:100%;max-height:none;position:static}#mapa-firm.cm2 .map-canvas{height:62vh;min-height:350px}.cm2-mobile{display:flex;gap:8px;width:100%}#mapa-firm.cm2[data-view="map"] .explorer-list{display:none}#mapa-firm.cm2[data-view="list"] .explorer-map{display:none}#mapa-firm.cm2 .why-panel{width:100%}}

/* Keep the map in normal flow; contain Leaflet panes below surrounding content. */
#mapa-firm.cm2 .explorer-map{position:relative;top:auto;isolation:isolate;z-index:0;box-sizing:border-box}
#mapa-firm.cm2 .map-canvas{position:relative;height:480px;min-height:300px;max-height:60vh;overflow:hidden;isolation:isolate;z-index:0}
#mapa-firm.cm2 .explorer-list{max-height:740px;min-width:0;box-sizing:border-box}
#mapa-firm.cm2 .why-panel{position:relative;grid-column:1/-1;clear:both;min-width:0;box-sizing:border-box;margin-top:12px;z-index:1}
.cm2-status-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.cm2-status-buttons button{min-height:44px;cursor:pointer}
.cm2-status-buttons button[aria-pressed="true"]{background:#0755a5;color:#fff;border:2px solid #05366a;box-shadow:0 0 0 2px #fff,0 0 0 4px #0755a5}
.cm2-status-buttons button:focus-visible{outline:3px solid #d88500;outline-offset:4px}
.cm2-measurement{padding:10px;background:#edf6ff;border-radius:8px;color:#073b70;font-weight:600;overflow-wrap:anywhere}
.cm2-distance-label{display:block;background:#fff;color:#073b70;border:2px solid #0755a5;border-radius:6px;padding:4px 8px;font-weight:700;white-space:nowrap;pointer-events:none}
@media(max-width:760px){#mapa-firm.cm2 .map-canvas{height:48vh;min-height:280px;max-height:420px}}

/* Visual refinement limited to the company map; keep all existing behaviour. */
#mapa-firm.cm2{box-sizing:border-box;width:calc(100% - 64px);max-width:1336px;margin:24px auto 32px;grid-template-columns:minmax(320px,1fr) minmax(0,1.45fr);gap:20px;align-items:start;color:#123f71}
#mapa-firm.cm2>.explorer-list,#mapa-firm.cm2>.explorer-map{box-sizing:border-box;min-width:0;padding:16px;border:1px solid #e0eaf3;border-radius:12px;background:#fff;box-shadow:0 3px 14px #073b6808}
#mapa-firm.cm2>.explorer-list{max-height:700px;overflow:auto;scrollbar-width:thin;scrollbar-color:#bfd2e5 transparent}
#mapa-firm.cm2>.explorer-map{position:relative;top:auto;isolation:isolate;z-index:0}
#mapa-firm.cm2 h2{font-size:21px;line-height:1.25;letter-spacing:-.02em;color:#083b75;margin:0 0 12px}
#mapa-firm.cm2 .map-canvas{box-sizing:border-box;position:relative;height:420px;min-height:280px;max-height:60vh;width:100%;margin:10px 0 14px;border-radius:10px;border:1px solid #dce8f3;overflow:hidden;isolation:isolate;z-index:0}
#mapa-firm.cm2 .cm2-filters{gap:10px;margin:12px 0}
#mapa-firm.cm2 .cm2-filters label{font-size:12px;line-height:1.4;color:#405973}
#mapa-firm.cm2 .cm2-filters input,#mapa-firm.cm2 .cm2-filters select{box-sizing:border-box;min-height:40px;padding:8px 10px;border:1px solid #d8e5ef;border-radius:8px;background:#f9fcff;color:#123f71;font-size:13px}
#mapa-firm.cm2 .cm2-actions{gap:7px;margin:10px 0}
#mapa-firm.cm2 .cm2-actions .btn{padding:8px 11px;min-height:40px;font-size:12px;line-height:1.4;border-radius:8px}
#mapa-firm.cm2 .cm2-row{border:1px solid #e0eaf3;border-left:3px solid transparent;border-radius:10px;margin:10px 0;padding:13px;background:#fff}
#mapa-firm.cm2 .cm2-row.is-selected{border-left-color:#0865bb;background:#f1f8ff}
#mapa-firm.cm2 .cm2-row h3{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
#mapa-firm.cm2 .cm2-row p{font-size:13px;line-height:1.5;margin:6px 0}
#mapa-firm.cm2 .cm2-badge{font-size:11px;padding:4px 8px}
#mapa-firm.cm2 .cm2-meta,#mapa-firm.cm2 #map-status{font-size:12px;line-height:1.55;color:#587087;margin:8px 0}
#mapa-firm.cm2 .cm2-status-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;padding:0}
#mapa-firm.cm2 .cm2-status-buttons button{padding:9px 13px;min-height:42px;font-size:12px;line-height:1.3;border:1px solid #d8e5ef;border-radius:8px;background:#f4f8fc;color:#264b70;box-shadow:none}
#mapa-firm.cm2 .cm2-status-buttons button[aria-pressed="true"]{background:#083b75;border-color:#083b75;color:#fff;box-shadow:none}
#mapa-firm.cm2 .cm2-status-buttons button[data-company-status="active"][aria-pressed="true"]{background:#14734d;border-color:#14734d}
#mapa-firm.cm2 .cm2-status-buttons button:focus-visible{outline:3px solid #f2b544;outline-offset:3px}
#mapa-firm.cm2 .cm2-measurement{font-size:13px;line-height:1.5;font-weight:600;padding:10px 12px;background:#edf6ff;border:1px solid #dcecf9;border-radius:8px;margin:10px 0;color:#123f71}
#mapa-firm.cm2>.why-panel{box-sizing:border-box;position:relative;grid-column:1/-1;display:grid;grid-template-columns:1fr auto;gap:12px 20px;padding:18px 20px;margin:0;border:1px solid #dce8f3;border-radius:12px;background:#f1f8fd;z-index:0;min-width:0}
#mapa-firm.cm2>.why-panel h2{grid-column:1;margin:0;font-size:19px}
#mapa-firm.cm2>.why-panel ul{grid-column:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:0;padding:0;list-style:none}
#mapa-firm.cm2>.why-panel li{display:flex;align-items:flex-start;gap:8px;min-width:0;margin:0}
#mapa-firm.cm2>.why-panel li>.ui-icon{flex:0 0 22px;width:22px;height:22px;color:#087b9b}
#mapa-firm.cm2>.why-panel b{font-size:12px;line-height:1.4;display:block}
#mapa-firm.cm2>.why-panel p{font-size:12px;line-height:1.45;margin:4px 0 0;color:#587087}
#mapa-firm.cm2>.why-panel>.btn{grid-column:2;grid-row:1/3;align-self:center;position:static;min-height:44px;white-space:normal;text-align:center;margin:0;padding:12px 16px;border-radius:8px;background:#009fa9;font-size:13px}
@media(min-width:1300px){
 #mapa-firm.cm2:has(>.why-panel){grid-template-columns:minmax(320px,1fr) minmax(360px,1.45fr) 220px;gap:18px}
 #mapa-firm.cm2>.why-panel{grid-column:auto;display:block;padding:20px 16px}
 #mapa-firm.cm2>.why-panel h2{margin-bottom:20px}
 #mapa-firm.cm2>.why-panel ul{display:grid;grid-template-columns:1fr;gap:20px}
 #mapa-firm.cm2>.why-panel>.btn{display:block;width:100%;box-sizing:border-box;margin-top:22px}
}
@media(max-width:1000px){
 #mapa-firm.cm2>.why-panel ul{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 #mapa-firm.cm2{width:calc(100% - 32px);margin:18px auto 24px;display:flex;flex-direction:column;gap:12px}
 #mapa-firm.cm2>.explorer-list,#mapa-firm.cm2>.explorer-map{width:100%;padding:14px;max-height:none}
 #mapa-firm.cm2 .map-canvas{height:42vh;min-height:260px;max-height:380px}
 #mapa-firm.cm2 .cm2-mobile{gap:8px}
 #mapa-firm.cm2 .cm2-mobile .btn{flex:1;min-height:44px;border-radius:8px}
 #mapa-firm.cm2 .cm2-mobile [aria-pressed="true"]{background:#083b75;color:#fff}
 #mapa-firm.cm2>.why-panel{display:block;width:100%;padding:16px}
 #mapa-firm.cm2>.why-panel h2{margin-bottom:14px}
 #mapa-firm.cm2>.why-panel ul{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 #mapa-firm.cm2>.why-panel>.btn{display:block;margin-top:16px;box-sizing:border-box;width:100%}
}

/* Empty status regions stay available for dynamic results and errors. */
#mapa-firm #cm2-measurement:empty,#mapa-firm #cm2-route-summary:empty,#mapa-firm #map-status:empty,#mapa-firm #cm2-origin-status:empty{display:none}
#mapa-firm .cm2-sources{margin-top:12px;font-size:12px;color:#526b85}
#mapa-firm .cm2-sources summary{cursor:pointer}
#mapa-firm .cm2-sources small{display:block;margin-top:8px;line-height:1.5}

/* Full page locator. The home map keeps its existing layout. */
#mapa-firm.cm2.cm2-locator{display:flex;flex-direction:column;gap:22px;max-width:1336px}
#mapa-firm.cm2.cm2-locator>.cm2-mobile{display:none}
#mapa-firm.cm2.cm2-locator>.explorer-map,#mapa-firm.cm2.cm2-locator>.explorer-list,#mapa-firm.cm2.cm2-locator>.cm2-locator-controls{display:block;width:100%;max-height:none;overflow:visible;box-sizing:border-box}
#mapa-firm.cm2.cm2-locator>.explorer-map{padding:20px;scroll-margin-top:90px}
#mapa-firm.cm2.cm2-locator .map-canvas{height:510px;max-height:65vh;min-height:320px}
#mapa-firm.cm2.cm2-locator>.explorer-list{border:0;padding:0;background:transparent;box-shadow:none}
#mapa-firm.cm2.cm2-locator>.cm2-locator-controls{padding:24px;border:1px solid #e0eaf3;border-radius:12px;background:#fff;box-shadow:0 3px 14px #073b6808}
#mapa-firm.cm2.cm2-locator [data-place-search]{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(220px,1.5fr) auto;gap:12px;align-items:end}
#mapa-firm.cm2.cm2-locator [data-place-search]>label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
#mapa-firm.cm2.cm2-locator [data-place-search] input,#mapa-firm.cm2.cm2-locator [data-place-search] select{box-sizing:border-box;width:100%;min-height:44px;padding:10px;border:1px solid #d8e5ef;border-radius:8px;background:#f9fcff;color:#123f71}
#mapa-firm.cm2.cm2-locator [data-place-search]>[role=status],#mapa-firm.cm2.cm2-locator [data-place-results]{grid-column:1/-1;margin:0}
#mapa-firm.cm2.cm2-locator [data-place-search]>[role=status]:empty,#mapa-firm.cm2.cm2-locator [data-place-results]:empty{display:none}
#mapa-firm.cm2.cm2-locator .cm2-filters{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
#mapa-firm.cm2.cm2-locator .cm2-filters label[hidden]{display:none}
#mapa-firm.cm2.cm2-locator .cm2-locator-search-actions{display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid #e0eaf3;padding-top:18px;margin-top:16px}
#mapa-firm.cm2.cm2-locator .cm2-search-button{order:2;background:#0755a5;color:#fff;padding:12px 28px;border:0;border-radius:9px;font-weight:700;min-height:46px;cursor:pointer}
#mapa-firm.cm2.cm2-locator .cm2-radius-control{display:grid;grid-template-columns:auto minmax(120px,260px) 90px;align-items:center;gap:16px;font-size:13px;font-weight:600}
#mapa-firm.cm2.cm2-locator .cm2-radius-control input{width:100%;accent-color:#0755a5;min-height:44px;cursor:pointer}
#mapa-firm.cm2.cm2-locator .cm2-radius-control output{font-weight:700;color:#0755a5}
#mapa-firm.cm2.cm2-locator #explorer-company-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
#mapa-firm.cm2.cm2-locator #explorer-company-list>.cm2-row{margin:0;padding:20px;box-shadow:0 3px 14px #073b6808;display:flex;flex-direction:column;align-items:flex-start}
#mapa-firm.cm2.cm2-locator #explorer-company-list .cm2-row h3{font-size:18px}
#mapa-firm.cm2.cm2-locator #explorer-company-list .cm2-row>.cm2-actions{margin-top:auto;padding-top:12px}
#mapa-firm.cm2.cm2-locator #explorer-company-list .cm2-distance{padding:7px 10px;border-radius:7px;background:#e8f3ff;color:#074b8a;font-size:14px;font-weight:700;margin:12px 0}
#mapa-firm.cm2.cm2-locator #company-list-status{font-size:14px;font-weight:600;margin-bottom:18px}
#mapa-firm.cm2.cm2-locator #cm2-more{display:block;margin:22px auto}
#mapa-firm.cm2.cm2-locator #cm2-more[hidden]{display:none}
#mapa-firm.cm2.cm2-locator #cm2-missing{margin:20px 0}
@media(max-width:1000px){
 #mapa-firm.cm2.cm2-locator #explorer-company-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 #mapa-firm.cm2.cm2-locator .cm2-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
 #mapa-firm.cm2.cm2-locator .cm2-radius-control{grid-template-columns:auto minmax(100px,180px);gap:8px}
 #mapa-firm.cm2.cm2-locator .cm2-radius-control output{grid-column:2}
}
@media(max-width:760px){
 #mapa-firm.cm2.cm2-locator{width:calc(100% - 24px);gap:16px}
 #mapa-firm.cm2.cm2-locator>.explorer-map,#mapa-firm.cm2.cm2-locator>.cm2-locator-controls{padding:14px}
 #mapa-firm.cm2.cm2-locator .map-canvas{height:360px;max-height:55vh;min-height:260px}
 #mapa-firm.cm2.cm2-locator [data-place-search]{grid-template-columns:1fr}
 #mapa-firm.cm2.cm2-locator .cm2-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 #mapa-firm.cm2.cm2-locator #explorer-company-list{grid-template-columns:1fr}
 #mapa-firm.cm2.cm2-locator .cm2-locator-search-actions{flex-direction:column;align-items:stretch;gap:12px}
 #mapa-firm.cm2.cm2-locator .cm2-radius-control{grid-template-columns:1fr minmax(100px,1fr) 70px;gap:8px}
 #mapa-firm.cm2.cm2-locator .cm2-radius-control output{grid-column:auto}
 #mapa-firm.cm2.cm2-locator .cm2-search-button{width:100%}
}

/* Recruitment colours are independent of active job counts. */
#mapa-firm.cm2 .cm2-pin{background:#083b75;border:3px solid #fff;box-shadow:0 0 0 1px #083b75,0 2px 7px #17365066}
#mapa-firm.cm2 .cm2-pin.active{background:#facc15;border-color:#fff;box-shadow:0 0 0 1px #9b7400,0 2px 7px #17365066}
#mapa-firm.cm2 .cm2-badge{background:#e7eef8;color:#083b75}
#mapa-firm.cm2 .cm2-badge.active{background:#fff3ac;color:#493900}
#mapa-firm.cm2 .cm2-legend{display:flex;flex-wrap:wrap;gap:10px 20px;margin:12px 0;font-size:12px;font-weight:600;color:#173650}
#mapa-firm.cm2 .cm2-legend>span{display:inline-flex;align-items:center;gap:7px}
#mapa-firm.cm2 .cm2-legend-dot{display:inline-block;width:14px;height:14px;border-radius:50%;background:#083b75;border:1px solid #083b75;box-sizing:border-box}
#mapa-firm.cm2 .cm2-legend-dot.active{background:#facc15;border-color:#9b7400}
#mapa-firm.cm2 .cm2-legend-dot.mixed{background:#083b75;border:3px solid #facc15;box-shadow:0 0 0 1px #9b7400}
