/* Shared by the product page and the module configuration preview. */
.rafac-product-videos-thumbs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.rafac-product-videos-thumbs.animated {
  margin: 0 1rem;
}
.rafac-product-videos-thumbs.animated.spinner {
  margin: 0 2rem;
}
.rafac-video-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.rafac-video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.rafac-video-thumb svg {
  position: absolute;
  top: 25%;
  left: 25%;
  width: 50%;
  height: 50%;
  color: #fff;
}
.rafac-product-videos-thumbs.pulse .rafac-video-thumb,
.rafac-product-videos-thumbs.glow .rafac-video-thumb {
  transition: all 0.2s ease;
  background: linear-gradient(135deg, var(--rafac-bubble-color-primary) 0%, var(--rafac-bubble-color-secondary) 100%);
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;
}
.rafac-product-videos-thumbs.pulse .rafac-video-thumb img,
.rafac-product-videos-thumbs.glow .rafac-video-thumb img {
  background-color: #fff;
  padding: 4px;
}
.rafac-product-videos-thumbs.pulse .rafac-video-thumb.animation-first {
  overflow: visible;
  box-shadow: 0 0 0 0 var(--rafac-bubble-color-primary-67), 0 0 0 0 var(--rafac-bubble-color-secondary-70);
  animation: rafac-video-bubble-pulse var(--rafac-bubble-animation-duration, 4s) infinite;
}
.rafac-product-videos-thumbs.float .rafac-video-thumb.animation-first {
  box-sizing: border-box;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.6);
  transform: translateY(0);
  animation: rafac-video-bubble-float var(--rafac-bubble-animation-duration, 4s) ease-in-out infinite;
}
.rafac-product-videos-thumbs.heartbeat .rafac-video-thumb.animation-first {
  animation: rafac-video-bubble-heartbeat var(--rafac-bubble-animation-duration, 4s) ease-in-out infinite;
}
.rafac-product-videos-thumbs.glow .rafac-video-thumb.animation-first {
  overflow: visible;
  animation: rafac-video-bubble-glow var(--rafac-bubble-animation-duration, 4s) ease-in-out infinite;
}
.rafac-product-videos-thumbs.spinner .rafac-video-thumb.animation-first {
  --rafac-spinner-offset: 12px;
  --rafac-spinner-ring: 8px;
  --rafac-spinner-dot: 10px;
  --rafac-spinner-thumb-size: 80px;
  --rafac-spinner-ring-center: 4px;
  --rafac-spinner-dot-center: 5px;
  --rafac-spinner-opposite-offset: calc(
    var(--rafac-spinner-thumb-size) + var(--rafac-spinner-offset) + var(--rafac-spinner-offset) - var(--rafac-spinner-ring-center) - var(--rafac-spinner-dot-center)
  );
  overflow: visible;
  isolation: isolate;
}
.rafac-product-videos-thumbs.spinner .rafac-video-thumb {
  box-sizing: border-box;
  border-radius: 50%;
  background: transparent;
}
.rafac-product-videos-thumbs.spinner .rafac-video-thumb.animation-first::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--rafac-spinner-offset));
  z-index: 0;
  box-sizing: border-box;
  padding: var(--rafac-spinner-ring);
  border-radius: 50%;
  background: conic-gradient(
    transparent 0deg 18deg,
    var(--rafac-bubble-color-primary) 180deg,
    transparent 180deg 198deg,
    var(--rafac-bubble-color-secondary) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-box-reflect: below 4px linear-gradient(transparent 0%, rgba(0, 0, 0, 0.28) 100%);
  animation: rafac-video-bubble-spinner var(--rafac-bubble-animation-duration, 4s) linear infinite;
}
.rafac-product-videos-thumbs.spinner .rafac-video-thumb.animation-first::after {
  content: '';
  position: absolute;
  top: calc(-1 * var(--rafac-spinner-offset));
  left: 50%;
  z-index: 3;
  font-size: var(--rafac-spinner-dot);
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: var(--rafac-bubble-color-secondary);
  box-shadow:
    0 0 0.4em var(--rafac-bubble-color-secondary),
    0 0 0.8em var(--rafac-bubble-color-secondary),
    0 0 1.2em var(--rafac-bubble-color-secondary-70),
    0 0 1.6em var(--rafac-bubble-color-secondary-70),
    0 0 2.2em var(--rafac-bubble-color-primary-67),
    0 0 3em var(--rafac-bubble-color-primary-67),
    0 0 4em var(--rafac-bubble-color-primary-67);
  filter: drop-shadow(0 var(--rafac-spinner-opposite-offset) var(--rafac-bubble-color-primary));
  transform-origin: 50% calc(var(--rafac-spinner-offset) + 40px);
  -webkit-box-reflect: below 4px linear-gradient(transparent 0%, rgba(0, 0, 0, 0.28) 100%);
  animation: rafac-video-bubble-spinner-dot var(--rafac-bubble-animation-duration, 4s) linear infinite;
}
.rafac-product-videos-thumbs.spinner .rafac-video-thumb.animation-first img {
  position: relative;
  z-index: 1;
}
.rafac-product-videos-thumbs.spinner .rafac-video-thumb.animation-first svg {
  z-index: 2;
}
@keyframes rafac-video-bubble-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--rafac-bubble-color-primary-70), 0 0 0 0 var(--rafac-bubble-color-secondary-80);
  }
  25% { transform: scale(0.9); }
  45% {
    box-shadow: 0 0 0 0 var(--rafac-bubble-color-primary-70), 0 0 0 0 var(--rafac-bubble-color-secondary-80);
  }
  50% { transform: scale(1); }
  100% {
    box-shadow: 0 0 0 13px rgba(0, 0, 0, 0), 0 0 0 8px rgba(0, 0, 0, 0);
  }
}
@keyframes rafac-video-bubble-float {
  0% {
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.6);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 25px 15px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
  }
  100% {
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.6);
    transform: translateY(0);
  }
}
@keyframes rafac-video-bubble-heartbeat {
  0%, 20%, 40%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.12); }
}
@keyframes rafac-video-bubble-glow {
  0%, 100% {
    box-shadow: 0 0 4px var(--rafac-bubble-color-primary-67), 0 0 8px var(--rafac-bubble-color-secondary-70);
  }
  50% {
    box-shadow: 0 0 18px var(--rafac-bubble-color-primary-70), 0 0 30px var(--rafac-bubble-color-secondary-80);
  }
}
@keyframes rafac-video-bubble-spinner {
  to { transform: rotate(360deg); }
}
@keyframes rafac-video-bubble-spinner-dot {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}
