/* Astur · puente visual mapa ↔ Centro de Control · v2
   Orden de carga esperado:
   Leaflet / pines → mapa-base.css → tema.php → este archivo.
   No controla pines ni clusters: siguen en su sistema específico. */

.astur-map-themed{
  font-family:var(--font-family,system-ui),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:calc(var(--font-base,18px) - 2px);
  line-height:var(--line-height,1.45);
  color:var(--color-text);
  background:var(--color-background);
}

/* Tipografía */
.astur-map-themed .brand strong,
.astur-map-themed .resultsHead h2,
.astur-map-themed .filterModalHead h3,
.astur-map-themed .filterSection h4,
.astur-map-themed .tuneHead strong{font-weight:var(--heading-weight)}
.astur-map-themed .popupTitle,
.astur-map-themed .cardTitle,
.astur-map-themed .detailTitle{font-weight:var(--item-weight)}
.astur-map-themed .brand small,
.astur-map-themed .resultCountTop,
.astur-map-themed .resultsHead small,
.astur-map-themed .popupLoc,
.astur-map-themed .popupMeta,
.astur-map-themed .cardLoc,
.astur-map-themed .cardMeta,
.astur-map-themed .field label,
.astur-map-themed .zoomLabel,
.astur-map-themed .tuneHead small,
.astur-map-themed .tuneDesc,
.astur-map-themed .tuneHint,
.astur-map-themed .tuneDragHint{color:var(--color-text-muted)}

/* Superficies principales */
.astur-map-themed .header,
.astur-map-themed .filterBar,
.astur-map-themed .results,
.astur-map-themed .resultsHead,
.astur-map-themed .detailHead,
.astur-map-themed .filterModal,
.astur-map-themed .filterModalHead,
.astur-map-themed .filterSection,
.astur-map-themed .modalFoot,
.astur-map-themed .popupCard,
.astur-map-themed .popupBody,
.astur-map-themed .tunePanel,
.astur-map-themed .tuneItem{background:var(--color-surface);color:var(--color-text)}
.astur-map-themed .main{background:var(--color-surface)}
.astur-map-themed .header,
.astur-map-themed .filterBar,
.astur-map-themed .mapShell,
.astur-map-themed .resultsHead,
.astur-map-themed .detailHead,
.astur-map-themed .filterModalHead,
.astur-map-themed .filterSection,
.astur-map-themed .modalFoot,
.astur-map-themed .tuneHead,
.astur-map-themed .tuneFoot{border-color:var(--color-border)}
.astur-map-themed .filterModalWrap{background:var(--color-overlay)}

/* Marca y enlaces */
.astur-map-themed .brandMark{background:var(--color-primary);box-shadow:var(--shadow-control)}
.astur-map-themed .nav{color:var(--color-text)}
.astur-map-themed .nav a:hover,
.astur-map-themed .clearLink,
.astur-map-themed .popupReg,
.astur-map-themed .cardReg,
.astur-map-themed .contactNote,
.astur-map-themed .tuneValue,
.astur-map-themed .tuneStatus{color:var(--color-primary-strong)}

/* Buscador, filtros y controles */
.astur-map-themed .search,
.astur-map-themed .filterChip,
.astur-map-themed .filterButton,
.astur-map-themed .linkBtn,
.astur-map-themed .mapBtn,
.astur-map-themed .action,
.astur-map-themed .choice,
.astur-map-themed .field select,
.astur-map-themed .field input,
.astur-map-themed .modalFoot button,
.astur-map-themed .tuneSmallBtn{
  background:var(--color-surface);
  border-color:var(--color-border);
  color:var(--color-text)
}
.astur-map-themed .search{
  border-width:var(--border-width);
  border-radius:var(--radius-control);
  box-shadow:var(--shadow-control);
  height:var(--control-height-large)
}
.astur-map-themed .search input{color:var(--color-text);background:transparent}
.astur-map-themed .search i{color:var(--color-text-muted)}
.astur-map-themed .filterChip,
.astur-map-themed .filterButton,
.astur-map-themed .linkBtn,
.astur-map-themed .mapBtn,
.astur-map-themed .backBtn,
.astur-map-themed .resultsToggle{border-radius:var(--radius-control)}
.astur-map-themed .filterChip{
  background:var(--color-primary-soft);
  border-color:color-mix(in srgb,var(--color-primary) 35%,var(--color-border))
}
.astur-map-themed .filterButton:hover,
.astur-map-themed .filterChip:hover,
.astur-map-themed .mapBtn:hover,
.astur-map-themed .tuneSmallBtn:hover{border-color:var(--color-primary)}
.astur-map-themed .mapBtn{
  box-shadow:var(--shadow-control);
  background:var(--color-surface-translucent)
}
.astur-map-themed .mapBtn:hover,
.astur-map-themed .suggestion:hover,
.astur-map-themed .tunePreset{background:var(--color-surface-hover)}
.astur-map-themed .valueNote{color:var(--color-primary-strong)}
.astur-map-themed .valueNote i,
.astur-map-themed .choice.active,
.astur-map-themed .pill.green,
.astur-map-themed .moreResults{background:var(--color-primary-soft);color:var(--color-primary-strong)}
.astur-map-themed .choice.active{border-color:var(--color-primary)}
.astur-map-themed .field select:focus,
.astur-map-themed .field input:focus,
.astur-map-themed .search:focus-within{border-color:var(--color-primary);box-shadow:var(--focus-ring)}

