/* Scoped to profile dialogs; full-page navigation is unchanged. */
dialog:is([class^="ph-"],[class*=" ph-"])[open]{position:fixed!important;inset:0!important;margin:auto!important;transform:none!important;box-sizing:border-box;max-width:95vw!important;max-height:90dvh!important;overflow:auto;overscroll-behavior:contain;background:white;color:#111;box-shadow:0 16px 55px #0003}
dialog:is([class^="ph-"],[class*=" ph-"])::backdrop{background:#1118}
html:has(dialog[open]),html:has(dialog[open]) body{overflow:hidden!important}
.ph-workflow-dialog[open]{width:min(950px,95vw);padding:0;border:1px solid #ddd;border-radius:12px;display:flex;flex-direction:column;overflow:hidden}
.ph-workflow-dialog>header,.ph-workflow-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;flex:none;background:#fff}
.ph-workflow-dialog>header{border-bottom:1px solid #eee}.ph-workflow-dialog>footer{border-top:1px solid #eee;justify-content:flex-end}
.ph-workflow-dialog h2{margin:0;font-size:20px}.ph-workflow-dialog button{min-height:44px;min-width:44px;background:#fff;color:#111;border:1px solid #ddd;border-radius:6px;padding:8px 12px;cursor:pointer}
.ph-workflow-dialog iframe{border:0;width:100%;height:68dvh;min-height:0;background:#fff}.ph-workflow-status{margin:0;padding:0 18px;font-size:14px}
.ph-ex-dialog[open]{width:min(950px,95vw)!important;display:flex;flex-direction:column;overflow:hidden}
.ph-ex-dialog [data-ph-ex-content]{min-height:0;overflow:auto}.ph-ex-dialog:has(iframe) [data-ph-ex-content]{padding:0;overflow:hidden}.ph-ex-dialog iframe{height:65dvh;width:100%;border:0}
.ph-ex-dialog>header,.ph-ex-dialog>footer{flex:none}
.ph-workflow-dialog :focus-visible{outline:2px solid #111;outline-offset:3px}
@media(max-width:600px){dialog:is([class^="ph-"],[class*=" ph-"])[open]{max-height:95dvh!important}.ph-workflow-dialog iframe{height:72dvh}.ph-workflow-dialog>header,.ph-workflow-dialog>footer{padding:10px 12px}.ph-workflow-dialog h2{font-size:18px}}

/* Native and Drupal UI dialogs share the same viewport bounds. */
dialog[open]{max-width:95vw;max-height:90dvh;box-sizing:border-box}
.ui-dialog[role=dialog]{position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;max-width:min(1000px,95vw);max-height:90dvh;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden}
.ui-dialog .ui-dialog-titlebar,.ui-dialog .ui-dialog-buttonpane{flex:0 0 auto}.ui-dialog .ui-dialog-content{min-height:0;max-height:75dvh!important;overflow:auto;overscroll-behavior:contain}
@media(max-width:600px){dialog[open],.ui-dialog[role=dialog]{max-height:95dvh}.ui-dialog[role=dialog]{width:95vw!important}}

.ph-profile-dialog[open]{height:fit-content!important}
.ph-profile-dialog [data-ph-modal-status]:empty,.ph-profile-dialog-footer[hidden]{display:none!important}
.ph-profile-dialog:has(iframe) [data-ph-modal-content]{flex:0 1 auto}
.ph-duplicate-record{padding:14px 0;border-bottom:1px solid #eee}.ph-duplicate-record h3{font-size:17px;margin:0 0 6px}.ph-duplicate-record a{display:inline-block;margin:8px 14px 0 0}

.ph-workflow-dialog[open]{width:min(820px,95vw)!important;border:1px solid #e5e7eb!important;border-radius:8px!important}
.ph-workflow-dialog h2{font-size:16px}.ph-workflow-dialog iframe{height:65dvh}.ph-workflow-dialog button{font-size:13px;min-height:36px;padding:8px 12px}
