/* Content-sized modal widths shared by agency and platform order editors. */
:root{--ut-dialog-compact:560px;--ut-dialog-picker:720px;--ut-dialog-wide:960px;--ut-dialog-limit:calc(100dvh - 40px)}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms]{width:min(var(--ut-dialog-compact),calc(100vw - 32px))!important;max-width:var(--ut-dialog-compact)!important;height:fit-content!important;min-height:0!important;max-height:var(--ut-dialog-limit)!important}
body dialog.ut-agent-edit-dialog[data-active-scope=guests],body dialog.ut-agent-edit-dialog.ut-guest-edit{width:min(var(--ut-dialog-wide),calc(100vw - 32px))!important;height:fit-content!important;min-height:0!important;max-height:var(--ut-dialog-limit)!important}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms][open]{display:flex!important;flex-direction:column;overflow:hidden!important}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms]>.ut-edit-dialog-header{flex:none;padding:16px 22px}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms]>.ut-edit-dialog-body{height:auto;min-height:0;max-height:calc(100dvh - 124px);overflow:auto;overscroll-behavior:contain;padding:16px 22px 0!important}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-edit-dialog-body>form{height:auto;min-height:0}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-room-editor__row{flex-wrap:nowrap;gap:10px 12px;padding:8px 0}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-room-editor__actions{display:flex;flex:0 0 auto;justify-content:flex-end;gap:12px;margin-left:auto}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms] :is(.ut-agent-actions,.ut-supplier-edit-actions){position:sticky;bottom:0;margin:16px -22px 0!important;padding:14px 22px!important;background:#fff;border-top:1px solid #e1e9f1}

/* Opposing viewport insets must not stretch an auto-height dialog. */
body dialog.ut-agent-edit-dialog[data-active-scope],body dialog.ut-agent-edit-dialog.ut-guest-edit{inset:auto!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;margin:0!important;height:fit-content!important;min-height:0!important}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-room-editor__counter{gap:5px}
body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-room-editor__row>strong{flex:0 0 44px}

@media(max-width:480px){body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-room-editor__row{flex-wrap:wrap}body dialog.ut-agent-edit-dialog[data-active-scope=rooms] .ut-room-editor__counter{gap:4px}}

/* Shared footer controls for order dialogs in the portal and platform admin. */
body dialog[open] .ut-modal-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body dialog[open] .ut-modal-actions > button {
  box-sizing: border-box;
  min-width: 88px;
  min-height: 38px;
  margin: 0;
  padding: 8px 18px;
  border: 0;
  border-radius: 5px;
  background: #eff3f8;
  color: #526b80;
  font-size: 13px;
  line-height: 20px;
}

body dialog[open] .ut-modal-actions > :is(.ut-agent-primary, .button-primary) {
  background: #0166e9;
  color: #fff;
  font-weight: 700;
}

body dialog[open] .ut-modal-actions > button:focus-visible {
  outline: 2px solid #0166e9;
  outline-offset: 2px;
}
