/* Vista normal conservada; modo amplio solo al solicitarlo. */
.ap-map-actions{display:flex;justify-content:flex-end;margin:0 0 10px}
#ampliar-mapa{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1px solid #bad9da;border-radius:10px;background:#e9f6f4;color:#075d62;font:650 14px/1.3 system-ui,sans-serif;cursor:pointer}
#ampliar-mapa:hover{background:#d6eeeb}#ampliar-mapa:focus-visible{outline:3px solid #075d62;outline-offset:3px}
html.ap-map-expanded #map,html.ap-embedded.ap-map-expanded #map{height:clamp(420px,70dvh,1000px)!important}
html.ap-map-expanded .unit>small,html.ap-map-expanded .unit>.ap-carab-call{display:none!important}
html.ap-map-expanded .unit{padding:12px 14px}
html.ap-map-expanded .unit>strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
html.ap-map-expanded .unit .ap-carab-focus,html.ap-map-expanded .unit>a:not(.ap-carab-call){min-height:40px;margin-top:9px}
/* Popup más ancho, con desplazamiento interno solo si falta altura. */
#map .leaflet-popup.ap-carab-popup .leaflet-popup-content{width:min(420px,calc(100vw - 86px))!important;min-width:0!important;max-width:none!important;padding:14px 16px!important;max-height:var(--ap-map-popup-height,320px);overflow-y:auto;overscroll-behavior:contain}
#map .ap-carab-popup-card{gap:6px}
#map .ap-carab-popup-title{font-size:15px;line-height:1.35}
#map .ap-carab-popup-meta,#map .ap-carab-popup-phone{font-size:12px;line-height:1.4}
#map .ap-carab-popup-card .ap-carab-fuente,#map .ap-carab-popup-card .ap-carab-aviso{font-size:11px;line-height:1.45;overflow-wrap:anywhere}
#map .ap-carab-popup-card .ap-carab-call,#map .ap-carab-popup-card .ap-carab-popup-location{min-height:40px;font-size:12px}
@media(max-width:700px){html.ap-map-expanded #map,html.ap-embedded.ap-map-expanded #map{height:66dvh!important;min-height:360px!important}#map .leaflet-popup.ap-carab-popup .leaflet-popup-content{padding:12px!important;width:min(420px,calc(100vw - 100px))!important}}

/* En modo amplio, resultados visibles junto al mapa y controles compactos. */
@media(min-width:901px){
html.ap-map-expanded main{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"tools actions" "map results";gap:12px;align-items:start}
html.ap-map-expanded .tools{grid-area:tools;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:10px 12px;gap:5px 10px;margin:0;box-shadow:none}
html.ap-map-expanded .tools label{font-size:12px;gap:3px;min-width:0}
html.ap-map-expanded .tools select,html.ap-map-expanded .tools input{min-height:36px;padding:5px 8px;width:100%;font-size:13px}
html.ap-map-expanded .tools #estado{grid-column:1/-1;font-size:11px;line-height:1.35}
html.ap-map-expanded .ap-map-actions{grid-area:actions;align-self:center;margin:0}
html.ap-map-expanded #ampliar-mapa{width:100%;font-size:13px}
html.ap-map-expanded #map,html.ap-embedded.ap-map-expanded #map{grid-area:map;height:max(340px,calc(100dvh - 138px))!important;min-width:0}
html.ap-map-expanded .results{grid-area:results;margin:0;max-height:max(340px,calc(100dvh - 138px));overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 4px 8px 0!important}
html.ap-map-expanded .results h2{margin:0 0 9px;padding:6px 0;font-size:14px}
html.ap-map-expanded .cards{grid-template-columns:1fr;gap:8px}
html.ap-map-expanded .unit{padding:10px 12px}
html.ap-map-expanded .unit .ap-carab-focus,html.ap-map-expanded .unit>a:not(.ap-carab-call){font-size:12px;min-height:40px}
html.ap-map-expanded .unit .ap-carab-focus{margin-right:8px}
html.ap-map-expanded #map .leaflet-popup.ap-carab-popup .leaflet-popup-content{width:min(420px,calc(100vw - 440px))!important}
}
@media(max-width:900px){html.ap-map-expanded .tools{padding:10px;gap:6px}html.ap-map-expanded .tools label{font-size:12px;gap:3px}html.ap-map-expanded .tools select,html.ap-map-expanded .tools input{min-height:38px;padding:6px 8px;font-size:14px}html.ap-map-expanded .tools #estado{font-size:11px;line-height:1.4}html.ap-map-expanded .ap-map-actions{margin:0 0 8px}html.ap-map-expanded #map,html.ap-embedded.ap-map-expanded #map{height:50dvh!important;min-height:340px!important}}

#mostrar-filtros{display:none;min-height:44px;padding:8px 14px;border:1px solid #bad9da;border-radius:10px;background:white;color:#075d62;font:600 13px system-ui;cursor:pointer}
html.ap-map-expanded #mostrar-filtros{display:inline-flex;align-items:center;justify-content:center}
html.ap-map-expanded .ap-map-actions{gap:8px}
html.ap-map-expanded:not(.ap-map-show-filters) .tools{display:none!important}
html.ap-map-expanded:not(.ap-embedded) body>header{padding:8px 16px}
html.ap-map-expanded:not(.ap-embedded) body>header h1{font-size:16px;margin:2px 0}
html.ap-map-expanded:not(.ap-embedded) body>header p,html.ap-map-expanded:not(.ap-embedded) body>header .back{display:none}
@media(min-width:901px){html.ap-map-expanded:not(.ap-map-show-filters) main{grid-template-areas:"actions actions" "map results"}html.ap-map-expanded:not(.ap-map-show-filters) #map,html.ap-embedded.ap-map-expanded:not(.ap-map-show-filters) #map{height:max(340px,calc(100dvh - 78px))!important}html.ap-map-expanded:not(.ap-map-show-filters) .results{max-height:max(340px,calc(100dvh - 78px))}html.ap-map-expanded .ap-map-actions{justify-content:flex-end}html.ap-map-expanded #ampliar-mapa{width:auto}}

/* Detalle voluntario en tarjetas de la vista ampliada. */
.unit .ap-unit-more,.unit .ap-unit-extra{display:none}
html.ap-map-expanded .unit .ap-unit-more{display:block;width:100%;min-height:40px;margin:10px 0 0;padding:8px 10px;border:1px solid #cfdee3;border-radius:8px;background:#f3f8fa;color:#195467;font:650 12px/1.3 system-ui;cursor:pointer}
html.ap-map-expanded .unit .ap-unit-more:hover{background:#e3f0f2}
html.ap-map-expanded .unit .ap-unit-more:focus-visible{outline:3px solid #086f71;outline-offset:2px}
html.ap-map-expanded .unit.ap-unit-open>small{display:block!important;margin-top:6px}
html.ap-map-expanded .unit.ap-unit-open>.ap-carab-call{display:inline-flex!important}
html.ap-map-expanded .unit.ap-unit-open{background:#fafffe;border-color:#9bc8c5}
html.ap-map-expanded .unit.ap-unit-open .ap-unit-extra{padding-top:8px;border-top:1px solid #dbe8e9;font-size:11px;line-height:1.5}
html.ap-map-expanded .unit.ap-unit-open .ap-carab-contact-status{font-size:11px;line-height:1.4}

/* Ver más discreto: conserva semántica de botón y acceso por teclado. */
html.ap-map-expanded .unit .ap-unit-more{display:block;width:fit-content;min-height:24px;margin:5px 0 0;padding:2px 0;border:0;border-radius:3px;background:transparent;color:#426b77;font:600 11px/1.4 system-ui,sans-serif;text-align:left;text-decoration:underline;text-underline-offset:3px}
html.ap-map-expanded .unit .ap-unit-more:hover{background:transparent;color:#075d62}
html.ap-map-expanded .unit .ap-unit-more:focus-visible{outline:2px solid #086f71;outline-offset:3px}

/* Acción discreta en la esquina superior derecha, sin fila adicional. */
html.ap-map-expanded .unit{position:relative}
html.ap-map-expanded .unit>strong{padding-right:68px;min-height:24px}
html.ap-map-expanded .unit .ap-unit-more{position:absolute;top:9px;right:12px;margin:0;min-height:24px;padding:2px 0;font-size:11px;white-space:nowrap}
