/* MAPA ANUNCIANTES - CSS SIMPLIFICADO Y ROBUSTO */

/* Versión: 2.1 - Julio 2025 */



/* Contenedor principal del mapa */

.mapa-container,

#map-container {

  width: 100%;

  margin: 20px 0;

  border: 1px solid #ddd;

  border-radius: 8px;

  overflow: hidden;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

}



/* Elemento del mapa */

#map {

  width: 100%;

  height: 400px;

  min-height: 400px;

  background: #f5f5f5;

}



/* Marcadores personalizados - NO se necesitan clases CSS porque son inline */



/* Popups personalizados */

.leaflet-popup-content-wrapper {

  border-radius: 8px !important;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;

}



.popup-anunciante-content {

  padding: 5px 0;

  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}



.popup-anunciante-content h3 {

  margin: 0 0 10px 0 !important;

  font-size: 16px !important;

  color: #333 !important;

  font-weight: 600 !important;

}



.popup-anunciante-content.destacado h3 {

  color: #FFD700 !important;

}



.popup-anunciante-content div {

  margin: 5px 0;

  font-size: 13px;

  color: #666;

}



.popup-anunciante-content a {

  display: inline-block;

  background: linear-gradient(135deg, #FF2D81, #ad1457);

  color: white !important;

  padding: 8px 16px;

  text-decoration: none !important;

  border-radius: 20px;

  font-size: 13px;

  font-weight: 600;

  transition: all 0.2s ease;

  border: none;

  cursor: pointer;

}



.popup-anunciante-content a:hover {

  background: linear-gradient(135deg, #E6006F, #8e1042);

  transform: translateY(-1px);

  box-shadow: 0 4px 8px rgba(248, 0, 124, 0.3);

}



/* Botón de toggle del mapa */

.btn-toggle-mapa {

  background: linear-gradient(135deg, #FF2D81, #ad1457);

  color: white;

  border: none;

  padding: 12px 20px;

  border-radius: 25px;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.3s ease;

  margin: 10px 0;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

}



.btn-toggle-mapa:hover {

  background: linear-gradient(135deg, #E6006F, #8e1042);

  transform: translateY(-2px);

  box-shadow: 0 4px 12px rgba(248, 0, 124, 0.3);

}



.btn-toggle-mapa i {

  margin-right: 8px;

}



/* Estados de carga y error */

.mapa-loading {

  padding: 20px;

  text-align: center;

  color: #666;

  font-style: italic;

}



.mapa-error {

  background: #ff4444;

  color: white;

  padding: 10px;

  border-radius: 4px;

  margin: 10px 0;

  text-align: center;

  font-weight: 500;

}



/* Estadísticas del mapa */

.mapa-stats {

  padding: 10px;

  background: #f8f9fa;

  border-top: 1px solid #ddd;

  font-size: 12px;

  color: #666;

  text-align: center;

}



/* Responsive - Móvil */

@media (max-width: 768px) {

  #map {

    height: 300px;

    min-height: 300px;

  }



  .popup-anunciante-content {

    font-size: 12px;

  }



  .popup-anunciante-content h3 {

    font-size: 14px !important;

  }



  .popup-anunciante-content a {

    padding: 6px 12px;

    font-size: 12px;

  }



  .btn-toggle-mapa {

    padding: 10px 16px;

    font-size: 13px;

  }

}



/* Animaciones */

@keyframes fadeInDown {

  from {

    opacity: 0;

    transform: translateY(-20px);

  }



  to {

    opacity: 1;

    transform: translateY(0);

  }

}



@keyframes fadeOutUp {

  from {

    opacity: 1;

    transform: translateY(0);

  }



  to {

    opacity: 0;

    transform: translateY(-20px);

  }

}



.mapa-container.show {

  animation: fadeInDown 0.5s ease-out;

}



.mapa-container.hide {

  animation: fadeOutUp 0.5s ease-out;

}



/* Leaflet overrides para mejor visualización */

.leaflet-container {

  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;

}



.leaflet-popup-content {

  margin: 10px 15px !important;

  line-height: 1.4 !important;

}



.leaflet-popup-tip {

  background: white !important;

}



.leaflet-control-zoom {

  border: none !important;

  border-radius: 4px !important;

  overflow: hidden !important;

}



.leaflet-control-zoom a {

  background: white !important;

  color: #333 !important;

  border: 1px solid #ddd !important;

  font-weight: bold !important;

}



.leaflet-control-zoom a:hover {

  background: #f5f5f5 !important;

  color: #FF2D81 !important;

}



/* Fix para marcadores que no aparecen */

.leaflet-marker-icon {

  display: block !important;

  visibility: visible !important;

  opacity: 1 !important;

  pointer-events: auto !important;

}



/* Debug styles - REMOVIDOS */
/* .debug-marker {
  background: red !important;
  color: white !important;
  padding: 5px !important;
  border-radius: 3px !important;
  font-size: 10px !important;
  font-weight: bold !important;
} */
