/*
  fm-itinerario-osm.css
  - Capa específica para "Mi itinerario OSM".
  - Reutiliza fm-mapbox.css + fm-itinerario.css como base visual.
  - Ajusta Leaflet/OpenStreetMap para convivir con la plantilla original Mapbox.
*/

/* Contenedor Leaflet */
.fm-itinerary-page #mapa.fm-map--osm.leaflet-container{
  z-index: 1;
  background: #08111c;
  font: inherit;
}

/* Aproximación visual al estilo oscuro de la plantilla Mapbox */
.fm-itinerary-page #mapa.fm-map--osm-dark .leaflet-tile-pane{
  filter: invert(1) hue-rotate(180deg) brightness(0.72) saturate(0.35) contrast(0.95);
  transform-origin: center center;
}

/* Reset del divIcon de Leaflet para no heredar la caja blanca */
.fm-itinerary-page .leaflet-marker-icon.fm-itin-marker-wrap,
.fm-itinerary-page .leaflet-marker-shadow.fm-itin-marker-wrap{
  background: transparent !important;
  border: 0 !important;
}

.fm-itinerary-page .fm-itin-marker-wrap{
  background: transparent !important;
  border: 0 !important;
}

.fm-itinerary-page .fm-itin-marker-wrap .fm-itin-marker{
  display: block;
  position: relative;
}

/* Controles Leaflet */
.fm-itinerary-page .leaflet-top .leaflet-control{ margin-top: 14px; }
.fm-itinerary-page .leaflet-left .leaflet-control{ margin-left: 14px; }
.fm-itinerary-page .leaflet-right .leaflet-control{ margin-right: 14px; }
.fm-itinerary-page .leaflet-bottom .leaflet-control{ margin-bottom: 14px; }

.fm-itinerary-page .leaflet-bar{
  border: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.fm-itinerary-page .leaflet-bar a,
.fm-itinerary-page .leaflet-control-fm-geolocate button{
  width: 34px;
  height: 34px;
  line-height: 34px;
  background: #fff;
  color: #000;
  border: 0;
  box-shadow: none;
}

.fm-itinerary-page .leaflet-bar a{
  font-weight: 700;
}

.fm-itinerary-page .leaflet-bar a:hover,
.fm-itinerary-page .leaflet-control-fm-geolocate button:hover{
  background: #f5f5f5;
  color: #000;
}

.fm-itinerary-page .leaflet-control-fm-geolocate button{
  display: block;
  position: relative;
  padding: 0;
  cursor: pointer;
}

.fm-itinerary-page .leaflet-control-fm-geolocate button.is-disabled{
  color: #9b9b9b;
  cursor: default;
}

.fm-itinerary-page .leaflet-control-fm-geolocate button.is-loading{
  cursor: progress;
}

.fm-itinerary-page .fm-geolocate-ico{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: 2px solid currentColor;
  border-radius: 999px;
  box-sizing: border-box;
  background: radial-gradient(circle at center, currentColor 0 1.6px, transparent 1.8px);
}

.fm-itinerary-page .fm-geolocate-ico::before,
.fm-itinerary-page .fm-geolocate-ico::after{
  content: "";
  position: absolute;
  background: currentColor;
}

.fm-itinerary-page .fm-geolocate-ico::before{
  left: 50%;
  top: -5px;
  width: 2px;
  height: 24px;
  transform: translateX(-50%);
}

.fm-itinerary-page .fm-geolocate-ico::after{
  top: 50%;
  left: -5px;
  width: 24px;
  height: 2px;
  transform: translateY(-50%);
}

.fm-itinerary-page .leaflet-control-fm-geolocate button.is-loading .fm-geolocate-ico{
  animation: fm-geo-spin 1s linear infinite;
}

@keyframes fm-geo-spin{
  from{ transform: translate(-50%, -50%) rotate(0deg); }
  to{ transform: translate(-50%, -50%) rotate(360deg); }
}

/* Atribución visible sobre mapa oscuro */
.fm-itinerary-page .leaflet-control-attribution{
  background: rgba(5, 21, 41, 0.82);
  color: #fff;
  padding: 4px 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.fm-itinerary-page .leaflet-control-attribution,
.fm-itinerary-page .leaflet-control-attribution a{
  color: #fff;
}

.fm-itinerary-page .leaflet-control-attribution a{
  text-decoration: underline;
}

/* Evita que los controles tapen overlays del diseño */
.fm-itinerary-page .leaflet-top,
.fm-itinerary-page .leaflet-bottom{
  z-index: 999;
}

/* Icono botón "Mi ubicación" (OSM) */
.fm-itinerary-page .leaflet-control-fm-geolocate .fm-geolocate-ico{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 25px;
  height: 25px;
  transform: translate(-50%, -50%);
  background-image: url("https://luzmadridfestival.com/wp-content/themes/luzmadrid/img/ubicacion-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  /* IMPORTANTE: quitar el icono “diana” anterior */
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  background-color: transparent;
}

/* IMPORTANTE: apagar los trazos de la diana */
.fm-itinerary-page .leaflet-control-fm-geolocate .fm-geolocate-ico::before,
.fm-itinerary-page .leaflet-control-fm-geolocate .fm-geolocate-ico::after{
  content: none;
}

button.fm-geolocate-btn {
    border-radius: 3px;
}