/* Blog post modals only — overrides reset.css .modal-dialog (12% top margin, 1358px width) */

.modal-dialog:has(.manage-blogpost-modal-shell) {
    margin: 0.75rem auto !important;
    max-width: min(900px, calc(100vw - 1.5rem)) !important;
    width: min(900px, calc(100vw - 1.5rem)) !important;
    max-height: calc(100vh - 1.5rem);
}

.modal-dialog.modal-dialog-centered:has(.manage-blogpost-modal-shell) {
    min-height: calc(100% - 1.5rem) !important;
    align-items: center;
}

.modal-dialog:has(.manage-blogpost-modal-shell) .modal-content {
    max-height: calc(100vh - 1.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-dialog:has(.manage-blogpost-modal-shell) .modal-content .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-height: 800px) {
    .manage-blogpost-modal-shell {
        max-height: calc(100vh - 6rem);
    }
}
