$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;
  width: 100%;

  &-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;
    display: flex;
  }

  &-time-group-list {
    display: flex;
    flex: 1;
    margin: 0;
    list-style: none;
  }

  &-time-group-item {
    display: flex;
    flex: 1;
    flex-direction: column;

    &-time-spans {
      width: 100%;
      display: flex;
      border-bottom: $border-width solid $time-control-border-color-dark;
    }

    &-time-span {
      flex: 1;
      padding: 0;

      &-times {
        border-right: $border-width solid #ffffff;
        display: flex;

        .dv-time-control-time-group-item-time-span-time {
          flex: 1;
          height: $space-half;
          //border-right: $border-width solid rgba(255, 255, 255, 0.1);

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

      &-value {
        text-align: center;
        color: $time-control-tick-color;
        font-size: $font-size-small;
        transform: translateX(50%);
      }
    }

    &-date {
      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;
    }
  }
}
