/* OPERACIONES */

/* Menú flotante */
.menu-flotante {
    position: absolute;
    bottom: 10%;
    right: 20px;
    transform: translateY(-50%); /* Centrado vertical */
    z-index: 1000; /* Asegura que quede sobre el mapa */
}

.menu-flotante .btn-menu {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;    
    border: none;
}

.menu-flotante .btn-opcion {
    position: absolute;
    bottom: 70px;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;    
}

.menu-flotante.mostrar .btn-opcion {
    opacity: 1;
    visibility: visible;
}

.menu-flotante.mostrar .btn1 { bottom: 70px; }
.menu-flotante.mostrar .btn2 { bottom: 130px; }
.menu-flotante.mostrar .btn3 { bottom: 190px; }
.menu-flotante.mostrar .btn4 { bottom: 250px; }
.menu-flotante.mostrar .btn5 { bottom: 310px; }
.menu-flotante.mostrar .btn6 { bottom: 370px; }

/* BASIC */

/* Menú flotante */
.menu-flotante-basic {
    position: absolute;
    top: 15%;
    right: 20px;
    transform: translateY(-50%); /* Centrado vertical */
    z-index: 1000; /* Asegura que quede sobre el mapa */
    display: flex;
    flex-direction: row; /* Alinea los botones en fila */
    align-items: center; /* Centra los botones verticalmente */
}

/* Botón principal */
.menu-flotante-basic .btn-menu-basic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    border: none;
    position: relative;
}

/* Botones de opciones */
.menu-flotante-basic .btn-opcion-basic {
    position: absolute;
    top: 0;
    right: -50px; /* Despliega los botones hacia la izquierda */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
}

/* Muestra los botones al desplegar */
.menu-flotante-basic.mostrar .btn-opcion-basic {
    opacity: 1;
    visibility: visible;
}

/* Posiciona los botones de opción horizontalmente */
.menu-flotante-basic.mostrar .btn1-basic { right: 90px; }
.menu-flotante-basic.mostrar .btn2-basic { right: 140px; }
.menu-flotante-basic.mostrar .btn3-basic { right: 190px; }
.menu-flotante-basic.mostrar .btn4-basic { right: 240px; }
.menu-flotante-basic.mostrar .btn5-basic { right: 290px; }
.menu-flotante-basic.mostrar .btn6-basic { right: 340px; }


/* MENU PARA LAS CAPAS */

/* Menú flotante */

.floating-menu-gcms {
    position: absolute;
    top: 50%; /* Ubicado en la mitad vertical */
    left: -100%; /* Oculto completamente */
    width: fit-content;
    max-width: 100%;
    height: 60%;
    background: rgba(52, 58, 64, 0.9); /* Fondo semitransparente */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    padding: 15px;
    border-radius: 8px;
    transition: left 0.3s ease-in-out;
    transform: translateY(-50%); /* Centra verticalmente */
    z-index: 1050; /* Asegura que quede sobre el mapa */
}
.nav-tabs .nav-item {
    flex: 1;
}
.nav-tabs .nav-link {
    color: white !important; /* Texto blanco siempre */
}
.nav-tabs .nav-link:hover {
    color: #f8f9fa !important; /* Un tono más claro en hover */
}
.nav-tabs .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2); /* Fondo sutil para la activa */
    border-color: transparent;
    color: white !important; /* Mantener el texto blanco en activa */
}
.floating-menu-gcms.show {
    left: 10px; /* Aparece */
}
.close-menu-gcms {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.close-menu-gcms:hover {
    color: #ff4d4d;
}

.form-check:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transition: box-shadow 0.2s ease-in-out;
    border-radius: 0.375rem; /* opcional para suavizar bordes */
}


