@import "../common/var";

@include b(time-panel) {
  border: $--border-base;
  background-color: $--color-white;
  box-shadow: $--box-shadow-base;
  border-radius: $--border-radius-base;
  position: absolute;
  width: 180px;
  right: 0;
  z-index: $--index-top;
  user-select: none;
  box-sizing: content-box;

  // DateTimePicker 中单独定义位置和宽度
  &.el-date-timepicker{
    width: 144px;
    top: 35px;
    right: 5px;
  }

  @include e(content) {
    font-size: 0;
    position: relative;
    overflow: hidden;

    &::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: $--border-base;
      border-bottom: $--border-base;
    }

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

  @include e(footer) {
    border-top: $--border-base;
    padding: 4px;
    height: 36px;
    line-height: 25px;
    text-align: right;
    box-sizing: border-box;
  }

  @include e(btn) {
    border: none;
    line-height: 28px;
    padding: 0 5px;
    margin: 0 5px;
    cursor: pointer;
    background-color: transparent;
    outline: none;
    font-size: 12px;
    color: $--color-text-primary;

    &.confirm {
      font-weight: $--font-weight-strengthen;
      color: $--datepicker-active-color;
    }
  }
}
