.visor-container {
    width: 100%;
    height: calc(100vh - var(--header-height, 80px) - var(--footer-height, 60px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mapa-container {
    flex: 1;
    width: 100%;
    min-height: 400px;
    position: relative;
    border: 1px solid #666;
    box-sizing: border-box;
}

#mapa-visor {
    width: 100%;
    height: 100%;
}

.leaflet-control-layers label {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    width: 100% !important;
}

.leaflet-control-layers input[type="radio"] {
    margin: 0 !important;
    margin-right: 8px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    width: 16px !important;
    height: 16px !important;
}

.leaflet-control-layers label span {
    flex: 1 !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.link-visor {
    color: var(--color_corporativo, #00a160) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin-top: 8px !important;
}

.link-visor:hover {
    text-decoration: underline !important;
    color: #008a54 !important;
}

.marcador-ubicacion-verde {
    background: transparent !important;
    border: none !important;
    color: var(--color_corporativo, #00a160);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.marcador-ubicacion-verde i {
    color: var(--color_corporativo, #00a160);
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.marcador-ubicacion-verde:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.marcador-actual {
    font-size: 40px;
}

.marcador-actual i {
    font-size: 40px;
}

.marcador-otra {
    font-size: 25px;
    opacity: 0.8;
}

.marcador-otra i {
    font-size: 25px;
}

.marcador-otra:hover {
    opacity: 1;
}

.popup-instalacion {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: auto !important;
    min-width: fit-content !important;
    max-width: none !important;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

.popup-instalacion h4 {
    margin: 0 0 8px 0;
    color: var(--color_corporativo, #00a160);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    width: auto;
}

.popup-instalacion p {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #495057;
    white-space: nowrap;
    width: auto;
}

.popup-instalacion strong {
    color: #000;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.leaflet-popup-content-wrapper {
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    width: auto !important;
    min-width: fit-content !important;
    max-width: none !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.4;
    width: auto !important;
    min-width: fit-content !important;
    max-width: none !important;
}

.leaflet-popup-tip {
    background: white;
    border: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.leaflet-control-zoom a {
    background-color: var(--color_corporativo, #00a160) !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    margin-bottom: 5px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaflet-control-zoom a:hover {
    background-color: #008a54 !important;
    color: white !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    border-radius: 50% !important;
}

.leaflet-control-zoom a {
    font-size: 0 !important;
}

.leaflet-control-zoom-in::after {
    content: '+' !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: white !important;
}

.leaflet-control-zoom-out::after {
    content: '−' !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: white !important;
}

@media (max-width: 768px) {
    .map-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .map-info {
        justify-content: space-between;
    }
}

.leaflet-control-search {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 10px 0 0 10px;
}

.search-btn {
    background-color: var(--color_corporativo, #00a160) !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    transition: background-color 0.2s ease !important;
}

.search-btn:hover {
    background-color: #008a54 !important;
}

.search-btn i {
    color: white !important;
    font-size: 16px !important;
}

/* Modal de búsqueda */
.modal {
    display: block;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: transparent;
    pointer-events: none;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #fefefe;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 350px;
    max-width: calc(100vw - 20px);
    max-height: 70vh;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #495057;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 10px 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color_corporativo, #00a160);
    box-shadow: 0 0 0 0.2rem rgba(0, 161, 96, 0.25);
}

.resultados-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}


.lista-resultados {
    padding: 0;
}

.resultado-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.resultado-item:hover {
    background-color: #f8f9fa;
}

.resultado-item:last-child {
    border-bottom: none;
}

.resultado-nombre {
    font-weight: 500;
    color: #495057;
    margin-bottom: 2px;
}

.resultado-coords {
    font-size: 12px;
    color: #6c757d;
}

.no-resultados {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

@media (max-width: 767px) {
    .modal-content {
        width: calc(100vw - 20px);
        left: 50%;
        transform: translateX(-50%);
        top: 10px;
        max-height: 60vh;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 10px 15px 15px 15px;
        flex-direction: column;
    }
    
    .modal-footer .button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .search-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
}