/* CRM dialog contract: one coordinate space, viewport bounds, internal scrolling.
   Page density is restored automatically when the last dialog is closed. */
html:has(>body.ux-v1 dialog[open]),html.service-window-active{zoom:1!important;overflow:hidden}
body.ux-v1 dialog{box-sizing:border-box;max-inline-size:calc(100vw - 32px)!important;max-block-size:calc(100dvh - 32px)!important;min-inline-size:0!important;overscroll-behavior:contain}
body.ux-v1 dialog[open]{overflow:auto}
body.ux-v1 dialog :is(form,.editor-grid,label,fieldset,iframe){min-inline-size:0;box-sizing:border-box}
body.ux-v1 dialog :is(input,select,textarea){max-inline-size:100%;box-sizing:border-box}
body.ux-v1 dialog>form>.actions{position:sticky;bottom:0;z-index:5;background:#fff;flex-wrap:wrap;padding-block:10px}
body.ux-v1 dialog.resizable-record-dialog[open]{min-block-size:min(340px,calc(100dvh - 32px));resize:both}
body.ux-v1 dialog.resizable-record-dialog>iframe{width:100%;min-height:0;flex:1}
html.service-window-active .services-editor-tab.service-window-open{inset:16px;width:auto;height:auto;min-width:0;min-height:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);zoom:1;resize:both}
body.crm-embedded #service-dialog[open]{max-inline-size:none!important;max-block-size:none!important;overflow:hidden}
@media(max-width:600px){body.ux-v1 dialog{max-inline-size:calc(100vw - 16px)!important;max-block-size:calc(100dvh - 16px)!important}html.service-window-active .services-editor-tab.service-window-open{inset:8px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}}
body.ux-v1 #client-payment-card footer{bottom:0;padding-bottom:10px}

body.ux-v1 .hotel-create-dialog[open] {
    display: flex;
    flex-direction: column;
    width: min(720px, 94vw);
    height: min(620px, 85dvh);
}
.hotel-create-dialog > .section-heading {
    flex: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.hotel-create-dialog > iframe {
    border: 0;
}
