// Sass for videojs-big-replay

@import "node_modules/video.js/src/css/variables";
@import "node_modules/video.js/src/css/private-variables";
@import "node_modules/video.js/src/css/utilities";

// @import "node_modules/videojs-font/scss/icons";

@import "node_modules/video.js/src/css/utilities";
// @import "node_modules/video.js/src/css/utilities/linear-gradient";
// @import "node_modules/video.js/src/css/components/big-play";

.video-js .vjs-big-replay-button {
  font-size: 3em;
  line-height: $big-play-button--height;
  height: $big-play-button--height;
  width: $big-play-button--width; // Firefox bug: For some reason without width the icon wouldn't show up. Switched to using width and removed padding.
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  border: 0.06666em solid $primary-foreground-color;

  // Need a slightly gray bg so it can be seen on black backgrounds
  @include background-color-with-alpha($primary-background-color, $primary-background-transparency);
  @include border-radius(0.3em);
  @include transition(all 0.4s);

  .vjs-icon-placeholder {
    font-family: VideoJS;
    font-weight: normal;
    font-style: normal;
  }

  // Since the big play button doesn't inherit from vjs-control, we need to specify a bit more than
  // other buttons for the icon.
  & .vjs-icon-placeholder:before {

    content: "\f116";

    @extend %icon-default;
  }
}

// Show the big replay button when the video is ended
.video-js .vjs-big-replay-button.vjs-paused.vjs-ended {
  display: block;
}

// Allow people that hate their poster image to center the big play button.
.vjs-big-replay-centered .vjs-big-replay-button {
  top: 50%;
  left: 50%;
  margin-top: -($big-play-button--height / 2);
  margin-left: -($big-play-button--width / 2);
}

.video-js:hover .vjs-big-replay-button,
.video-js .vjs-big-replay-button:focus {
  border-color: $primary-foreground-color;

  @include background-color-with-alpha($secondary-background-color, $secondary-background-transparency);
  @include transition(all 0s);
}

// Hide if controls are disabled, the video is playing, or native controls are used.
.vjs-controls-disabled .vjs-big-replay-button,
.vjs-has-started .vjs-big-replay-button,
.vjs-using-native-controls .vjs-big-replay-button,
.vjs-error .vjs-big-replay-button {
  display: none;
}