/* Estilos para el botón de capas */
.leaflet-control-layers-toggle-img {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    min-height: 35px !important;
    max-width: 35px !important;
    max-height: 35px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 4px;
    background: var(--card-background) !important;
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.leaflet-control-layers-toggle-img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: #333 !important;
}

/* Estilos para el botón de volver */
.back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.back-btn i {
    margin-right: 4px;
    -webkit-text-stroke: 1px #000;
    font-size: 20px;
    font-weight: 900;
    width: 24px;
    text-align: center;
}

/* Modal de miniaturas */
#layerModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 400px;
    top: 80px;
    width: auto;
    height: auto;
    background: none;
    /* pointer-events: none; */
}

#layerModal .modal-content {
    background-color: rgba(255,255,255,0.2);
    margin: 0;
    padding: 12px;
    border: 1px solid #888;
    width: 280px;
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    height: 300px;
    max-height: 300px;
    overflow-y: visible;
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    pointer-events: auto;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    padding: 0;
    margin: 0 2px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: black;
    background: #eee;
}

#thumbs {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 10px;
    padding: 4px;
    justify-content: center;
    max-height: none;
    overflow-y: visible;
}

.thumb-container {
    text-align: center;
    width: 80px;
}

.thumb-label {
    margin-bottom: 2px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumb-container img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    background: #eee;
}

.thumb-container img:hover {
    border-color: #666;
}

.thumb-container img.selected {
    border-color: #0078A8;
} 