.mh-home-video {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: clamp(420px, 70vh, 760px);
  overflow: hidden;
  background: #f7faf3;
}

.elementor-widget-shortcode:has(.mh-home-video),
.elementor-widget-shortcode:has(.mh-home-video) > .elementor-widget-container,
.elementor-widget-shortcode:has(.mh-home-video) .elementor-shortcode {
  height: 100%;
  min-height: inherit;
}

.elementor-widget-shortcode:has(.mh-home-video) .mh-home-video {
  min-height: inherit;
}

.mh-home-video__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #16211d;
}

.mh-home-video .mh-home-video__frame img.mh-home-video__poster,
.mh-home-video .mh-home-video__frame video.mh-home-video__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.mh-home-video__poster {
  z-index: 1;
}

.mh-home-video__video {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.mh-home-video.is-video-playing .mh-home-video__video.is-current {
  opacity: 1;
}

/* Green tint over poster + video. Tweak the colour via --mh-home-video-tint. */
.mh-home-video__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(rgba(22, 33, 29, 0.15), rgba(22, 33, 29, 0.45)),
    var(--mh-home-video-tint, rgba(46, 94, 66, 0.4));
}

@media (max-width: 767px) {
  .mh-home-video {
    min-height: 70vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mh-home-video__video {
    transition: none;
  }
}
