$divider: 'cp-ui-divider';

.#{$divider} {
  position: relative;
  top: -0.06em;
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 8px;
  vertical-align: middle;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  font-variant: tabular-nums;
  line-height: 1.5;
  list-style: none;
  -webkit-font-feature-settings: 'tnum';
  font-feature-settings: 'tnum';
  background: #e8e8e8;

  &-vertical {
    position: relative;
    top: -0.06em;
    display: inline-block;
    width: 1px;
    height: 0.9em;
    margin: 0 8px;
    vertical-align: middle;
  }

  &-horizontal {
    display: block;
    clear: both;
    width: 100%;
    min-width: 100%;
    height: 1px;
    margin: 24px 0;

    &.#{$divider} {
      &-left {
        &::before {
          top: 50%;
          width: 5%;
        }

        &::after {
          top: 50%;
          width: 95%;
        }
      }

      &-right {
        &::before {
          top: 50%;
          width: 95%;
        }

        &::after {
          top: 50%;
          width: 5%;
        }
      }

      &-center {
        &::before {
          top: 50%;
          width: 50%;
        }

        &::after {
          top: 50%;
          width: 50%;
        }
      }
    }

    &.#{$divider}-left,
    &.#{$divider}-center,
    &.#{$divider}-right {
      display: table;
      margin: 16px 0;
      color: rgba(0, 0, 0, 0.85);
      font-weight: 500;
      font-size: 16px;
      white-space: nowrap;
      text-align: center;
      background: transparent;

      .#{$divider}-inner-text {
        display: inline-block;
        padding: 0 10px;
      }

      &::before {
        position: relative;
        display: table-cell;
        border-top: 1px solid #e8e8e8;
        -webkit-transform: translateY(50%);
        -ms-transform: translateY(50%);
        transform: translateY(50%);
        content: '';
      }

      &::after {
        position: relative;
        display: table-cell;
        border-top: 1px solid #e8e8e8;
        -webkit-transform: translateY(50%);
        -ms-transform: translateY(50%);
        transform: translateY(50%);
        content: '';
      }
    }
  }

  &-dashed {
    background: none;
    border-top: 1px dashed #e8e8e8;
  }

  &-inner-text {
    display: inline-block;
    padding: 0 24px;
  }
}