/* Shared CRUD modal shell (CrudModalsComponent, ObjectNotesModal, ObjectContactPersonsModal)
   Natural block height from content; scroll only inside body when content exceeds viewport. */

.crud-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.crud-modal {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    min-width: 320px;
    width: fit-content;
    max-width: min(90vw, 640px);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.crud-modal h4 {
    margin-bottom: 0.5rem;
}

.crud-modal-body {
    margin-top: 0.5rem;
    padding-right: 0.25rem;
    max-height: min(70vh, calc(100vh - 8rem));
    overflow-y: auto;
}

.crud-modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
