/* ── ADR-012 / ADR-003: in-panel inline edit ─────────────────────── */
#portfolio-panel {
  position: relative;
}
#portfolio-panel.portfolio-panel--editing {
  min-height: min(75vh, 42rem);
}
#new-snapshot-modal.ds-portfolio-edit-inline {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  pointer-events: none;
  background: var(--ds-surface);
}
#new-snapshot-modal.ds-portfolio-edit-inline:not(.hidden) {
  display: flex !important;
}
#new-snapshot-modal.ds-portfolio-edit-inline > .ds-modal-card {
  pointer-events: auto;
  width: 100%;
  height: 100%;
  max-height: 100%;
  max-width: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#new-snapshot-modal.ds-portfolio-edit-inline > .ds-modal-card > .ds-modal-header {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--ds-border-subtle);
  background: var(--ds-surface);
}
#new-snapshot-modal.ds-portfolio-edit-inline > .ds-modal-card > .ds-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#new-snapshot-modal.ds-portfolio-edit-inline > .ds-modal-card > .ds-modal-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--ds-border-subtle);
  background: var(--ds-surface);
}
/* Hide read-only holdings while inline editor covers the panel */
body.portfolio-inline-edit #holdings-table-container > details,
body.portfolio-inline-edit #holdings-table-container > #no-holdings,
body.portfolio-inline-edit #holdings-table-container > #portfolio-loading {
  visibility: hidden;
  pointer-events: none;
}
body.portfolio-inline-edit .portfolio-mode-asof-only .ds-snapshot-action-btn--edit {
  /* Keep date chrome; Edit is already open */
}
