$time-control-background: rgba(14, 16, 19, 0.7);
$time-control-primary-background-color: rgba(59,100,162,0.7);
$time-control-border-color-dark: rgba(255, 255, 255, 0.3);
$time-control-tick-color: rgb(144, 160, 174);
$time-control-label-color: #bcc9d4;

.dv-time-control {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: $time-control-background;
  cursor: pointer;
  user-select: none;
  overflow: visible;

  &-left {
    width: $component-size-larger;
    border-right: $border-width solid $time-control-border-color-dark;
    display: flex;
    flex-direction: column;

    .bg-active{
      background-color: $time-control-primary-background-color;
    }

    &-button {
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0 $content-padding;

      &-icon-close{
        color: #fff;
        display: block;
        margin-top: $text-span;
        font-size: $font-size;
        margin-left: -$component-span;
      }
      &-icon-open{
        width: 0;
        height: 0;
        border-top: $space-base solid transparent;
        border-left: $space-base * 2 solid #fff;
        border-bottom: $space-base solid transparent;
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
  }

  &-hover-bubble-content{
    position: absolute;
    left: 0;
    bottom: calc(100% + #{$component-span});
    z-index: 1003;
    .hover-bubble {
      position: relative;
      padding: $text-padding $content-padding;
      background: $time-control-primary-background-color;
      color: #fff;
      border-radius: $border-radius;
      transform: translateX(-50%);
    }
    .hover-bubble:after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      left: 50%;
      transform: translateX(-50%);
      top: 100%;
      border:$content-padding solid transparent;
      border-top-color: $time-control-primary-background-color;
      z-index: 200;
    }
  }

  &-current-bubble-content{
    position: absolute;
    left: 0;
    bottom: calc(100% + #{$component-span});
    z-index: 1002;
    .current-bubble {
      position: relative;
      padding: $text-padding $content-padding;
      background: rgba(0,0,0,0.3);
      color: #fff;
      border-radius: $border-radius;
      transform: translateX(-50%);
    }
    .current-bubble:after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      left: 50%;
      transform: translateX(-50%);
      top: 100%;
      border: $content-padding solid transparent;
      border-top-color: rgba(0,0,0,0.3);
      z-index: 100;
    }
  }

  &-right {
    flex: 1;
    position: relative;
    z-index: 1004;

    .dv-time-control-steps {
      width: 100%;
      padding: 0;
      margin: 0;
      display: flex;
      align-items: center;
      justify-content: center;

      li {
        position: relative;
        list-style:none;
        width: calc(100% / 168);
        height: 0.5 * $space;
      }

      li:nth-child(3n):after{
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        border-right: $border-width solid #ffffff;
      }
      .bg-active{
        background-color: $time-control-primary-background-color;
      }

      .bg-now{
        background-color: lighten($time-control-primary-background-color, 20%);
      }
    }
    .dv-time-control-hours {
      width: 100%;
      display: flex;
      flex: 1;
      border-bottom: $border-width solid $time-control-border-color-dark;
      &-day {
        flex: 1;
        .dv-time-control-hours-list{
          width: 100%;
          display: flex;
          flex: 1;
          user-select: none;

          .dv-time-control-hour{
            flex: 1;
            padding: 0;
            text-align: center;
            color: $time-control-tick-color;
            font-size: $font-size-small;
          }
        }
      }
    }
    .dv-time-control-date{
      width: 100%;
      padding: 0;
      margin: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      li{
        list-style:none;
        flex: 1;
        padding: $min-text-padding * 0.5 0;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: $font-size;
        color: $time-control-label-color;
        border-right: $border-width solid $time-control-border-color-dark;
        user-select: none;
        font-weight: bold;
      }
    }
  }
}
