.yamm-collection-banner-video {
  position: absolute;
  inset: 0;
  background: #111;
}

.yamm-collection-banner-video :is(picture, img, video) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yamm-collection-banner-video video {
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms ease;
}

.yamm-collection-banner-video.has-frame video {
  opacity: 1;
}

.yamm-home-banner.has-video {
  position: relative;
}

.yamm-home-banner.has-video,
.yamm-collection-hero.has-video {
  --yamm-banner-control-size: 44px;
  --yamm-banner-control-bottom: max(38px, calc(20px + env(safe-area-inset-bottom)));
}

.yamm-collection-hero.has-media.has-video {
  /* Keep the copy above the full playback target, including its focus outline. */
  padding-bottom: max(clamp(52px, 6vw, 82px), calc(var(--yamm-banner-control-bottom) + var(--yamm-banner-control-size) + 12px));
}

.yamm-collection-hero.has-video .yamm-collection-hero__shade {
  pointer-events: none;
}

.yamm-collection-banner-video__control {
  position: absolute;
  right: max(28px, env(safe-area-inset-right));
  bottom: var(--yamm-banner-control-bottom);
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--yamm-banner-control-size);
  height: var(--yamm-banner-control-size);
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.yamm-collection-banner-video__control[hidden],
.yamm-collection-banner-video__control[data-playing] .yamm-collection-banner-video__play,
.yamm-collection-banner-video__control:not([data-playing]) .yamm-collection-banner-video__pause {
  display: none;
}

.yamm-collection-banner-video__control svg {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yamm-collection-banner-video__control:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 620px) {
  .yamm-home-banner.has-video,
  .yamm-collection-hero.has-video {
    --yamm-banner-control-bottom: max(24px, calc(14px + env(safe-area-inset-bottom)));
  }

  .yamm-collection-banner-video__control {
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yamm-collection-banner-video video {
    transition: none;
  }
}
