.VideoPlayer {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;

  video {
    display: block;

    width: 100%;
    height: 100%;
    max-height: calc(100vh - 8.25rem);
    margin: auto;

    object-fit: contain;
    background: no-repeat 50% 50%;
    background-size: contain;
    outline: none;

    // Disable fullscreen on double tap on mobile devices
    .is-touch-env & {
      pointer-events: none;
    }

    @media (max-height: 640px) {
      max-height: calc(100vh - 10rem);
    }
  }

  .play-button {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 3.25rem;
    height: 3.25rem;

    background-color: rgba(0, 0, 0, 0.5) !important;
    body:not(.no-page-transitions) & {
      transition: opacity 0.3s ease !important;
    }

    .icon-play {
      position: relative;
      left: 0.125rem;
      font-size: 1.75rem;
    }
  }

  .spinner-container {
    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    .buffering {
      position: absolute;
      z-index: 1;
      top: 0.1875rem;
      left: 0.1875rem;

      padding: 0 0.375rem;
      border-radius: 0.75rem;

      font-size: 0.75rem;
      line-height: 1.125rem;
      color: #fff;

      background: rgba(0, 0, 0, 0.25);
    }

    .ProgressSpinner {
      cursor: var(--custom-cursor, pointer);
    }
  }

  @media (max-width: 600px) {
    overflow: visible;
  }

  @media (max-height: 640px) {
    margin-bottom: 1.75rem;

    @at-root .has-footer #{&} {
      margin-bottom: 0;
    }
  }
}
