/* Shared by the private budget and receipt-split views. Keep pinch zoom available. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body input,
body select,
body textarea {
  /* Smaller inherited label text makes iOS zoom when a field receives focus. */
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
  scroll-margin-block: 76px 24px;
}
html.utility-dialog-open {
  overflow: hidden;
}
.utility-dialog {
  position: fixed;
  top: calc(var(--utility-viewport-top, 0px) + var(--utility-viewport-height, 100dvh) / 2);
  right: 0;
  bottom: auto;
  left: 0;
  margin: 0 auto;
  transform: translateY(-50%);
  max-height: calc(var(--utility-viewport-height, 100dvh) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  scroll-padding-block: 76px 24px;
}
.utility-dialog h2 {
  min-width: 0;
}
.utility-dialog h2:focus {
  outline: none;
}
.utility-dialog .icon,
.utility-dialog .icon-button {
  flex-shrink: 0;
}
.utility-dialog .budget-modal__form > .section-heading:first-child {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
/* One scroll area keeps every field/action reachable, including with a keyboard. */
#recurringModal {
  overflow-y: auto;
}
#recurringForm {
  max-height: none;
}
.recurring-fields {
  overflow: visible;
}
@media (max-width: 759px) {
  .utility-dialog {
    top: calc(var(--utility-viewport-top, 0px) + var(--utility-viewport-height, 100dvh));
    transform: translateY(-100%);
    max-height: calc(var(--utility-viewport-height, 100dvh) - 12px);
  }
}
