/*
 * Finding Fabry Video Switcher
 * Styles for stacked Vimeo player and thumbnail hover overlays.
 */

#player-container {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

#video-1,
#video-2,
#video-3 {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#video-1 {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#video-1.is-active,
#video-2.is-active,
#video-3.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#video-1:not(.is-active).js-switched {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#video-1 iframe,
#video-2 iframe,
#video-3 iframe {
  width: 100%;
  height: 100%;
}

#video-thumb-1,
#video-thumb-2,
#video-thumb-3 {
  cursor: pointer;
}

#video-thumb-1,
#video-thumb-2,
#video-thumb-3 {
  position: relative;
  overflow: hidden;
}

/* gray overlay */
#video-thumb-1::before,
#video-thumb-2::before,
#video-thumb-3::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(53, 55, 47, 0.48);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}

/* white SVG play icon */
#video-thumb-1::after,
#video-thumb-2::after,
#video-thumb-3::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M38 22 L96 60 L38 98 Z' fill='white'/%3E%3C/svg%3E") center / 72px 72px no-repeat;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

#video-thumb-1:hover::before,
#video-thumb-1:hover::after,
#video-thumb-2:hover::before,
#video-thumb-2:hover::after,
#video-thumb-3:hover::before,
#video-thumb-3:hover::after {
  opacity: 1;
}
