.player {
  overflow: hidden;
  user-select: none;
  width: 100%;
  height: 100%;
  position: relative;
  outline: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: none;
  font-family: $font-family;

  &:-webkit-full-screen {
    width: 100%;
    height: 100%;
    max-width: none;
  }
  * {
    box-sizing: border-box;
    outline: none;
  }
  ::selection {
    background-color: rgba(0, 0, 0, 0.1);
  }
  video {
    width: 100%;
    left: 0;

    &::-webkit-media-controls-panel-container,
    &::-webkit-media-controls {
      display: none !important;
      -webkit-appearance: none;
    }

    &::-webkit-media-controls-start-playback-button {
      display: none !important;
      -webkit-appearance: none;
    }
  }
  .player-gui {
    overflow: hidden;
    font-size: 0;

    label {
      margin-bottom: 0;
    }
  }
  :global(.overlay-portal) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  &.overlay-active :global(.overlay-portal) {
    z-index: 11;
    pointer-events: initial;
  }
  &.protected :global(.no-copy) {
      user-select: none !important;
      -webkit-user-select: none !important;
      -moz-user-select: none !important;
      -ms-user-select: none !important;
      -webkit-touch-callout: none !important;
      cursor: default;

      &::selection {
        background: transparent;
      }
  }
}

.player.nav {
  * {
    &:focus {
      outline: 2px solid $tab-focus-color !important;
      box-shadow: 0 0 0 2px white !important;
      outline-offset: 2px;
    }
  }
}

.player :global([id^='playkit-ads-container']) {
  &:global([data-adtype='overlay']) {
    z-index: 1;
  }
  transition: transform 100ms;
}

.player:not(.ad-break).metadata-loaded {
  &.hover :global([id^='playkit-ads-container']),
  &.state-paused :global([id^='playkit-ads-container']),
  &.state-idle :global([id^='playkit-ads-container']) {
    transform: translateY(-$default-hovering-offset);
    -webkit-transform: translateY(-$default-hovering-offset);
    -ms-transform: translateY(-$default-hovering-offset);
  }
}

.player {
  &.pre-playback,
  &.casting,
  &.metadata-loaded.hover,
  &.state-paused,
  &.state-idle,
  &.ad-break,
  &.menu-active,
  &.overlay-active {
    cursor: auto;
  }
}
