﻿/***************************************** MAPA UBICACIONES - DISPONIBILIDAD DE FLOTA ***********************************************/
.seleccion-de-mapa {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    padding: 1.5rem;
    align-items: start;
}

#map-ubicacion {
    width: 100%;
    height: 500px;
    border-radius: .3rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(41, 50, 64, 0.1);
}

#ubi-map {
    width: 100%;
    height: 100%;
    border-radius: .3rem;
}

#mapa-de-posicion {
    max-height: 500px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #ccc;
}

.matriz-grid {
    display: grid;
    width: max-content;
    gap: 4px;
    align-items: center;
}

.fila-vacia {
    width: 40px;
    height: 40px;
    background-color: transparent;
}

.col-label, .row-label {
    width: 60px;
    height: 40px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.celda-posicion {
    width: 60px;
    height: 40px;
    border: 1px solid #999;
    display: flex;
    font-size: 11px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
}

    .celda-posicion.libre {
        background-color: #fff;
    }

        .celda-posicion.libre:hover {
            background-color: #d0f0ff;
        }

    .celda-posicion.ocupada {
        background-color: #ccc;
        cursor: not-allowed;
        pointer-events: auto;
    }

    .celda-posicion.seleccionada {
        border: 2px solid #28a745;
        box-shadow: 0 0 0 2px rgba(122, 177, 124);
    }

    .celda-posicion.actual {
        border: 2px solid #075C9C;
        box-shadow: 0 0 0 2px rgba(7,92,156,.25);
    }


.info-matriz {
    border: 1px solid #ccc;
    padding: 15px;
    text-align: center;
    color: #6c757d;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/***************************************** MAPA UBICACIONES - CONFIGURACION UBICACIONES ***********************************************/

/* CONTENEDOR RESPONSIVO */
.mapa-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* CONTENEDOR GENERAL */
.zona-maestra-mapas {
    position: relative;
    width: 1920px;
    height: 1080px;
    transform-origin: top left;
    margin: 0 auto;
    min-height: 50px;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 25px;
    background-color: #f0f0f0;
    overflow: auto;

    /* ORGANIZACIÓN DE LAS MATRICES DENTRO */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.matriz-container-1 {
    max-width: 100%;
    display: inline-block;
    margin: 0 auto 40px auto;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fdfdfd;
    overflow-x: auto;
    margin-bottom: 40px;
    text-align: center;
    cursor: move !important; 
    pointer-events: auto !important;
    z-index: 10;
    touch-action: none;
}

.matriz-grid-1 {
    --celda-ancho: 60px;
    --celda-alto: 30px;
    --gap-size: 2px; 
    --fuente-size: 0.75rem;

    width: max-content;
    display: flex;
    flex-direction: column;
    gap: var(--gap-size);
}

.matriz-titulo {
    text-align: center;
    color: #293240;
    font-size: 1rem;
    margin-bottom: 10px;
}

.matriz-header {
    display: flex;
    gap: var(--gap-size);
    margin-bottom: 2px;
}

.fila-vacia-1 {
    width: var(--celda-ancho); 
}

.col-label-1,
.row-label-1 {
    width: var(--celda-ancho);
    height: var(--celda-alto);
    line-height: var(--celda-alto);
    text-align: center;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
}

.matriz-row-1 {
    display: flex;
    gap: var(--gap-size);
    min-height: var(--celda-alto);
}

/* CELDAS (FLOTA Y VACÍA) */
.celda-flota, .celda-vacia {
    width: var(--celda-ancho) !important;
    height: var(--celda-alto) !important;
    min-width: var(--celda-ancho);
    min-height: var(--celda-alto);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    border-radius: 4px;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 0.7rem;
}

.celda-flota {
    background-color: #43a047;
    color: white;
    font-weight: bold;
}

    .celda-flota.azul {
        background-color: #1e88e5 !important;
    }

    .celda-flota.gris {
        background-color: #9e9e9e !important;
    }

    .celda-flota.verde {
        background-color: #43a047 !important;
    }

    .celda-flota.rojo {
        background-color: #e53935 !important;
    }

/* MAPA UBICACIONES - MÓDULO SIN MOVIMIENTO */
.matriz-container-static {
    cursor: default !important;
    pointer-events: none;
    position: relative;
}

.mapa-print-real {
    display: none;
    position: relative;
}
/***************************************** MAPA UBICACIONES - CONFIGURACION DESCARGA  ***********************************************/

.mapa-guias-pagina {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 50;
}

.guia-vertical {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-image: repeating-linear-gradient( to bottom, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 8px, transparent 8px, transparent 16px );
}

.guia-horizontal {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-image: repeating-linear-gradient( to right, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 8px, transparent 8px, transparent 16px );
}

@media print {
    .mapa-guias-pagina {
        display: none !important;
    }
}

.zona-maestra-mapas {
    position: relative;
    background-color: #f2f2f2;
    background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,0.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,0.08) 1px, transparent 1px);
    background-size: 10px 10px, 10px 10px, 40px 40px, 40px 40px;
    background-attachment: local;
}