/* The native select and date input must fit their grid column on narrow screens. */
.rg-form fieldset,
.rg-form-layout > *,
.rg-extra-fields > * {
  min-inline-size: 0;
}

/* Keep the mobile contact bar outside the form's vertical scroll area. */
@media screen and (max-width: 700px), screen and (hover: none) and (pointer: coarse) {
  html,
  body.rg-site {
    overflow: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
  }

  body.rg-site {
    position: fixed;
    inset: 0;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .rg-quote-scroll {
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
  }

  .rg-dock {
    position: relative;
    flex: none;
  }
}

@media (max-width: 700px) {
  .rg-foot-base {
    padding-bottom: 1rem;
  }

  .rg-form-layout,
  .rg-extra-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .rg-form-layout {
    overflow-wrap: anywhere;
  }

  .rg-form input,
  .rg-form select,
  .rg-form textarea {
    font-size: max(16px, 1em);
  }
}
