/* CONTENEDOR GENERAL */
.leaflet-container {
    position: relative;
    overflow: hidden;
    outline: 0;
    background: #e8edf1;
}

.leaflet-container img,
.leaflet-container .leaflet-tile {
    max-width: none !important;
    max-height: none !important;
}

.leaflet-container img.leaflet-tile {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* CAPAS */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-container {
    -webkit-tap-highlight-color: transparent;
}

/* TILES */
.leaflet-tile {
    visibility: hidden;
}

.leaflet-tile-loaded {
    visibility: inherit;
}

.leaflet-zoom-animated {
    transform-origin: 0 0;
}

/* PANE PRINCIPAL */
.leaflet-map-pane {
    z-index: 2;
}

.leaflet-tile-pane {
    z-index: 200;
}

.leaflet-overlay-pane {
    z-index: 400;
}

.leaflet-shadow-pane {
    z-index: 500;
}

.leaflet-marker-pane {
    z-index: 600;
}

.leaflet-tooltip-pane {
    z-index: 650;
}

.leaflet-popup-pane {
    z-index: 700;
}

/* CONTROLES */
.leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.leaflet-top {
    top: 0;
}

.leaflet-right {
    right: 0;
}

.leaflet-bottom {
    bottom: 0;
}

.leaflet-left {
    left: 0;
}

.leaflet-control {
    float: left;
    clear: both;
}

.leaflet-right .leaflet-control {
    float: right;
}

.leaflet-top .leaflet-control {
    margin-top: 10px;
}

.leaflet-bottom .leaflet-control {
    margin-bottom: 10px;
}

.leaflet-left .leaflet-control {
    margin-left: 10px;
}

.leaflet-right .leaflet-control {
    margin-right: 10px;
}

/* BOTONES ZOOM */
.leaflet-bar {
    box-shadow: 0 1px 5px rgba(0,0,0,.20);
    border-radius: 6px;
}

.leaflet-bar a {
    background: #fff;
    border-bottom: 1px solid #ccc;
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: block;
    text-align: center;
    text-decoration: none;
    color: #0b3768;
}

.leaflet-bar a:first-child {
    border-radius: 6px 6px 0 0;
}

.leaflet-bar a:last-child {
    border-radius: 0 0 6px 6px;
    border-bottom: none;
}

.leaflet-bar a:hover {
    background: #f4f7fb;
}

/* POPUP */
.leaflet-popup {
    position: absolute;
    text-align: center;
    margin-bottom: 20px;
}

.leaflet-popup-content-wrapper {
    padding: 1px;
    text-align: left;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,.18);
}

.leaflet-popup-content {
    margin: 14px 18px;
    line-height: 1.4;
}

.leaflet-popup-tip-container {
    width: 40px;
    height: 20px;
    position: absolute;
    left: 50%;
    margin-left: -20px;
    overflow: hidden;
    pointer-events: none;
}

.leaflet-popup-tip {
    width: 17px;
    height: 17px;
    padding: 1px;
    margin: -10px auto 0;
    transform: rotate(45deg);
    background: #fff;
    box-shadow: 3px 3px 15px rgba(0,0,0,.12);
}

.leaflet-popup-close-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 6px 8px;
    border: none;
    text-align: center;
    width: 24px;
    height: 24px;
    font-size: 20px;
    color: #757575;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    z-index: 10;
}

/* ATRIBUCIÓN */
.leaflet-control-attribution {
    background: rgba(255,255,255,.85);
    margin: 0;
    font-size: 10px;
    padding: 2px 5px;
    color: #555;
}

.leaflet-control-attribution a {
    color: #0078a8;
    text-decoration: none;
}

/* CURSORES */
.leaflet-grab {
    cursor: grab;
}

.leaflet-dragging .leaflet-grab {
    cursor: grabbing;
}

/* Evitar selección accidental */
.leaflet-container,
.leaflet-control {
    -webkit-user-select: none;
    user-select: none;
}

#map {
    position: relative;
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    background: #e8edf1;
    z-index: 1;
}

#map img {
    max-width: none !important;
}

#map img.leaflet-tile {
    width: 256px;
    height: 256px;
    max-width: none !important;
    max-height: none !important;
    object-fit: initial !important;
}