/* Keep dialogs within the visible viewport, including the on-screen keyboard. */
:root { --customer-viewport-height: 100dvh; --customer-viewport-top: 0px; }
.sheet, .auth-dialog {
  position: fixed;
  inset: var(--customer-viewport-top) 0 auto;
  width: 100%;
  height: var(--customer-viewport-height);
  max-height: var(--customer-viewport-height);
  margin: 0;
  box-sizing: border-box;
}
.sheet-panel, .sheet-panel.compact {
  box-sizing: border-box;
  min-height: 0;
  max-height: calc(var(--customer-viewport-height) - env(safe-area-inset-top, 0px) - 12px);
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 64px 24px;
}
.sheet-panel > .sheet-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: 4px;
  flex-shrink: 0;
  z-index: 5;
}
.auth-dialog { padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)); }
.auth-card {
  box-sizing: border-box;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
@media (max-width: 759px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  input, select, textarea { font-size: 16px !important; }
  button, a, input, select, textarea { touch-action: manipulation; }
  .sheet-panel { padding-inline: 16px; }
  .sheet-panel button { white-space: normal; overflow-wrap: anywhere; }
  .location-picker-map { height: min(40dvh, 300px); min-height: 120px; }
  .location-picker-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .location-picker-actions button { min-width: 0; }
}
