/* Product video */

/* Player frame (gallery + lightbox) */
.rc-pv-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}
.rc-pv-frame > video,
.rc-pv-frame > iframe,
.rc-pv-frame > .rc-pv-facade {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
}
.rc-pv-frame > video {
  object-fit: contain;
  background: #000;
}

/* YouTube / Vimeo thumbnail with play button */
button.rc-pv-facade,
button.rc-pv-facade:hover,
button.rc-pv-facade:focus {
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: #000;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: pointer;
}
.rc-pv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  transition: background 0.2s ease, transform 0.2s ease;
}
.rc-pv-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -7px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}
button.rc-pv-facade:hover .rc-pv-play,
button.rc-pv-facade:focus-visible .rc-pv-play {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.08);
}

/* Gallery */
.woocommerce-product-gallery.rc-pv-active .woocommerce-product-gallery__trigger {
  display: none;
}
.woocommerce div.product div.images .flex-control-thumbs li.rc-pv-nav-thumb {
  position: relative;
}
.woocommerce div.product div.images .flex-control-thumbs li.rc-pv-nav-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin: -6px 0 0 -4px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

/* Lightbox */
.rc-pv-pswp {
  position: relative;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 44px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
}
.rc-pv-pswp .rc-pv-frame {
  width: min(100cqw, 100cqh * var(--rc-pv-ratio, 1.7778));
  max-width: 1200px;
}

/* Product cards */
.rc-pv-card-media {
  position: relative;
  display: block;
  overflow: hidden;
}
.rc-loop-image-wrapper .rc-pv-card-media {
  height: 100%;
}
.rc-pv-card-video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  container-type: size;
  transition: opacity 0.4s ease;
}
.woocommerce ul.products li.product a .rc-pv-card-video {
  bottom: 5px; /* card images have 5px bottom padding */
}
.rc-pv-card-video.is-playing {
  opacity: 1;
}
li.product.outofstock .rc-pv-card-video.is-playing,
.rc-product-slider .item.outofstock .rc-pv-card-video.is-playing {
  opacity: 0.35;
}
.rc-pv-card-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rc-pv-card-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 177.78cqh);
  height: max(100%, 56.25cqw);
  border: 0;
  transform: translate(-50%, -50%);
}
