/* Let provider markup determine the embed block's height. */
.embed__html {
  display: flow-root;
}

.embed--html .embed__html {
  text-align: center;
}

.article-body .embed__html iframe,
.embed__html video {
  display: block;
  max-width: 100%;
  margin-inline: auto;
  border: none;
  border-radius: var(--radius, 8px);
}

/* Supply a ratio only when the video iframe has no declared height.
   Inline provider sizing still takes precedence. */
.article-body iframe:not([height]):is(
  [src*="youtube.com/embed/"],
  [src*="youtube-nocookie.com/embed/"],
  [src*="player.vimeo.com/video/"],
  [src*="dailymotion.com/embed/video/"]
) {
  aspect-ratio: 16 / 9;
}

.article-body iframe:not([width], [height]):is(
  [src*="youtube.com/embed/"],
  [src*="youtube-nocookie.com/embed/"],
  [src*="player.vimeo.com/video/"],
  [src*="dailymotion.com/embed/video/"]
) {
  width: 100%;
}
