@import "../../../../themes/default";

:global {
  .app-html5-player {
    position: relative;
    line-height: 0;
  }

  .app-html5-player-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding-bottom: 56.25%;
    //background-color: #222;
  }

  .app-html5-player-content video,
  .app-html5-player-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  body:-webkit-full-screen {
    .app-player {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 9999;
      margin: 0;
    }

    .app-player-inactive {
      .app-player-related {
        max-width: 0;
      }
    }

    .app-html5-player {
      background: #000;
      width: 100%;
      height: 100%;

      .app-html5-player-container {
        height: 100%;
      }

      .app-html5-player-bottom {
        position: fixed;
      }

      .app-html5-player-content {
        padding-bottom: inherit;

        video {
          position: relative;
        }
      }

      .app-ad-container {
        height: 100%;
        padding-bottom: inherit;

        iframe {
          /*position: relative;*/
        }
      }
    }

    .app-player-container, .app-player-content {
      width: 100% !important;
      height: 100% !important;
    }

    .app-player-related {
      position: absolute;
      background-color: rgba(0, 0, 0, 0.9);
      top: 10%;
      right: -12px;
      max-width: 0;
      height: calc(80% - 24px);
      border-radius: 12px;
      padding-left: 12px;
      padding-right: 12px;
      transition: ease-in-out .5s max-width;
      opacity: 0.4;

      &:hover {
        right: 0;
        max-width: 360px;
        opacity: 0.9;
      }

      .app-karaoke-box, .app-karaoke-list {
        width: 336px;
      }

      .app-karaoke-box {
        .app-karaoke-buttons {
          top: 12px;
        }
      }
    }

    .app-layout-mobile {
      .app-player-related {
        display: none;
      }
    }
  }

  body:-moz-full-screen {
    .app-player {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 9999;
      margin: 0;
    }

    .app-player-inactive {
      .app-player-related {
        max-width: 0;
      }
    }

    .app-html5-player {
      background: #000;
      width: 100%;
      height: 100%;

      .app-html5-player-container {
        height: 100%;
      }

      .app-html5-player-bottom {
        position: fixed;
      }

      .app-html5-player-content {
        padding-bottom: inherit;

        video {
          position: relative;
        }
      }

      .app-ad-container {
        height: 100%;
        padding-bottom: inherit;

        iframe {
          /*position: relative;*/
        }
      }
    }

    .app-player-container, .app-player-content {
      width: 100% !important;
      height: 100% !important;
    }

    .app-player-related {
      position: absolute;
      background-color: rgba(0, 0, 0, 0.9);
      top: 10%;
      right: -12px;
      max-width: 0;
      height: calc(80% - 24px);
      border-radius: 12px;
      padding-left: 12px;
      padding-right: 12px;
      transition: ease-in-out .5s max-width;
      opacity: 0.4;

      &:hover {
        right: 0;
        max-width: 360px;
        opacity: 0.9;
      }

      .app-karaoke-box, .app-karaoke-list {
        width: 336px;
      }

      .app-karaoke-box {
        .app-karaoke-buttons {
          top: 12px;
        }
      }
    }

    .app-layout-mobile {
      .app-player-related {
        display: none;
      }
    }
  }

  .app-html5-player-theme-white {
    background-color: #ffffff;
  }

  .app-html5-player-bottom {
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    padding-left: 12px;
    padding-right: 12px;
    background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, .5)) repeat-x;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5)) repeat-x;
    z-index: 101;
  }

  .app-html5-player-bottom:focus {
    outline: none;
  }

  .app-html5-player-autohide {
    opacity: 0;
    -moz-transition: opacity .1s cubic-bezier(0.4, 0.0, 1, 1);
    -webkit-transition: opacity .1s cubic-bezier(0.4, 0.0, 1, 1);
    transition: opacity .1s cubic-bezier(0.4, 0.0, 1, 1);
  }

  .app-html5-player-active .app-html5-player-autohide {
    opacity: 1;
  }

  .app-html5-player-inactive .app-html5-player-autohide {
    opacity: 0;
  }

  .app-html5-player-button {
    display: inline-block;
    width: 36px;
    padding: 6px 0;
    text-align: center;
    cursor: pointer;
  }

  .app-html5-player-controls {
    height: 36px;
    color: #fff;
  }

  .app-html5-player-play-button {
    width: 46px;
  }

  .app-html5-player-volume-panel:hover {
    width: auto;
  }

  .app-html5-player-volume-button {
    display: inline-block;
    width: 36px;
  }

  .app-html5-player-volume-slider {
    position: relative;
    display: inline-block;
    vertical-align: text-top;
    cursor: pointer;
    width: 64px;
    /*-moz-transition: margin .2s cubic-bezier(0.4, 0.0, 1, 1), width .2s cubic-bezier(0.4, 0.0, 1, 1);*/
    /*-webkit-transition: margin .2s cubic-bezier(0.4, 0.0, 1, 1), width .2s cubic-bezier(0.4, 0.0, 1, 1);*/
    /*transition: margin .2s cubic-bezier(0.4, 0.0, 1, 1), width .2s cubic-bezier(0.4, 0.0, 1, 1);*/
  }

  .app-html5-player-volume-horizontal {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 6px;
    /*margin-top: -2px;*/
  }

  .app-html5-player-volume-value {
    background: #fff;
    height: 100%;
  }

  .app-html5-player-volume-intent {

  }

  .app-html5-player-volume-handle {
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    margin-top: -4px;
    margin-left: -6.5px;
    opacity: 1;
  }

  .app-html5-player-volume-seek {
    position: absolute;
    top: -16px;
    left: 0;
    width: 100%;
    height: 36px;
    z-index: 9;
  }

  .app-html5-player-volume-panel {
    width: auto;
  }

  .app-html5-player-volume-panel:hover .app-html5-player-volume-horizontal {
    cursor: pointer;
    width: 64px;
    opacity: 1;
    margin-right: 6px;
    -moz-transition: margin .2s cubic-bezier(0.0, 0.0, 0.2, 1), width .2s cubic-bezier(0.0, 0.0, 0.2, 1);
    -webkit-transition: margin .2s cubic-bezier(0.0, 0.0, 0.2, 1), width .2s cubic-bezier(0.0, 0.0, 0.2, 1);
    transition: margin .2s cubic-bezier(0.0, 0.0, 0.2, 1), width .2s cubic-bezier(0.0, 0.0, 0.2, 1);
  }

  .app-html5-player-volume-panel:hover .app-html5-player-volume-handle {
    opacity: 1;
  }

  .app-html5-player-right-controls {
    float: right;
  }

  .app-html5-player-live-badge {
    width: auto;
    vertical-align: top;
    line-height: 24px;
    padding: 6px;
    cursor: inherit;
  }

  .app-html5-player-live-badge::before {
    display: inline-block;
    width: 6px;
    height: 6px;
    vertical-align: 5%;
    margin-right: 5px;
    background: #de0813;
    content: '';
    border-radius: 6px;
  }

  .app-html5-player-duration {
    width: auto;
    vertical-align: top;
    line-height: 24px;
    padding: 6px;
    cursor: inherit;
  }

  .app-html5-player-progress-bar-container {
    position: relative;
    height: 5px;
  }

  .app-html5-player-progress-bar {
    position: absolute;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    height: 3px;
    -webkit-transition: height .3s ease;
    transition: height .3s ease;
    cursor: pointer;
    top: 0;
    bottom: 0;
    margin: auto;
    .tap-highlight-color();
  }

  .app-html5-player-progress-bar-played {
    position: relative;
    background: #de0813;
    height: 100%;
    z-index: 1;
  }

  .app-html5-player-progress-bar-loaded {
    position: absolute;
    top: 0;
    background: rgba(255, 255, 255, 0.4);
    height: 100%;
  }

  .app-html5-player-progress-bar-handle {
    position: absolute;
    width: 13px;
    height: 13px;
    background: #de0813;
    border-radius: 100%;
    transform: scale(0);
    transition: transform 0.2s;
    top: 0;
    margin-top: -4px;
    margin-left: -6.5px;
  }

  .app-html5-player-progress-bar-seekable:hover {
    height: 5px;

    .app-html5-player-progress-bar-intent {
      height: 5px;
    }

    .app-html5-player-progress-bar-handle {
      top: 0
    }
  }

  .app-html5-player-active {
    .app-html5-player-progress-bar-handle {
      top: -1px
    }
  }

  .app-html5-player-progress-bar-seekable:hover,
  .app-layout-mobile .app-html5-player-active {
    .app-html5-player-progress-bar-handle {
      transform: scale(1);
    }

    .app-html5-player-progress-bar-intent {
      position: absolute;
      background: rgba(255, 255, 255, 0.5);
      top: 0;
      left: 0;
      height: 100%;
    }

    .app-html5-player-progress-bar-time-intent {
      opacity: 1;
      .player-transition-opacity();
    }
  }

  .app-html5-player-progress-bar-time-intent {
    position: absolute;
    bottom: 12px;
    margin-left: -20px;
    opacity: 0;

    time {
      background-color: @color-black-65;
      padding: 2px 4px;
      border-radius: 4px;
    }
  }

  .app-html5-player-progress-bar-seek {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9;
  }

  .app-html5-player-loading {
    position: absolute;
    background-color: transparent;
    width: 100%;
    height: 100%;
    top: 0;
  }

  .app-html5-player-empty {
    position: absolute;
    background-color: transparent;
    width: 70%;
    height: 100%;
    display: flex;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    line-height: 1.5;
    text-align: center;
    .items-center();
    .justify-center();
  }

  .app-html5-player-overlay {
    position: absolute;
    background-color: transparent;
    width: 100%;
    height: 100%;
    top: 0;
    padding: 0;
    .tap-highlight-color()
  }

  .app-html5-player-overlay:focus {
    outline: none;
  }

  .app-html5-player-overlay-button {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    background-color: rgba(0, 0, 0, 0.64);
    border-radius: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    -ms-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
  }

  .app-html5-player-overlay-button:hover {
    background-color: rgba(0, 0, 0, 0.44);
  }

  .app-html5-player-overlay-button svg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
  }

  .app-html5-player-seek-next, .app-html5-player-seek-prev {
    position: absolute;
    width: 50%;
    height: 100%;
    .display-flex();
    .items-center();
    .justify-center();

    svg {
      width: 32px;
      height: 32px;
    }
  }

  .app-html5-player-seek-next {
    right: 0;
  }

  .app-html5-player-seek-prev {
    left: 0;
  }

  .app-html5-player-watermark {
    position: absolute;
    bottom: 12px;
    right: 12px;
    opacity: 1;
    transition: opacity .25s cubic-bezier(0.0, 0.0, 0.2, 1);
  }

  .app-html5-player-watermark img {
    /*width: 156px;*/
    height: 38px;
  }

  .app-html5-player-nextprev {
    width: 60px;
    height: 60px;
  }

  .app-html5-player-next {
    margin-left: 100px;
  }

  .app-html5-player-prev {
    margin-left: -100px;
  }

  .app-html5-player-levels {
    /*position: relative;*/
  }

  .app-html5-player-levels svg {
    -moz-transition: -moz-transform .1s cubic-bezier(0.4, 0.0, 1, 1);
    -webkit-transition: -webkit-transform .1s cubic-bezier(0.4, 0.0, 1, 1);
    -ms-transition: -ms-transform .1s cubic-bezier(0.4, 0.0, 1, 1);
    transition: transform .1s cubic-bezier(0.4, 0.0, 1, 1);
  }

  .app-html5-player-levels-button-active svg {
    -moz-transform: rotateZ(30deg);
    -webkit-transform: rotateZ(30deg);
    -ms-transform: rotateZ(30deg);
    transform: rotateZ(30deg);
  }

  .app-html5-player-levels-swatch-button {
    position: absolute;
    top: 0;
    right: 2px;
    background-color: #f00;
    border-radius: 1px;
    color: #fff;
    text-transform: uppercase;
    line-height: normal;
    font-size: 9px;
    padding: 1px 2px;
  }

  .app-html5-player-levels-list {
    position: absolute;
    bottom: 42px;
    right: 12px;
    border-radius: 2px;
    background-color: rgba(28, 28, 28, 0.9);
    font-size: 13px;
    padding: 6px 0;
    text-shadow: 0 0 2px rgba(0, 0, 0, .5);
    -moz-transition: opacity .1s cubic-bezier(0.0, 0.0, 0.2, 1);
    -webkit-transition: opacity .1s cubic-bezier(0.0, 0.0, 0.2, 1);
    transition: opacity .1s cubic-bezier(0.0, 0.0, 0.2, 1);
  }

  .app-html5-player-levels-list ul li {
    position: relative;
    line-height: 32px;
    padding: 0 25px 0 58px;
    text-align: right;
    white-space: nowrap;
  }

  .app-html5-player-levels-list ul li:hover {
    background-color: rgba(255, 255, 255, .1);
  }

  .app-html5-player-levels-swatch-color {
    position: absolute;
    top: 3px;
    color: red;
    text-transform: uppercase;
    margin-left: 3px;
    line-height: normal;
  }

  .app-html5-player-levels-active {
    position: absolute;
    left: 10px;
    top: 3px;
    line-height: normal;
  }

  .app-html5-player-error {
    background: rgba(0, 0, 0, 0.1);
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
    display: flex;
    .items-center();
    .justify-center();
    color: #333333;

    > div {
      width: 70%;
      left: 0;
      right: 0;
      margin: auto;
    }
  }

  .app-html5-player-play-animation {
    :local {
      -moz-animation: play-button-fadeout .5s linear 1 normal forwards;
      -webkit-animation: play-button-fadeout .5s linear 1 normal forwards;
      animation: play-button-fadeout .5s linear 1 normal forwards;
    }
  }

  .app-ad-container {
    position: absolute;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    top: 0;
  }

  .app-ad-container > div {
    width: 100% !important;
    height: 100% !important;
  }

  .app-ad-container > div:first-child {
    z-index: 9;
  }

  .app-ad-container iframe {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
  }

  .app-layout-mobile {
    .app-html5-player-content {
      //padding-bottom: @mobile-player-height;
    }

    .app-html5-player-progress-bar-container {
      height: 16px;
      top: 5px;
    }

    .app-html5-player-progress-bar-seek {
      height: 16px;
      top: -6px;
    }

    .app-html5-player-progress-bar-time-intent {
      display: none;
    }

    .app-html5-player-duration {
      .app-current-time, .app-duration {
        position: absolute;
        bottom: 48px;
      }

      .app-current-time {
        left: 12px;
      }

      .app-duration {
        right: 12px;
      }

      span {
        display: none;
      }
    }
  }
}

@keyframes play-button-fadeout {
  0% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: scale(2);
  }
}
