$video_transition_duration: 0.5s;

.video {
  margin: em(50px) 0;
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  &.playing {
    .video__thumbnail {
      height: 0;
      transition: height 0s $video_transition_duration;
    }
    .video__frame {
      opacity: 1;
    }
    .video__play {
      opacity: 0;
    }
  }
}

.video__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity $video_transition_duration $easeOutQuad;
}

.video__thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: height 0s 0s;
  &.reveal_animation {
    z-index: -1;
  }
}

.video__play {
  font-size: 0;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: em(70px);
  height: em(70px);
  margin-top: em(-35px);
  margin-left: em(-35px);
  background: $green;
  border-radius: 50%;
  z-index: 2;
  transform: none;
  will-change: transform;
  opacity: 1;
  transition: opacity $video_transition_duration $easeOutQuad, transform 0.2s ease-in-out, background 0.2s ease-in-out, box-shadow 0.2s;
  box-shadow: 0 0 em(30px) rgba($black, 0);
  line-height: em(72.5px);
  text-indent: em(2px);
  text-align: center;
  svg {
    display: inline-block;
    fill: $white;
    transition: fill 0.2s ease-in-out;
    width: em(25px);
    height: em(25px);
    vertical-align: middle;
  }
  .video__thumbnail:hover &, .reference_list__item:hover & {
    background: $white;
    transform: scale(1.2);
    box-shadow: 0 0 em(30px) rgba($black, 0.2);
    svg {
      fill: $green;
    }
  }
}

.video__thumbnail__image {
  position: absolute;
  top: -10%;
  left: 0;
  right: 0;
  bottom: -10%;
  background-size: cover;
  background-position: center;
  z-index: -1;
}