/* Popup de Leaflet y ficha */
.astur-map-themed .leaflet-popup-content-wrapper{
  background:var(--color-surface);
  color:var(--color-text);
  border-radius:var(--radius-modal);
  box-shadow:var(--shadow-map)
}
.astur-map-themed .leaflet-popup-tip{background:var(--color-surface)}
.astur-map-themed .leaflet-control-attribution{background:var(--color-surface-translucent)!important;color:var(--color-text-muted)!important}
.astur-map-themed .popupPhoto,
.astur-map-themed .cardImg,
.astur-map-themed .detailHero,
.astur-map-themed .noPhoto{background:var(--soft);color:var(--color-text-muted)}
.astur-map-themed .popupPhoto img,
.astur-map-themed .cardImg img,
.astur-map-themed .detailHero,
.astur-map-themed .detailHero img{border-radius:var(--radius-image)}
.astur-map-themed .pill{border-radius:var(--radius-chip);background:var(--soft);color:var(--color-text)}
.astur-map-themed .action{
  height:var(--control-height-small);
  border-width:var(--border-width);
  border-radius:var(--radius-control)
}
.astur-map-themed .action.primary,
.astur-map-themed .modalFoot .apply{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary)}
.astur-map-themed .action.primary:hover,
.astur-map-themed .modalFoot .apply:hover{background:var(--color-primary-hover);border-color:var(--color-primary-hover)}

/* Listado derecho */
.astur-map-themed .card{
  border-width:var(--border-width);
  border-color:var(--color-border);
  border-radius:var(--radius-card);
  background:var(--color-surface)
}
.astur-map-themed .card:hover,
.astur-map-themed .card.hovered{border-color:var(--color-primary);box-shadow:var(--shadow-card)}
.astur-map-themed .card.selected{border-color:var(--color-primary);box-shadow:var(--focus-ring)}
.astur-map-themed .cardBody{padding:var(--density-pad-card)}
.astur-map-themed .resultsList{gap:var(--density-gap-normal)}
.astur-map-themed .backBtn,
.astur-map-themed .modalClose,
.astur-map-themed .resultsClose,
.astur-map-themed .tuneClose{background:var(--soft);color:var(--color-text)}
.astur-map-themed .moreResults{border-color:var(--color-border);border-radius:var(--radius-control);color:var(--color-primary-strong)}

/* Modal de filtros */
.astur-map-themed .filterModal{border-radius:var(--radius-modal);box-shadow:var(--shadow-detail)}
.astur-map-themed .choice,
.astur-map-themed .field select,
.astur-map-themed .field input,
.astur-map-themed .modalFoot button{
  border-width:var(--border-width);
  border-radius:var(--radius-control);
  min-height:var(--control-height)
}

