/*
 * Copyright 2023 Harness, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.container {
  width: 150px;

  .main {
    width: 100%;
    --height: 20px;
    --bar-height: 8px;

    display: flex;
    align-items: center;

    .ahead,
    .behind {
      width: 50%;
      height: var(--bar-height);
      transform: translateY(6px);
      position: relative;

      span {
        display: inline-block;
        font-size: var(--font-size-xsmall);
        font-weight: 600;
        color: var(--grey-600);
      }

      &::after {
        content: '';
        position: absolute;
        min-width: 1px;
        max-width: 100%;
        width: var(--bar-size);
        height: var(--bar-height);
      }
    }

    .behind {
      text-align: right;

      span {
        transform: translate(-7px, -20px);
      }

      &::after {
        right: 0;
        bottom: 0;
        background-color: var(--grey-200);
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
      }
    }

    .ahead {
      span {
        transform: translate(5px, -20px);
      }

      &::after {
        left: 0;
        bottom: 0;
        background-color: var(--primary-7);
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
      }
    }

    .pipe {
      width: 1px;
      height: var(--height);
      background-color: var(--grey-300);
      display: inline-block;
    }
  }
}
