#kmlBtn {
    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);
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#kmlBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: #333;
}

/* Eliminar borde del contenedor leaflet */
.leaflet-control.leaflet-bar {
    border: none !important;
    background: none !important;
}

@media (min-width: 769px) and (max-width: 1024px) {
    #custom-controls {
        position: absolute;
        top: 120px;
        left: 220px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        z-index: 9999;
    }
}

@media (max-width: 600px) {
    #custom-controls {
        position: absolute;
        top: 120px;
        left: 200px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        z-index: 9999;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    background: none !important;
    color: #fff !important;
    width: 350px !important;
    padding: 0 !important;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    height: auto;
    max-width: 95vw;
    border: 1px solid #888;
}

.modal.visible {
    display: block;
}

.modal-drag-bar {
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
    cursor: move;
    user-select: none;
    background: rgba(255,255,255,0.2);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal h3 {
    font-size: 1em;
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    margin-bottom: 0 !important;
    padding: 10px 16px 10px 16px;
}

.modal-close {
    float: right;
    cursor: pointer;
}

.form-group {
    margin: 15px 16px 0 16px;
}

.button-group {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 16px 0 16px;
}

#kmlLoad, #kmlClose {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    border: 1px solid #222 !important;
    width: 80px !important;
    height: 36px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#kmlLoad i, #kmlClose i {
    font-size: 1em !important;
} 