/* Laboratorio de movimiento del mapa */
.astur-map-themed .tunePanel{border-color:var(--color-border);border-radius:var(--radius-modal);box-shadow:var(--shadow-tools)}
.astur-map-themed .tuneHead,
.astur-map-themed .tuneChecks{background:var(--color-surface-hover)}
.astur-map-themed .tuneIntro,
.astur-map-themed .tuneItem label,
.astur-map-themed .tuneCheck{color:var(--color-text)}
.astur-map-themed .tuneItem,
.astur-map-themed .tuneChecks{border-color:var(--color-border-soft);border-radius:var(--radius-card)}
.astur-map-themed .tuneSmallBtn{border-radius:var(--radius-control)}
.astur-map-themed .tuneItem input[type=range]{accent-color:var(--color-primary)}

/* El lienzo cartográfico, pines y clusters conservan colores propios:
   son cartografía / simbología, no identidad general de la interfaz. */

/* Área seleccionada · concejo oficial / zona de búsqueda */
.astur-map-themed .adminAreaTooltip{background:var(--color-surface-translucent);color:var(--color-primary-strong);border:var(--border-width) solid color-mix(in srgb,var(--color-primary) 38%,var(--color-border));border-radius:var(--radius-control);box-shadow:var(--shadow-control);font-family:var(--font-family);font-weight:var(--heading-weight);padding:5px 9px}.astur-map-themed .adminAreaTooltip:before{display:none}.astur-map-themed .leaflet-overlay-pane path{transition:stroke .15s ease,fill .15s ease}

/* v15.12 · proximidad por tiempo de carretera */
.roadTimeNote,.roadTimeStatus{font-size:12px;line-height:1.4;color:var(--color-text-muted);margin:8px 0 0}
.roadTimeStatus.error{color:#8b2f2f}
.cardRoad{margin-top:7px;font-size:13px;font-weight:750;color:var(--color-primary-strong)}
.cardRoad i{margin-right:5px}


/* V6.9 · navegación geográfica del mapa */
.astur-map-themed .exploreTabs>button,.astur-map-themed .explorePanel,.astur-map-themed .macroGraphic,.astur-map-themed .macroMunicipios button,.astur-map-themed .naturalChoices button,.astur-map-themed .environmentChoices button,.astur-map-themed .municipioAlpha button,.astur-map-themed .municipioFinder,.astur-map-themed .exploreSelect select,.astur-map-themed .minuteChoices button{border-color:var(--color-border);background:var(--color-surface);color:var(--color-text)}
.astur-map-themed .exploreTabs>button.open,.astur-map-themed .exploreTabs>button.has-value,.astur-map-themed [data-geo-zone].active,.astur-map-themed [data-geo-env].active,.astur-map-themed [data-geo-municipio].active,.astur-map-themed [data-geo-natural].active,.astur-map-themed [data-geo-minutes].active{border-color:var(--color-primary);background:var(--color-primary-soft);color:var(--color-primary-strong)}
.astur-map-themed .explorePanel{border-radius:var(--radius-modal);box-shadow:var(--shadow-detail)}
.astur-map-themed .exploreTabs>button,.astur-map-themed .macroMunicipios button,.astur-map-themed .naturalChoices button,.astur-map-themed .environmentChoices button,.astur-map-themed .municipioAlpha button,.astur-map-themed .municipioFinder,.astur-map-themed .exploreSelect select,.astur-map-themed .minuteChoices button{border-radius:var(--radius-control)}

/* V7.0 · modo explorar y web modal obedecen el tema */
.astur-map-themed .mapModeHint,.astur-map-themed .webModal,.astur-map-themed .webModalHead,.astur-map-themed .webModalExternal{background:var(--color-surface);color:var(--color-text);border-color:var(--color-border)}
.astur-map-themed .mapModeHint{border-radius:var(--radius-control);box-shadow:var(--shadow-control)}
.astur-map-themed .mapModeHint>i,.astur-map-themed .webModalExternal{color:var(--color-primary-strong)}
.astur-map-themed .mapModeHint span,.astur-map-themed .webModalHead small,.astur-map-themed .webModalNote{color:var(--color-text-muted)}
.astur-map-themed .map-mode-explore .mapShell{box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--color-primary) 24%,transparent)}
.astur-map-themed .map-mode-explore .filterBar{background:var(--color-primary-soft)}
.astur-map-themed .webModal{border-radius:var(--radius-modal);box-shadow:var(--shadow-web)}
.astur-map-themed .webModalNote{background:var(--color-surface-hover);border-color:var(--color-border-soft)}
.astur-map-themed .webModalWrap{background:var(--color-overlay)}
