/* ============================================================
   LIBWIZARD EMBED — standalone (non-tutorial) pages
   ============================================================
   LibWizard iframes never post a height to the parent (verified Aug 2026:
   the child posts `form`, `form_loaded`, `slides` and nothing else), so the
   height has to be declared here. Each form is measured and its values are
   set as --lw-height / -sm / -xs inline on .libwizard-embed in the node body;
   the fallbacks below are deliberately generous so an un-tuned embed scrolls
   a little rather than clipping its Submit button.

   Tutorial nodes use css/tutorial-page.css instead, which declares the same
   selectors with !important and an expand-on-interaction variant. This file
   is not attached to tutorial nodes — see gmu_libraries_preprocess_node().
   ============================================================ */
.libwizard-embed {
  /* Same reading line length and left alignment as .webform-submission-form
     in layout-overrides.css, so a LibWizard form sits where a Drupal one did
     rather than stretching the full no-sidebar content width. */
  max-width: 720px;
  margin: 1.5rem auto 2rem 0;
}

.libwizard-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  height: var(--lw-height, 1400px);
  min-height: var(--lw-height, 1400px);
}

@media (max-width: 768px) {
  .libwizard-embed iframe {
    height: var(--lw-height-sm, 1600px);
    min-height: var(--lw-height-sm, 1600px);
  }
}

@media (max-width: 480px) {
  .libwizard-embed iframe {
    height: var(--lw-height-xs, 1900px);
    min-height: var(--lw-height-xs, 1900px);
  }
}

/* Fallback link shown under the embed for anyone whose browser or extension
   blocks the third-party frame. */
.libwizard-embed__fallback {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}
