html[data-fullscreen="false"] button.fullscreen {
  display: none;
}

.gallery-example {
  display: grid;
  row-gap: 1rem;
  padding: 1rem 2rem;
  margin-bottom: 3rem;
  background-color: var(--cream);
}

.gallery-example:last-child {
  margin-bottom: 0;
}

.gallery-example h2 {
  grid-area: title;
  text-align: left;
  font-size: 1.7rem;
  margin: 0;
}

.gallery-example .iframe-wrapper {
  grid-area: iframe;
  position: relative;
}

.gallery-example .iframe-wrapper iframe {
  width: 100%;
  background-color: var(--off-white);
  display: block;
  top: 0;
  left: 0;
}

.gallery-example .iframe-wrapper iframe:not([src]) {
  display: none;
}

.gallery-example .iframe-wrapper iframe[src] {
  position: absolute;
  visibility: hidden;
}

.gallery-example .iframe-wrapper iframe[data-ready="true"] {
  visibility: unset;
}

.gallery-example .iframe-wrapper iframe:not([data-ready="true"]) ~ .fullscreen {
  display: none;
}

.gallery-example .iframe-wrapper .fullscreen {
  position: absolute;
  right: 2%;
  bottom: 2%;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  font-size: 0.8rem;
}

.gallery-example .iframe-wrapper .poster {
  all: unset;
  top: 0;
  left: 0;
  background-color: var(--off-white);
  width: 100%;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(1rem, 5vw, 2rem);
  color: var(--off-white);
  cursor: pointer;
  opacity: 1;
  transition: ease-in-out opacity 1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-example .iframe-wrapper .poster img {
  position: absolute;
  object-fit: cover;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  filter: grayscale(0.4);
}

.gallery-example .iframe-wrapper iframe[data-ready="true"] ~ .poster {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.gallery-example .iframe-wrapper .poster > span {
  width: 10em;
  text-align: center;
  background-color: var(--burgundy);
  padding: 0.3em 1em;
  filter: drop-shadow(0.2em 0.2em 0.2em rgba(0,0,0, 0.8));
}

.gallery-example .iframe-wrapper .poster:active > span {
  filter: drop-shadow(0.05em 0.05em 0.025em rgba(0,0,0, 0.9));
}

.gallery-example .iframe-wrapper .poster:focus-visible > span {
  outline: 3px solid var(--off-white);
  box-shadow: 0 0 0 6px var(--dark-blue);
}

.gallery-example .iframe-wrapper iframe[src] ~ .poster .launch {
  display: none;
}

.gallery-example .iframe-wrapper .poster .fa-loader {
  animation: rotating 2s linear infinite;
}

.gallery-example .iframe-wrapper iframe:not([src]) ~ .poster .loading {
  /* Hack to preload icon whilst keeping it hidden */
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gallery-example .tags {
  grid-area: tags;
  font-style: italic;
}

.gallery-example .description {
  grid-area: description;
}


@keyframes rotating {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}


@media (min-width: 1100px) {
  .gallery-example {
    grid-template-columns: 3fr 1fr;
    column-gap: 2rem;
    align-items: center;
    grid-template-areas:
      "title tags"
      "iframe description";
  }
  .gallery-example .tags {
    text-align: right;
  }
}


@media not (min-width: 1100px) {
  .gallery-example {
    grid-template-columns: 1fr;
    align-items: center;
    grid-template-areas:
      "title"
      "tags"
      "description"
      "iframe";
  }
}