/* /assets/css/map-view.css */


/* Contenedor del mapa */
#map_grid {
  position: relative;
  min-height: 600px;
}
#map {
  width: 100%;
  height: 600px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.mapboxgl-popup {
  max-width: 300px;
}
.mapboxgl-popup-content {
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.mapboxgl-popup-content {
    background: #b2dff1!important;
    padding: 15px!important;
}
.map-popup {
  font-family: 'Roboto', sans-serif;
}
.map-popup img {
  display: block;
}
.map-popup h5 {
  padding: 8px 0px 5px;
  margin-top: 0;
margin-bottom: 0px;
font-size: 16px;
font-weight: 600;
color: #333;
}
.map-popup p {
  margin: 0;
  padding: 0 0px 0px;
  font-size: 14px;
  color: #666;
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.mapboxgl-popup-close-button {
    background-color: #0093d1 !important;
    width: 18px;
    height: 18px;
    color: #fff;
    font-size: 18px;
    align-items: center;
    display: flex;
    justify-content: center;
}
.map-popup .btn {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
}
.marker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.4rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    background-color: #0093d1;
    color: white;
    border-color: #0093d1;
    font-size: 1rem;
    line-height: 1.5;
    text-transform: lowercase;
}
.mapboxgl-popup.mapboxgl-popup-anchor-top
{
    max-width: 280px!important;
}
.custom-marker {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 30px;
  height: 40px;
  cursor: pointer;
}
.marker-price {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background-color: var(--blue-color, #0d6efd);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
}
.cluster-marker {
  background-color: var(--blue-color, #0d6efd);
  border-radius: 50%;
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.3);
}
.mapboxgl-ctrl-group {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.loading-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1;
}
.map-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 500px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1;
}
.view-toggle .btn {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
  transition: all 0.2s ease;
}

.view-toggle .btn:hover {
  background-color: #e9ecef;
  color: #495057;
}

.white-duotone {
  --ph-first-color: white;
  --ph-second-color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}
.custom-duotone {
  --ph-first-color: currentColor;
  --ph-second-color: rgba(0, 0, 0, 0.4);
}
.view-toggle .btn.active .custom-duotone {
  --ph-first-color: white;
  --ph-second-color: rgba(255, 255, 255, 0.7);
  opacity: 1!important;
  color: #fff!important;
}
.view-toggle button.btn.active .custom-duotone:after,
.view-toggle button.btn.active .custom-duotone:before {
    color: #ffffff;
}
.view-toggle button.btn:NOT(.active) .white-duotone:before {
    color: #2f2f2f;
}
.view-toggle button.btn:NOT(.active) .white-duotone:after {
    color: #656565;
}
/* Adaptaciones responsivas */
@media (max-width: 767.98px) {
  #map {
    height: 500px;
  }
  
  .map-popup h5 {
    font-size: 14px;
    padding: 10px 12px 6px;
  }
  
  .map-popup p {
    font-size: 12px;
    padding: 0 12px 10px;
  }
  
  .map-popup .btn {
    margin: 0 12px 12px;
    width: calc(100% - 24px);
    font-size: 12px;
    padding: 0.25rem 0.5rem;
  }
  
  .view-toggle .btn {
    padding: 0.375rem 0.5rem;
  }
  
  .ph-duotone {
    font-size: 1.2rem;
  }
}

/* Para pantallas más pequeñas (teléfonos) */
@media (max-width: 575.98px) {
  #map {
    height: 400px;
  }
  
  .loading-container,
  .map-error {
    width: 90%;
    padding: 15px;
  }
}
/* new  last**/
/* /assets/css/map-view-styles.css */

/* Estilos para el mapa */
.map-container {
    width: 100%;
    height: 600px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Spinner de carga */
.loading-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Popup personalizado */
.mapboxgl-popup {
    max-width: 300px;
}
.map-popup p.price {
    font-size: 18px;
    font-weight: bold;
    color: #0093d1;
    margin-bottom: 0px;
    text-align: right;
}

.map-popup img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0px;
}

/* Marcadores personalizados */
.custom-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #0093d1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: 2px solid white;
}

.custom-marker::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #0093d1 transparent transparent;
}

/* Estilos para clusters */
.cluster-marker {
    background-color: #0093d1;
    color: white;
    border-radius: 50%;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 0 0 4px rgba(0, 147, 209, 0.4);
}

/* Mensaje de error de mapa */
.map-error {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #dc3545;
}

/* Estilos para botones de cambio de vista */
.view-toggle .btn {
    display: flex!important;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.4rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: var(--bs-body-color);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    font-weight: 400;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.view-toggle .btn.active {
    background-color: #0093d1;
    color: white;
    border-color: #0093d1;
}

.view-toggle .btn i {
    font-size: 1.2rem;
}

.view-toggle .btn:hover:not(.active) {
    background-color: #e9ecef;
}

/* Estilos para panel de filtros de mapa */
#map-filters {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#map-filters .form-check {
    margin-bottom: 8px;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
    }
    
    .view-toggle .btn {
        padding: 0.3rem 0.6rem;
    }
}
@keyframes counterUpdate {
    0% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.counter-updated {
    animation: counterUpdate 0.8s ease-in-out;
    font-weight: bold;
}