@import "../common/var";
@import "../mixins/mixins";

@include b(time-range-picker) {
  width: 354px;
  overflow: visible;

  @include e(content) {
    position: relative;
    text-align: center;
    padding: 10px;
    z-index: 1;
  }
  .#{$namespace}-time-panel_footer {
    border-top: 1px solid $datepicker-inner-border-color;
    padding: 4px;
    height: 36px;
    line-height: 25px;
    text-align: right;
    box-sizing: border-box;
  }
  .#{$namespace}-time-panel_btn {
    border: none;
    line-height: 28px;
    padding: 0 5px;
    margin: 0 5px;
    cursor: pointer;
    background-color: transparent;
    outline: none;
    font-size: 12px;
    color: $text-color-default;

    &.confirm {
      font-weight: 800;
      color: $datepicker-border-color-active;
    }
  }


  @include e(cell) {
    box-sizing: border-box;
    margin: 0;
    padding: 4px 7px 7px;
    width: 50%;
    display: inline-block;
  }

  @include e(header) {
    margin-bottom: 5px;
    text-align: center;
    font-size: 14px;
  }

  @include e(body) {
    border-radius: 2px;
    border: 1px solid $datepicker-border-color;
    position: relative;

    &::after, &::before {
      content: '';
      top: 50%;
      position: absolute;
      margin-top: -15px;
      height: 32px;
      z-index: -1;
      left: 0;
      right: 0;
      box-sizing: border-box;
      padding-top: 6px;
      text-align: left;
      border-top: 1px solid $datepicker-inner-border-color;
      border-bottom: 1px solid $datepicker-inner-border-color;
    }

    &::after {
      left: 50%;
      margin-left: 12%;
      margin-right: 12%;
    }

    &::before {
      padding-left: 50%;
      margin-right: 12%;
      margin-left: 12%;
    }
    &.has-seconds {
      &::after {
        left: calc(100% / 3 * 2);
      }

      &::before {
        padding-left: calc(100% / 3);
      }
    }
  }
}
