/* The studio embed identifies its page, including after a CMS layout changes. */
body:is([data-bike-studio-fullscreen], :has(.bike-studio-page > iframe, iframe#bike-studio-view),
        .is-ctl-bikestudiopage, .twt-cms-id-5d5b9f5, :has(.twt-cms-id-5d5b9f5))
  :is(.cms-breadcrumb, .breadcrumb, .header-main, .nav-main, .footer-main, .scroll-up-container) {
  display: none !important;
}

/* The embedded studio has its own scrolling content. */
body:is([data-bike-studio-fullscreen], :has(.bike-studio-page > iframe, iframe#bike-studio-view),
        .is-ctl-bikestudiopage, .twt-cms-id-5d5b9f5, :has(.twt-cms-id-5d5b9f5)) {
  margin: 0;
  overflow: hidden;
}
/* A transformed CMS column would become the containing block for a fixed iframe. */
body :has(.bike-studio-page > iframe, iframe#bike-studio-view),
:is(.twt-cms-id-5d5b9f5, [data-bike-studio-fullscreen]) :has(iframe#unleazhed-bike-studio) {
  transform: none !important;
  contain: none !important;
}

/* Both the plugin wrapper and an existing stand-alone CMS iframe are supported. */
.bike-studio-page:has(> iframe),
:not(.bike-studio-page) > iframe#bike-studio-view,
:is(.twt-cms-id-5d5b9f5, [data-bike-studio-fullscreen]) :where(
  iframe#unleazhed-bike-studio, iframe#bike-studio-view,
  iframe[src^="/Bike-Studio/" i], iframe[src^="https://www.unleazhed.com/Bike-Studio/" i]
) {
  position: fixed !important;
  inset: 0;
  z-index: 20;
  box-sizing: border-box;
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  background: #e9ece6;
}
.bike-studio-page > iframe {
  position: static !important;
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  border: 0;
}
/* Older CMS embeds can still contain the studio's former settings row. */
.bike-studio-page > .bike-studio-privacy {
  display: none !important;
}
