/* Shared CRM location picker (Leaflet + OpenStreetMap). */
.crm-map-picker-root.crm-modal-root.is-open {
    z-index: var(--crm-modal-picker-z-index);
}
.crm-modal-shell.crm-map-picker-dialog {
    --crm-modal-width: 960px;
    height: min(790px, calc(100dvh - 2 * var(--crm-modal-top)));
    max-height: calc(100dvh - 2 * var(--crm-modal-top));
}
.crm-map-picker-dialog .crm-modal-head-title { min-width: 0; }
.crm-map-picker-body.crm-modal-content {
    display: flex; flex-direction: column; gap: 10px;
    overflow: hidden; padding: 14px; min-height: 0;
}
.crm-map-picker-instruction {
    color: var(--crm-muted); font-size: 13px; line-height: 1.45;
}
.crm-map-picker-canvas-wrap {
    flex: 1 1 auto; min-height: 180px; min-width: 0; position: relative;
    border: 1px solid var(--crm-border); border-radius: var(--crm-radius-md);
    background: var(--crm-surface-soft); overflow: hidden;
}
.crm-map-picker-canvas { position: absolute; inset: 0; z-index: 1; }
.crm-map-picker-loading {
    position: absolute; inset: 0; z-index: 2; display: flex;
    justify-content: center; align-items: center; padding: 18px; text-align: center;
    color: var(--crm-muted); font-size: 14px;
    background: var(--crm-surface-soft);
}
.crm-map-picker-loading[hidden] { display: none; }
.crm-map-picker-loading.is-error { color: var(--crm-danger, #c0392b); }
.crm-map-picker-coordinates {
    min-height: 20px; color: var(--crm-text); text-align: center;
    font-size: 13px; line-height: 1.35; font-variant-numeric: tabular-nums;
}
.crm-map-picker-dialog .leaflet-container { font-family: inherit; }
.crm-map-picker-dialog .leaflet-control-attribution { font-size: 10px; }
.crm-map-pin { background: none; border: 0; }
.crm-map-pin-dot {
    display: block; box-sizing: border-box;
    width: 30px; height: 30px; border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #e14646;
    transform: rotate(-45deg);
    box-shadow: 0 2px 9px rgba(0, 0, 0, .32);
}
.crm-map-pin-dot::after {
    content: ''; display: block; width: 9px; height: 9px; position: absolute;
    top: 7px; left: 7px; border-radius: 50%; background: white;
}
.crm-map-picker-dialog .crm-btn:disabled { opacity: .5; cursor: not-allowed; }
.crm-map-apply-mobile { display: none; }
@media (max-width: 900px) {
    .crm-modal-shell.crm-map-picker-dialog {
        --crm-modal-width: 100%; height: 100%; max-height: 100%;
    }
    .crm-map-picker-body.crm-modal-content { flex: 1 1 auto; padding: 10px; gap: 8px; }
    .crm-map-picker-instruction { font-size: 12px; }
    .crm-map-apply-desktop { display: none; }
    .crm-map-apply-mobile { display: inline; }
    .crm-map-picker-canvas-wrap { border-radius: var(--crm-radius-sm); }
    .crm-map-picker-coordinates { font-size: 12px; }
}
