/**
 * Estilos para la página del mapa de espacios
 */

/* Panel lateral */
.sidebar-mapa {
    height: calc(100vh - 100px);
    overflow-y: auto;
    position: sticky;
    top: 56px; /* Altura del navbar */
}

/* Contenedor del mapa */
#mapa {
    height: calc(100vh - 250px);
    width: 100%;
}

/* Lista de espacios */
.espacios-lista {
    max-height: calc(100vh - 700px);
    overflow-y: auto;
}

/* Elementos de lista de espacios */
.espacio-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.espacio-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.espacio-item.active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Ventana de información del mapa */
.gm-style .gm-style-iw-c {
    padding: 12px;
}

/* Botón flotante para agregar espacio */
.btn-flotante {
    width: 180px;
    height: 50px;
    margin-right: 50px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Estilos para los marcadores */
.marker-label {
    color: white;
    font-weight: bold;
    text-align: center;
}

/* Ajustes responsive */
@media (max-width: 767.98px) {
    .sidebar-mapa {
        height: auto;
        max-height: 50vh;
    }

    #mapa {
        height: 50vh;
    }
}

/* Estilos para el tooltip del marcador */
#marker-tooltip {
    display: none;
    position: absolute;
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translate(-50%, -100%);
    pointer-events: none;
    font-weight: bold;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    border: 1px solid #ccc;
    transition: opacity 0.2s;
}

/* Estilos para marcadores con etiquetas */
.marker-with-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.marker-label {
    background-color: white;
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #ccc;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
}

.marker-icon {
    z-index: 0;
}

@media (max-width: 768px) {
    .marker-label {
        font-size: 10px;
        max-width: 100px;
    }
}

/* Estilos para el selector de países */
#selector-paises {
    position: sticky;
    top: 0;
    z-index: 10;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

/* Para navegadores Webkit (Chrome, Safari) */
#selector-paises::-webkit-scrollbar {
    height: 4px;
}

#selector-paises::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Estilos responsivos */
@media (max-width: 767px) {
    #selector-paises {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .pais-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

.marker-cluster {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
}

.marker-cluster-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background-color: rgba(66, 133, 244, 0.8);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
