.yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #111;
  overflow: hidden;
  cursor: pointer;
}

.yt img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background-color: rgba(17, 17, 17, 0.85);
  color: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.yt-play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 0.25rem;
  border-style: solid;
  border-width: 0.65rem 0 0.65rem 1.1rem;
  border-color: transparent transparent transparent #fff;
}

.yt:hover .yt-play,
.yt-play:hover {
  background-color: #111;
  transform: translate(-50%, -50%) scale(1.06);
}

.yt-play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.yt.yt-active {
  cursor: default;
}

.yt.yt-active iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .yt-play {
    transition: none;
  }

  .yt:hover .yt-play,
  .yt-play:hover {
    transform: translate(-50%, -50%);
  }
}
