/* Dock-to-pick: while a modal has handed control to the map (MapPickingService), the backdrop is
   removed so clicks reach the map, and the modal shrinks to a panel docked over the left pane.
   Everything is hidden with CSS rather than *ngIf so the modal keeps its unsaved form state. */

body.map-picking .modal-backdrop {
    display: none;
}

body.map-picking .modal.map-picking-dock {
    pointer-events: none;
}

body.map-picking .modal.map-picking-dock .modal-dialog {
    margin: 0;
    max-width: 26rem;
    width: 26rem;
    height: 100%;
}

body.map-picking .modal.map-picking-dock .modal-content {
    pointer-events: auto;
    height: 100%;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
}

body.map-picking .modal.map-picking-dock .modal-body {
    overflow-y: auto;
}

/* Only the picker stays visible; the rest of the iso line form is hidden, not destroyed. The two
   picker hosts decide between themselves which one is showing (see MapPickingService owner keys). */
body.map-picking .iso-line-form > *:not(app-manual-elevation-points):not(app-source-area) {
    display: none;
}

body.map-picking .source-area-form > *:not(app-manual-elevation-points) {
    display: none;
}

/* The list pane gives its width to the map while picking. display:none keeps it alive, so the list
   is untouched when picking ends.
   The sidebar must NOT be hidden: .content-container has no grid-area and is auto-placed, so
   removing the sidebar frees column 1 of "grid-template-columns: auto 1fr" and .content-container
   lands in the auto track, which shrink-wraps and collapses the map to nothing. It is covered by
   the docked panel anyway. Everything outside the map is inert so a stray click cannot route away
   and destroy the modal mid-pick. */
body.map-picking .content {
    display: none;
}

body.map-picking .sidebar,
body.map-picking .header {
    pointer-events: none;
}
