/* Common shell: content-specific width/layout and save handlers remain owned by each form. */
dialog.fms-popup,[role=dialog].fms-popup{box-sizing:border-box;border:1px solid #cbd9e9!important;border-radius:16px!important;background:#f7faff;box-shadow:0 16px 56px #18395530;padding:48px 20px 20px!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto}
dialog.fms-popup::backdrop{background:#102b4c66}
.fms-popup .fms-popup-close{position:absolute!important;inset:10px 12px auto auto!important;display:inline-flex!important;align-items:center;justify-content:center;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:0!important;margin:0!important;border:1px solid #cbd9e9!important;border-radius:9px!important;background:#fff!important;color:#284765!important;font:24px/1 sans-serif!important;box-shadow:none!important;cursor:pointer;z-index:5}
.fms-popup .fms-popup-close:hover{background:#e7f1ff!important}.fms-popup .fms-popup-close:focus-visible{outline:2px solid #4388dc;outline-offset:2px}
.fms-popup .fms-popup-title{font-size:16px!important;line-height:1.5;margin-top:0;padding-right:30px;color:#193a5c}
.fms-popup.construction-form-popup>iframe{height:calc(100% - 44px)}
.fms-date-field{display:inline-flex;position:relative;align-items:center;min-width:0;max-width:100%;vertical-align:middle}.worker-field>.fms-date-field,.construction-field>.fms-date-field{width:100%}
.fms-date-field>input{box-sizing:border-box;width:100%;min-width:0;padding-right:38px!important;margin:0!important}
.fms-date-field>.date-picker-button.secondary,#construction-form .fms-date-field>.date-picker-button.secondary{position:absolute!important;inset:50% 4px auto auto!important;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;border:0!important;padding:5px!important;margin:0!important;background:transparent!important;color:#375b82;box-shadow:none}
.fms-date-field>.date-picker-button:disabled{display:none}.fms-date-field>.date-picker-button svg{display:block}
@media(max-width:600px){dialog.fms-popup,[role=dialog].fms-popup{padding:46px 12px 12px!important;border-radius:12px!important;max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important}}

/* Inspection owns its title and close row; no outer whitespace. */
dialog.inspection-entry-dialog.fms-popup{padding:0!important;border-radius:4px!important;overflow:hidden!important;background:#fff}
.inspection-entry-dialog.fms-popup .entry-bar .fms-popup-close{position:static!important;inset:auto!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;border:0!important;background:transparent!important;color:#173b67!important;border-radius:3px!important;font-size:23px!important}

dialog.fms-work-dialog.fms-popup,dialog.meter-modal.fms-popup{padding:0!important;border-radius:4px!important;overflow:hidden!important;background:#fff}
.fms-work-dialog.fms-popup .work-dialog-bar .fms-popup-close,.meter-modal.fms-popup .meter-modal-bar .fms-popup-close{position:static!important;inset:auto!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;border:0!important;background:transparent!important;border-radius:3px!important}
.meter-modal.fms-popup .meter-modal-bar .fms-popup-close{color:#173b67!important}
@media(max-width:650px){dialog.meter-modal.fms-popup,dialog.fms-work-dialog.fms-popup,dialog.inspection-entry-dialog.fms-popup{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;border-radius:0!important}}

/* Content-sized approval settings: one title row and no empty lower shell. */
dialog.fms-popup.jw-settings-compact{padding:0!important;border-radius:12px!important;background:#fff!important;height:fit-content!important;width:min(540px,94vw)}
.jw-settings-compact>.ui-title{padding:12px 18px;margin:0;border-bottom:1px solid #dce4ee;display:flex;align-items:center;justify-content:space-between}
.jw-settings-compact .fms-popup-close{position:static!important;inset:auto!important;flex:0 0 32px}
.jw-settings-compact .fms-popup-title{margin:0!important;padding:0!important}
dialog#reject-dialog.fms-personal-dialog { height:fit-content!important; min-height:0!important; max-height:calc(100dvh - 24px)!important; padding-bottom:16px!important; }
#reject-dialog #reject-form, #reject-dialog .actions { margin-bottom:0!important; }
