/* The AppDialog box, shared by the web panel, the staff app and the driver app (moved out of ui.css so the driver app,
   which does not load ui.css, gets the same box without a copy). Load it after ui.css where both are loaded. */
/* Dialog: centred sheet on desktop, bottom sheet on phones. */
.dialog {
  margin: auto; padding: 0; border: none; overflow: hidden; color: var(--text);
  inline-size: min(480px, calc(100vw - 32px)); max-inline-size: none; max-block-size: calc(100vh - 48px);
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-float);
}
.dialog[open] { display: flex; flex-direction: column; animation: pop var(--dur-base) var(--ease); }
.dialog::backdrop { background: rgba(12, 36, 16, .38); animation: fade var(--dur-fast) var(--ease); }
.dialog-panel { display: flex; flex-direction: column; flex: 1; min-block-size: 0; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.dialog-head h2 { font-size: 1.1rem; }
.dialog-body { padding: 12px 20px; overflow-y: auto; }
.dialog-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px 18px; }
form.dialog-body .dialog-foot { padding: 6px 0 6px; }
/* Unsaved-changes guard of AppDialog (Dirty): at the end of the panel, never scrolls away with the body. Its border is the error border, as .error. */
.dialog-guard { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 20px 16px; background: var(--error-50); border-block-start: 1px solid var(--error-line); }
.dialog-guard p { margin: 0; color: var(--error); font-weight: 600; }
.dialog-guard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; translate: 0 var(--move-enter); } }
