figure.iframe-wrapper > div {
  position: relative;
  padding-top: 75%;
  margin-bottom: 0.5rem;
}

figure.iframe-wrapper.half-height > div {
  padding-top: 37.5%;
}

figure.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #f2f2f2;
  box-sizing: border-box;
  border-radius: 0 0 calc(var(--padding)/4) calc(var(--padding)/4);
}

figure video {
  width: auto;
}

.highlight {
  margin-bottom: 1.5em;
}

.highlight pre {
  border-radius: calc(var(--padding)/4);
}

code[class*="language-"] {
  padding: 0;
}

figure .reload {
  border: 0px;
  position: absolute;
  top: 10px;
  left: 10px;

  width: 32px;
  height: 32px;
  border-radius: 50%;

  cursor: pointer;
  background: #eaeaea;
}

figure .reload:hover {
  background: #cccccc;
}

figure .reload img {
  border: 0px;
}

figure.iframe-wrapper > figcaption:first-child {
  margin-bottom: 0;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

figcaption > .action {
  font-size: 1.4rem;
  display: block;
  float: left;
  margin-right: 0.5rem;
}

/** Fallback content — stuff to show/hide when we can't display the embedded demos */

/* On desktop, don't show any of our fallback content */
figure.fallback-wrapper, .narrow-notice, .print-notice { display: none; }

/* On small screens, switch to the narrow-screen fallback content */
@media screen and (max-width: 960px) {
  figure.iframe-wrapper, .wide-notice { display: none; }
  .narrow-notice { display: inline; }
  figure.fallback-wrapper { display: block; }
}

/* When printing, switch to print fallback content */
@media print {
  figure.iframe-wrapper, .wide-notice { display: none; }
  .print-notice { display: inline; }
  figure.fallback-wrapper { display: block; }
}
