/* Aislamiento crítico para evitar que el tema/Gutenberg deformen los mosaicos */
.rg-map-wrap,
.rg-map-editor-shell,
.rg-map-editor-map-wrap,
.rg-map-canvas,
.rg-map-editor-canvas { box-sizing:border-box; }

.rg-map-canvas,
.rg-map-editor-canvas {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    position:relative !important;
    overflow:hidden !important;
    background:#e8e8e8;
    z-index:1;
}

.rg-map-canvas img,
.rg-map-editor-canvas img,
.rg-map-canvas .leaflet-tile,
.rg-map-editor-canvas .leaflet-tile,
.leaflet-container img,
.leaflet-container .leaflet-tile {
    max-width:none !important;
    max-height:none !important;
    width:auto;
    height:auto;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    box-shadow:none !important;
}

.rg-map-canvas .leaflet-tile,
.rg-map-editor-canvas .leaflet-tile {
    width:256px !important;
    height:256px !important;
}

.rg-map-wrap { width:100%; margin:22px 0; }
.rg-map-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:12px;
    padding:12px 20px;
    border-radius:8px;
    background:#b79a5b;
    color:#fff !important;
    font-weight:700;
    text-decoration:none !important;
}
.rg-map-button:hover { opacity:.9; color:#fff !important; }

.rg-map-editor-shell {
    display:grid;
    grid-template-columns:minmax(280px, 36%) minmax(0, 64%);
    gap:16px;
    width:100%;
    padding:16px;
    background:#fff;
    border:1px solid #dcdcde;
    border-radius:10px;
    overflow:hidden;
}
.rg-map-search-panel { min-width:0; }
.rg-map-search-title { font-size:20px; font-weight:700; margin-bottom:6px; }
.rg-map-search-panel p { margin:0 0 14px; color:#50575e; }
.rg-map-search-row { display:flex; gap:8px; align-items:stretch; }
.rg-map-search-row input {
    width:100%;
    min-width:0;
    height:40px;
    padding:0 11px;
    border:1px solid #8c8f94;
    border-radius:4px;
    background:#fff;
}
.rg-map-results { display:grid; gap:8px; margin-top:12px; max-height:260px; overflow:auto; }
.rg-map-results button {
    display:grid;
    gap:4px;
    width:100%;
    padding:10px 12px;
    text-align:left;
    border:1px solid #dcdcde;
    border-radius:6px;
    background:#fff;
    cursor:pointer;
}
.rg-map-results button:hover { border-color:#2271b1; background:#f0f6fc; }
.rg-map-results button strong { color:#2271b1; }
.rg-map-results button span { color:#1d2327; font-size:12px; line-height:1.35; }
.rg-map-saved { display:grid; gap:3px; margin-top:14px; padding:10px; border-radius:6px; background:#f6f7f7; }
.rg-map-saved span { font-family:monospace; font-size:12px; }
.rg-map-editor-map-wrap { min-width:0; width:100%; overflow:hidden; border-radius:8px; }
.rg-map-loading { padding:10px 0; }

@media (max-width:900px){
    .rg-map-editor-shell { grid-template-columns:1fr; }
}

/* v2.4: selección por clic, sin arrastre del pin ni del mapa */
.rg-map-mode-toolbar {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:3px;
    padding:10px;
    border:1px solid #dcdcde;
    border-bottom:0;
    border-radius:8px 8px 0 0;
    background:#fff;
}
.rg-map-mode-toolbar strong { font-size:13px; color:#1d2327; }
.rg-map-mode-toolbar span { font-size:12px; color:#646970; }
.rg-map-editor-map-wrap .rg-map-editor-canvas { border-radius:0 0 8px 8px; }
.rg-map-click-selector,
.rg-map-click-selector .leaflet-container,
.rg-map-click-selector .leaflet-pane { cursor:crosshair !important; }
.rg-map-click-selector .leaflet-control,
.rg-map-click-selector .leaflet-control a { cursor:pointer !important; }
.rg-map-click-selector .leaflet-marker-icon { cursor:default !important; }
