/* Enquiry visuals (enquiry-motion.js): the card unrolls from its top edge, the dim fades.
   While moving, the dim is drawn as the dialog's own background (a closed dialog has no backdrop). */
.enquiry-dialog.enquiry-motion-opening::backdrop { background: transparent; }

/* A closed <dialog> leaves the screen at once; keep it drawn, unclickable, for the fade. */
.enquiry-dialog.enquiry-motion-closing {
  display: grid;
  place-items: safe center;
  z-index: 50;
  pointer-events: none;
}

@media (max-width: 760px) {
  .enquiry-dialog.enquiry-motion-closing { align-items: start; }
}

/* Form → thanks: the card eases to the thanks height; an inert copy of the title and form
   fades out where they were. */
.enquiry-dialog.enquiry-motion-swapping .enquiry { overflow: clip; }
.enquiry-motion-ghost { position: absolute; inset: 0; pointer-events: none; }
.enquiry-dialog .enquiry-motion-ghost > * { position: absolute; margin: 0; }
.enquiry-dialog .enquiry-motion-ghost > .enquiry-title { display: block; }
.enquiry-dialog .enquiry-motion-ghost > .enquiry-form { display: flex; }

@media (prefers-reduced-motion: reduce) {
  .enquiry-motion .enquiry, .enquiry-motion .enquiry > * {
    opacity: 1 !important;
    clip-path: none !important;
  }
}
