/* Booking form embedded on royalhomeflooring.com/free-in-home-estimate/ (?embed=1).
   Every rule is scoped to html.royal-embed, which royal-booking-embed.js sets only in embed mode.
   The parent sizes the frame to the document height, so nothing visible may depend on the
   frame's own viewport height (100vh/100dvh would grow with every resize). */
html.royal-embed,
html.royal-embed body,
html.royal-embed.rbl-same-page-booking-open,
html.royal-embed.rbl-same-page-booking-open body {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}
html.royal-embed body { margin: 0 !important; padding-top: 0 !important; background: #f2f1ee; }

/* Book's own page chrome: the main-site page around the frame provides it. */
html.royal-embed .skip-link,
html.royal-embed .site-header,
html.royal-embed .site-footer,
html.royal-embed .cinema-panel--sale,
html.royal-embed .sale-banner,
html.royal-embed .royal-cinema__slide:not(.royal-cinema__slide--booking),
html.royal-embed .rfa-root,
html.royal-embed [data-rfa-root],
html.royal-embed [data-rfa-booking-dock],
html.royal-embed .rbl-ai-help-container,
html.royal-embed .royal-cinema__progress,
html.royal-embed .royal-cinema__media,
html.royal-embed .royal-cinema__grain,
html.royal-embed .royal-cinema__copy,
html.royal-embed #Content .entry-content > :not(#royal-booking) {
  display: none !important;
}

/* Step 1: the booking card alone, on its usual photo backdrop. */
html.royal-embed .royal-page-main,
html.royal-embed .site-main,
html.royal-embed .royal-cinema,
html.royal-embed .royal-cinema__slide {
  min-height: 0 !important;
}
html.royal-embed .royal-cinema__content {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center;
  min-height: 0 !important;
  padding: clamp(16px, 4vw, 40px) clamp(8px, 2vw, 24px) !important;
}
html.royal-embed .cinema-panel--booking {
  grid-column: 1 / -1 !important;
  justify-self: center !important;
  width: min(100%, 620px) !important;
  max-width: 620px !important;
}

/* Steps 2+: the booking shell flows in the page instead of covering a fixed viewport. */
html.royal-embed.rbl-same-page-booking-open #primary { display: none !important; }
html.royal-embed .rbl-same-page-shell {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
}
html.royal-embed .rbl-same-page-shell__content {
  overflow: visible !important;
  padding-bottom: 24px !important;
}

/* Thank-you page: no room is needed for the hidden fixed header. */
html.royal-embed .royal-page-main,
html.royal-embed .site-main { padding-top: 0 !important; }
html.royal-embed .royal-microsite-subpage { min-height: 0 !important; }
