.jess-product-video {
  position: relative;
}

.jess-product-video__embed {
  width: 100%;
  position: relative;
  padding-top: var(--jess-product-video-padding, 100%);
  aspect-ratio: var(--jess-product-video-aspect, 1 / 1);
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jess-product-video__embed--responsive {
  position: relative;
}

.jess-product-video__frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
}

.jess-product-video__frame iframe,
.jess-product-video__frame embed,
.jess-product-video__frame object {
  display: block;
  width: 100%;
  height: 100%;
}

.jess-product-video__frame video,
.jess-product-video__frame .wp-video,
.jess-product-video__frame .mejs-container {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
}

.jess-product-video__frame .mejs-inner,
.jess-product-video__frame .mejs-mediaelement,
.jess-product-video__frame .mejs-container video {
  width: 100% !important;
  height: 100% !important;
}

.jess-product-video__embed--selfhosted video {
  display: block;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.jess-product-video__embed--selfhosted::before,
.jess-product-video__embed--selfhosted::after {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.jess-product-video__embed--selfhosted::before {
  content: "";
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15));
}

.jess-product-video__embed--selfhosted::after {
  content: "";
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  transform: translate(-40%, -50%);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.jess-product-video__embed--selfhosted.is-playing::before,
.jess-product-video__embed--selfhosted.is-playing::after {
  opacity: 0;
}

.jess-product-video-thumb {
  position: relative;
}

.jess-product-video-thumb::before,
.jess-product-video-thumb::after {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.jess-product-video-thumb::before {
  content: "";
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.jess-product-video-thumb::after {
  content: "";
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translate(-40%, -50%);
}
