/* Course content import modals (resources, assignments, discussions, rubrics): fit in viewport, scroll body, keep footer visible */
.course-content-import-modal .modal-dialog {
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
}

.course-content-import-modal .modal-dialog.modal-dialog-scrollable {
    height: auto;
    max-height: calc(100vh - 2rem);
}

.course-content-import-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.course-content-import-modal .modal-header {
    flex-shrink: 0;
}

.course-content-import-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-content-import-modal .modal-footer {
    flex-shrink: 0;
}

/* Scroll only the item list so Cancel / Import stay visible (assignments, resources, discussions, rubrics) */
.course-content-import-modal .import-resource-list,
.course-content-import-modal .import-rubric-list {
    flex: 1 1 auto;
    min-height: 120px;
    min-width: 0;
    width: 100%;
    max-height: min(300px, 50vh);
    overflow-y: auto;
    overflow-x: hidden;
}
