/**
 * Basic Embed Module
 *
 * Styles for template-parts/modules/basic_embed_module.php
**/

.basic_embed_module {
  padding: 60px 0;
}

/* Anchor ID set — clear the fixed header when jumped to. Set on the
   element itself (not just :target) so the smooth-scroll click handler
   in main.js can read it before the hash changes. Same 150px clearance
   as the Sticky Content module. */
.basic_embed_module[id] {
  scroll-margin-top: 150px;
}

.basic-embed__body {
  position: relative;
}

/* Make dropped-in iframes fluid and prevent layout shift */
.basic-embed__body iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

/* Contained (not Full Width) — centre embeds narrower than the container.
   Covers iframes at any depth plus the first two levels of widget markup,
   since script widgets usually inject a max-width box into their holder
   div (e.g. ReviewSolicitors: #rswidget_x > .rs-masonry-widget, max 1000px).
   Auto margins do nothing to full-width blocks, so wide embeds are unaffected. */
.basic_embed_module:not(.basic_embed_module--full) .basic-embed__body iframe,
.basic_embed_module:not(.basic_embed_module--full) .basic-embed__body > *,
.basic_embed_module:not(.basic_embed_module--full) .basic-embed__body > * > * {
  margin-left: auto;
  margin-right: auto;
}

/* Full Width — break out of the theme container, edge to edge */
.basic-embed__bleed {
  width: 100vw;
  max-width: 100vw;
  /* Pull back to the viewport edges regardless of parent padding */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.basic_embed_module--full .basic-embed__body iframe {
  width: 100%;
}

@media (max-width: 992px) {
  .basic_embed_module { padding: 48px 0; }
}
