/*
 * Xinda homepage production video hero V4.
 * Uses the approved live-action edit and keeps the no-mask treatment.
 */

html.xinda-video-hero-theme .homepage-official .b-hero {
  isolation: isolate;
  background: #0b263b;
}

html.xinda-video-hero-theme .homepage-official .b-hero__image {
  z-index: 1;
  opacity: 1;
  background-image: url("assets/homepage/video-hero-v4/xinda-industrial-hero-v4-poster.jpg");
  background-position: center;
  transition: opacity .55s ease;
}

html.xinda-video-hero-theme .homepage-official .b-hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .55s ease;
}

html.xinda-video-hero-theme .homepage-official .b-hero.has-hero-video .b-hero__video {
  opacity: 1;
}

html.xinda-video-hero-theme .homepage-official .b-hero.has-hero-video .b-hero__image {
  opacity: 0;
}

html.xinda-video-hero-theme .homepage-official .b-hero__copy,
html.xinda-video-hero-theme .homepage-official .b-signal,
html.xinda-video-hero-theme .homepage-official .hero-video-toggle {
  z-index: 3;
}

html.xinda-video-hero-theme .homepage-official .b-hero > .scene-tag {
  display: none;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  color: #0a5f9c;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 26px rgba(2, 18, 31, .18);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle:hover,
html.xinda-video-hero-theme .homepage-official .hero-video-toggle:focus-visible {
  transform: scale(1.06);
  background: #fff;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle:focus-visible {
  outline: 3px solid rgba(89, 203, 241, .72);
  outline-offset: 3px;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle:before,
html.xinda-video-hero-theme .homepage-official .hero-video-toggle:after {
  content: "";
  position: absolute;
  top: 13px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: currentColor;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle:before {
  left: 15px;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle:after {
  right: 15px;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle.is-paused:before {
  top: 12px;
  left: 16px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid currentColor;
  border-radius: 0;
  background: transparent;
}

html.xinda-video-hero-theme .homepage-official .hero-video-toggle.is-paused:after {
  display: none;
}

@media (max-width: 680px) {
  html.xinda-video-hero-theme .homepage-official .b-hero__image {
    background-image: url("assets/homepage/video-hero-v4/xinda-industrial-hero-v4-mobile-poster.jpg");
    background-position: center;
  }

  html.xinda-video-hero-theme .homepage-official .b-hero__video {
    object-position: center;
  }

  html.xinda-video-hero-theme .homepage-official .hero-video-toggle {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
  }

  html.xinda-video-hero-theme .homepage-official .hero-video-toggle:before,
  html.xinda-video-hero-theme .homepage-official .hero-video-toggle:after {
    top: 12px;
    height: 16px;
  }

  html.xinda-video-hero-theme .homepage-official .hero-video-toggle:before {
    left: 14px;
  }

  html.xinda-video-hero-theme .homepage-official .hero-video-toggle:after {
    right: 14px;
  }

  html.xinda-video-hero-theme .homepage-official .hero-video-toggle.is-paused:before {
    top: 11px;
    left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.xinda-video-hero-theme .homepage-official .b-hero__video,
  html.xinda-video-hero-theme .homepage-official .hero-video-toggle {
    display: none;
  }

  html.xinda-video-hero-theme .homepage-official .b-hero__image {
    opacity: 1 !important;
  }
}
