$class-prefix-vidify: "vf-video";

.#{$class-prefix-vidify}-wrapper {
  position: relative;
  background-color: var(--vf-color-black);
  overflow: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-transition: all 0.2s;
  -moz-transition: all 0.2s;
  -ms-transition: all 0.2s;
  -o-transition: all 0.2s;
  direction: ltr;

  .vf-dropdown {
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
  }

  &-gradient-bottom {
    height: 98px;
    width: 100%;
    position: absolute;
    bottom: 0;
    opacity: 1 !important;
    transition: all 0.3s ease;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==)
      repeat-x bottom;
  }

  &-gradient-top {
    top: 0;
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
  }

  &-gradient-bottom-hidden {
    opacity: 0 !important;
  }
}

.#{$class-prefix-vidify}-wrapper:not(.#{$class-prefix-vidify}-hidden):hover {
  transition-delay: 10s;
  .vf-control-bar {
    transform: none;
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
  }

  .vf-video-annotation {
    opacity: 1;
  }

  .vf-video-wrapper-gradient-bottom {
    opacity: 1 !important;
  }
}

.#{$class-prefix-vidify}-block {
  width: 100%;
}

.#{$class-prefix-vidify}-rounded {
  border-radius: var(--vf-border-radius);
  -webkit-border-radius: var(--vf-border-radius);
  -moz-border-radius: var(--vf-border-radius);
  -ms-border-radius: var(--vf-border-radius);
  -o-border-radius: var(--vf-border-radius);
}

.#{$class-prefix-vidify}-loading-icon {
  animation: icon-spin 2s infinite linear;
  -webkit-animation: icon-spin 2s infinite linear;
  z-index: 120px;
}

.#{$class-prefix-vidify}-hidden {
  cursor: none;
  .vf-control-bar {
    transform: translateY(100%) !important;
    -webkit-transform: translateY(100%) !important;
    -moz-transform: translateY(100%) !important;
    -ms-transform: translateY(100%) !important;
    -o-transform: translateY(100%) !important;
  }

  .vf-dropdown {
    opacity: 0;
  }

  .vf-video-wrapper-gradient-bottom {
    opacity: 0 !important;
  }

  .vf-video-annotation {
    opacity: 0 !important;
  }
}

.vf-spin {
  animation: vf-spin 2s infinite linear;
  -webkit-animation: vf-spin 2s infinite linear;
}

@keyframes icon-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
    -webkit-transform: translate(-50%, -50%) rotate(0deg);
    -moz-transform: translate(-50%, -50%) rotate(0deg);
    -ms-transform: translate(-50%, -50%) rotate(0deg);
    -o-transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(359deg);
    -webkit-transform: translate(-50%, -50%) rotate(359deg);
    -moz-transform: translate(-50%, -50%) rotate(359deg);
    -ms-transform: translate(-50%, -50%) rotate(359deg);
    -o-transform: translate(-50%, -50%) rotate(359deg);
  }
}

@keyframes vf-spin {
  0% {
    transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
  }

  100% {
    transform: rotate(359deg);
    -webkit-transform: rotate(359deg);
    -moz-transform: rotate(359deg);
    -ms-transform: rotate(359deg);
    -o-transform: rotate(359deg);
  }
}

.vf-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
}

// Responsive classes

.#{$class-prefix-vidify}-medium {
  .vf-control-bar-button {
    padding: 0 6px;
    height: 25px;
    svg {
      width: 20px;
      height: 20px;
    }
    .vf-duration {
      font-size: 13px;
    }

    .vf-arrow-navigation-button {
      svg {
        width: 14px;
        height: 14px;
      }
    }
    .vf-control-button {
      width: 13px;
      height: 13px;
      span {
        width: 13px;
        height: 13px;
      }
    }
  }
}

.#{$class-prefix-vidify}-max-small {
  .vf-control-bar-volume-area {
    .rc-slider {
      display: none;
    }
  }

  .vf-control-bar-button {
    svg {
      width: 18px;
      height: 18px;
    }
    .vf-duration {
      display: none;
    }
  }
  .skip {
    display: none !important;
    .vf-seconds-forward-button {
      display: none;
    }
  }
}

.#{$class-prefix-vidify}-x-small {
  .vf-control-bar-button {
    svg {
      width: 18px;
      height: 18px;
    }

    .vf-control-bar-volume-area {
      .rc-slider {
        display: none;
      }
    }
  }
  .skip {
    display: none !important;
    .vf-seconds-forward-button {
      display: none;
    }
  }
}

.#{$class-prefix-vidify}-small {
  .vf-control-bar-volume-area {
    column-gap: 4px;
    .rc-slider {
      width: 50px;
    }
  }

  .vf-control-bar-button {
    padding: 0 5px;
    height: 24px;
    svg {
      width: 18px;
      height: 18px;
    }
    .vf-duration {
      font-size: 12px;
    }

    .vf-arrow-navigation-button {
      svg {
        width: 13px;
        height: 13px;
      }
    }
    .vf-control-button {
      width: 12px;
      height: 12px;
      span {
        width: 12px;
        height: 12px;
      }
    }
  }
}

.#{$class-prefix-vidify}-500 {
  .vf-video-annotation {
    max-width: 40px;
    max-height: 40px;
  }

  .vf-play-button {
    width: 50px;
    height: 50px;
    svg {
      width: 30px;
      height: 30px;
    }
  }

  .vf-play-button-initial {
    width: 60px;
    height: 60px;
    svg {
      width: 30px;
      height: 30px;
    }
  }

  .vf-control-bar-video-preview {
    .vf-video {
      width: 200px;
    }
  }
}

.#{$class-prefix-vidify}-400 {
  .vf-video-annotation {
    max-width: 30px;
    max-height: 30px;
  }

  .vf-play-button {
    max-width: 40px;
    max-height: 40px;
    svg {
      width: 25px;
      height: 25px;
    }
  }

  .vf-play-button-initial {
    max-width: 50px;
    max-height: 50px;
    svg {
      width: 25px;
      height: 25px;
    }
  }
}

$class-prefix-context-menu: "vf-context-menu";

.#{$class-prefix-context-menu} {
  padding: 8px 0;
  overflow-y: auto;
  &-item {
    display: flex;
    align-items: center;
    height: 35px;
    padding: 0 8px;
    cursor: pointer;
    column-gap: 7px;
    font-size: 13px;
    font-weight: 400;
    &:hover {
      background-color: var(--vf-dropdown-menu-item-hover);
    }
    &-icon {
      width: 20px;
      height: 20px;
      min-width: 20px;
      min-height: 20px;
      & > * {
        width: 100%;
        height: 100%;
      }
    }
    &-label {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }
}
