.player .bottom-bar {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  color: #fff;
  height: auto;
  width: 100%;
  margin-top: auto;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: auto;
  position: absolute;
  padding: 0;
  opacity: 0;
  max-height: #{$bottom-bar-max-height}px;
  transition:
    #{$hover-animation-time}ms opacity ease-in-out,
    0ms padding linear #{$hover-animation-time}ms;

  &.hide {
    display: none;
  }

  .controls-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1;

    .left-controls {
      flex-shrink: 0;
      text-align: left;
      pointer-events: none;

      .control-button-container:first-child {
        margin-left: 0px;
      }
    }

    .right-controls {
      display: flex;
      flex-wrap: nowrap;
      flex-grow: 0;
      text-align: left;
      pointer-events: none;

      .control-button-container:last-child {
        margin-right: 0px;
      }
    }
  }

  .bottom-bar-area {
    position: relative;
    pointer-events: none;

    .time-display {
      padding: 0;
      position: absolute;
      bottom: 20px;
      font-size: 12px;
      line-height: normal;
      font-weight: 400;
    }
  }

  .control-button-container {
    margin: 0 4px;
  }
}

.player {
  &.overlay-active {
    .bottom-bar {
      display: none;
    }
  }

  &.size-ty {
    .controls-container {
      display: block;
      .left-controls {
        display: none;
      }
      .right-controls {
        display: block;
        float: right;
      }
    }
    .control-button-container {
      display: none;
      margin: 0;
    }
  }

  &.size-xs,
  &.size-sm {
    .control-button-container:not(.upper-bar-icon) {
      margin: 0 3px;
    }
  }
}

.player.casting,
.player.metadata-loaded.hover,
.player.state-paused,
.player.state-idle,
.player.ad-break,
.player.menu-active {
  &:not(.overlay-active) {
    .bottom-bar {
      position: relative;
      opacity: 1;
      padding: 0 #{$gui-gutter}px #{$bottom-bar-bottom-gutter}px;
      transition: #{$hover-animation-time}ms opacity ease-in-out;
    }
  }
}

.player {
  &.size-sm,
  &.size-xs {
    .playback-controls + .time-display {
      padding-left: 0;
    }
  }
}

.player.size-sm {
  .bottom-bar {
    padding: 0 #{$gui-small-gutter}px #{$bottom-bar-bottom-gutter}px;
  }
}
.player {
  .bottom-bar {
    .left-controls,
    .right-controls,
    .bottom-bar-area {
      & > * {
        pointer-events: auto;
      }
    }
  }
}
