.customiframe {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f7f7f7;
}

/* WP responsive embeds size the wrapper via ::before; fill that box. */
.wp-block-embed__wrapper > .customiframe {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  aspect-ratio: auto;
}

.customiframe__fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 1.6rem;
  background-color: #f7f7f7;
  color: #000;
  font-size: 1.4rem;
  line-height: 1.111em;
  text-align: center;
}

.customiframe__fallback[hidden] {
  display: none;
}

.customiframe__fallback-text {
  margin: 0;
  max-width: 36em;
}

.customiframe__fallback .customiframe__fallback-button,
.customiframe__fallback button.cky-banner-element {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  text-shadow: none !important;
  background: none !important;
  color: inherit !important;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-transform: none;
  cursor: pointer;
  appearance: none;
}

.customiframe__fallback .customiframe__fallback-button:hover,
.customiframe__fallback .customiframe__fallback-button:focus,
.customiframe__fallback button.cky-banner-element:hover,
.customiframe__fallback button.cky-banner-element:focus {
  background: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: inherit !important;
}

.customiframe:not(.is-allowed) > iframe {
  visibility: hidden;
}

.customiframe.is-allowed {
  background-color: transparent;
}

/* Keep WP absolute iframe fill working inside our wrap. */
.wp-embed-responsive .wp-has-aspect-ratio .customiframe > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