/* Responsividad */
@media (max-width: 768px) {
    .floating-menu-gcms {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .floating-menu-gcms {
        width: 100%;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        border-radius: 0;
        transform: translateY(0); /* Sin centrar verticalmente */
    }
    .nav-tabs {
        flex-direction: column;
    }

    .nav-item {
        width: 100%;
    }
}

/* MENU PARA SOCIOECONOMICOS */

.floating-menu-socioeconomicos {
    position: absolute;
    top: 50%; /* Ubicado en la mitad vertical */
    left: -50%; /* Oculto completamente */
    width: fit-content;
    max-width: 100%;
    background: rgba(52, 58, 64, 0.9); /* Fondo semitransparente */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    padding: 15px;
    border-radius: 8px;
    transition: left 0.3s ease-in-out;
    transform: translateY(-50%); /* Centra verticalmente */
    z-index: 1050; /* Asegura que quede sobre el mapa */
}
.nav-tabs .nav-item {
    flex: 1;
}
.nav-tabs .nav-link {
    color: white !important; /* Texto blanco siempre */
}
.nav-tabs .nav-link:hover {
    color: #f8f9fa !important; /* Un tono más claro en hover */
}
.nav-tabs .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2); /* Fondo sutil para la activa */
    border-color: transparent;
    color: white !important; /* Mantener el texto blanco en activa */
}
.floating-menu-socioeconomicos.show {
    left: 10px; /* Aparece */
}
.close-menu-socioeconomicos {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.close-menu-socioeconomicos:hover {
    color: #ff4d4d;
}

/* Responsividad */
@media (max-width: 768px) {
    .floating-menu-socioeconomicos {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .floating-menu-socioeconomicos {
        width: 100%;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        border-radius: 0;
        transform: translateY(0); /* Sin centrar verticalmente */
    }
    .nav-tabs {
        flex-direction: column;
    }

    .nav-item {
        width: 100%;
    }
}

/* MENU PARA visualización cartográfica */

#menu-flotante-visual-cartografica {
    display: none;
    width: auto;
    transform: translateY(-50%);
    right: 5rem; /* Espaciado desde el borde derecho */
    top: 50%;   /* Centrado verticalmente */

    /* Estilo cristal */
    background-color: rgba(255, 255, 255, 0.27); /* Fondo semitransparente */
    backdrop-filter: blur(12px);               /* Efecto difuminado */
    -webkit-backdrop-filter: blur(12px);       /* Soporte para Safari */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde suave */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);  /* Sombra ligera */
}

#menu-flotante-visual-cartografica .list-group {
    --bs-list-group-border-color: transparent !important; /* Sin bordes entre items */
    --bs-list-group-bg: rgba(0,0,0,0) !important;
}

/* MENU PARA recortes */
#floatingCuts {
    display: none;
    max-width: 100%;
    z-index: 1000;
    position: fixed;
    bottom: 3rem;
    right: 5%;
    
    /* Estilo cristal */
    background-color: rgba(255, 255, 255, 0.27); /* Fondo semitransparente */
    backdrop-filter: blur(12px);               /* Efecto difuminado */
    -webkit-backdrop-filter: blur(12px);       /* Soporte para Safari */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde suave */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);  /* Sombra ligera */
}
#floatingCuts nav {
    max-height: 90vh;
    overflow-y: auto;
}

/* MENU PARA operciones con las capas */

#menu-flotante-operaciones-capas {
    display: none;
    width: auto;
    transform: translateY(-50%);
    right: 5rem; /* Espaciado desde el borde derecho */
    top: 50%;   /* Centrado verticalmente */

    /* Estilo cristal */
    background-color: rgba(255, 255, 255, 0.27); /* Fondo semitransparente */
    backdrop-filter: blur(12px);               /* Efecto difuminado */
    -webkit-backdrop-filter: blur(12px);       /* Soporte para Safari */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde suave */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);  /* Sombra ligera */
}

#menu-flotante-operaciones-capas .list-group {
    --bs-list-group-border-color: transparent !important; /* Sin bordes entre items */
    --bs-list-group-bg: rgba(0,0,0,0) !important;
}

/* HEADER */
.menu-header{
    background: #1f1f1f;
    border-bottom: 1px solid #3a3a3a;
}

/* BOTONES HEADER */
.btn-menu-icon{
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: white;
    border-radius: 4px;
    transition: .2s;
}

.btn-menu-icon:hover{
    background: #3d3d3d;
}

/* LISTA */
.lista-capas{
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
}

/* ITEM */
.item-capa{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: grab;
    border-bottom: 1px solid #3a3a3a;
    background: #2b2b2b;
    transition: .2s;
}

.item-capa:hover{
    background: #353535;
}

/* ITEM SELECCIONADO */
.item-capa.active{
    background: #004b87;
}

/* CHECK */
.check-capa{
    width: 16px;
    height: 16px;
    border: 1px solid #4aa3ff;
    border-radius: 3px;
    background: transparent;
    flex-shrink: 0;
}

/* TEXTO */
.nombre-capa{
    flex: 1;
    color: white;
    font-size: 14px;
}

/* DRAG */
.item-capa.dragging{
    opacity: .5;
}

/* BOTÓN VISIBILIDAD */
.btn-visibilidad{
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #4aa3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: .2s;
}

.btn-visibilidad:hover{
    color: white;
}