#map {
    background-color: #663f7e
}

html,
body,
#map {
    overflow: hidden;
}

.col9 {
    height: 100% !important;
}

.col3 {
    height: 100%;
    overflow: auto;
}

.info {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.info h2 {
    margin: 0 0 5px;
}

.leaflet-container {
    background: #fff;
    padding-right: 10px;
}

.leaflet-popup-scrolled {
    border-bottom: unset !important;
    border-top: unset !important;
}

.leaflet-popup-content {
    max-height: 70vh;
    max-width: 70vw;
}

.leaflet-popup-content.media {
    width: auto !important;
    height: auto !important;
}

.leaflet-popup-content th {
    text-align: left;
    vertical-align: top;
    min-width: 75px;
}

.leaflet-popup-content td {
    min-width: 75px;
}

.leaflet-popup-content td img {
    max-height: 60vh;
    max-width: 60vw;
}

.leaflet-tooltip {
    background: none;
    box-shadow: none;
    border: none;
}

.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    border: 0px;
}

.fa,
.leaflet-container,
a {
    color: #444444 !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-locate a,
.leaflet-touch .leaflet-control-geocoder-icon,
.leaflet-control-search .search-button,
.leaflet-control-measure {
    background-color: #f8f8f8 !important;
    border-radius: 0px !important;
    color: #444444 !important;
}

.abstract {
    font: bold 18px 'Lucida Console', Monaco, monospace;
    text-indent: 1px;
    background-color: #f8f8f8 !important;
    width: 30px !important;
    color: #444444 !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
}

.abstractUncollapsed {
    padding: 6px 8px;
    font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    max-width: 40%;
}

.leaflet-control {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar,
.leaflet-control-search,
.leaflet-control-measure {
    border: 3px solid rgba(135, 51, 162, 1) !important;
}

.leaflet-control-attribution a {
    color: #0078A8 !important;
}

.leaflet-control-scale-line {
    border: 2px solid #f8f8f8 !important;
    border-top: none !important;
    color: black !important;
}

.leaflet-control-search .search-button,
.leaflet-container .leaflet-control-search,
.leaflet-control-measure {
    box-shadow: none !important;
}

.leaflet-control-search .search-button {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    text-align: center !important;
    line-height: 30px !important;
}

.leaflet-control-measure .leaflet-control {
    width: 30px !important;
    height: 30px !important;
}

.leaflet-container .leaflet-control-search {
    background: none !important;
}

.leaflet-control-search .search-input {
    margin: 0px 0px 0px 0px !important;
    height: 30px !important;
}

.leaflet-control-measure {
    background: none !important;
    border-radius: 4px !important;
}

.leaflet-control-measure .leaflet-control-measure-interaction {
    background-color: #f8f8f8 !important;
}

.leaflet-touch .leaflet-control-measure .leaflet-control-measure-toggle,
.leaflet-touch .leaflet-control-measure .leaflet-control-measure-toggle:hover {
    width: 30px !important;
    height: 30px !important;
    border-radius: 0px !important;
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
    text-indent: 0%;
}


.leaflet-control-layers-expanded {
    padding-left: 6px;
}

.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: block;
    background-image: none;
    text-decoration: none;
    margin-bottom: 3px;
}

.leaflet-control-layers-expanded .leaflet-control-layers-toggle::after {
    content: '»';
    font-size: x-large;
    color: #444444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.leaflet-overlay-pane {
    z-index: 550;
}

.leaflet-popup-pane {
    z-index: 700;
}

.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: none;
}

.leaflet-control-layers {
    background: linear-gradient(145deg, #ffffff, #f1f1f1);
    padding: 18px 16px;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #333;
    max-height: 80vh;
    max-width: 340px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

/* Estilo de cada entrada de capa */
.leaflet-control-layers label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: #fff;
    transition: background-color 0.2s, transform 0.15s;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Hover bonito */
.leaflet-control-layers label:hover {
    background-color: #f5f5f5;
    transform: scale(1.01);
}

/* Checkbox personalizado */
.leaflet-control-layers input[type="checkbox"] {
    transform: scale(1.3);
    accent-color: #e22068;
}

/* Iconos de leyenda */
.leaflet-control-layers label img {
    height: 22px;
    width: auto;
    flex-shrink: 0;
}

/* Títulos de grupos si usas capas agrupadas */
.leaflet-control-layers-group-label {
    font-weight: 700;
    font-size: 16px;
    color: #673ab7;
    margin: 10px 0 5px 0;
}

/* Scrollbar estilizado */
.leaflet-control-layers::-webkit-scrollbar {
    width: 6px;
}

.leaflet-control-layers::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Responsive para móvil */
@media (max-width: 600px) {
    .leaflet-control-layers {
        max-width: 90vw;
        font-size: 16px;
        border-radius: 14px;
        padding: 14px 12px;
    }
}

.leaflet-control-layers {
    background-color: #fafafa;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: #1c1c1e;
    max-height: 75vh;
    max-width: 300px;
    overflow-y: auto;
    border: 1px solid #e3e3e3;
    backdrop-filter: blur(6px);
}

/* Cada ítem de capa */
.leaflet-control-layers label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

/* Hover discreto */
.leaflet-control-layers label:hover {
    background-color: #f0f0f5;
}

/* Checkbox más sobrio */
.leaflet-control-layers input[type="checkbox"] {
    transform: scale(1.15);
    accent-color: #007aff;
    /* Azul tipo iOS */
    margin-right: 4px;
}

/* Imagen de leyenda */
.leaflet-control-layers label img {
    height: 18px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Títulos de grupo (si los usas) */
.leaflet-control-layers-group-label {
    font-weight: 600;
    font-size: 13px;
    color: #6e6e73;
    margin: 10px 0 6px 0;
}

/* Scroll personalizado */
.leaflet-control-layers::-webkit-scrollbar {
    width: 6px;
}

.leaflet-control-layers::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .leaflet-control-layers {
        max-width: 90vw;
        font-size: 15px;
        border-radius: 12px;
        padding: 10px 12px;
    }
}

.leaflet-tooltip.municipio-label-tooltip {
    background-color: rgba(255, 255, 255, 0.3);
    color: #222;
    font-weight: 500;
    font-size: 11px;
    border-radius: 3px;
    box-shadow: none;
    white-space: nowrap;
    border: none;
    padding: 2px 4px;
    pointer-events: none;
}

.leaflet-tooltip.distrito-label-tooltip {
    background-color: rgba(255, 255, 255, 0.3);
    color: #222;
    font-weight: 500;
    font-size: 11px;
    border-radius: 3px;
    box-shadow: none;
    white-space: nowrap;
    border: none;
    padding: 2px 4px;
    pointer-events: none;
}