@use 'mixins/mixins' as *;
@use 'mixins/var' as *;
@use 'common/var' as *;

:root,
:host {
  --xzx-progress-height: 6px;
  --xzx-progress-color: var(--xzx-color-primary);
  --xzx-progress-inactive-color: var(--xzx-gray-5);
  --xzx-progress-background: var(--xzx-gray-3);
  --xzx-progress-pivot-padding: 0 var(--xzx-padding-xs);
  --xzx-progress-pivot-text-color: var(--xzx-text-white-1);
  --xzx-progress-pivot-font-size: var(--xzx-text-sm);
  --xzx-progress-pivot-line-height: var(--xzx-text-lh-base);
  --xzx-progress-pivot-background: var(--xzx-color-primary);
}

@include b(progress) {
  display: flex;
  align-items: center;
  &__wrapper {
    width: 100%;
    position: relative;
    height: var(--xzx-progress-height);
    background: var(--xzx-progress-background);
    border-radius: var(--xzx-progress-height);
  }
  &__portion {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--xzx-progress-color);
    border-radius: inherit;
    transform-origin: 0;
    transition: all var(--xzx-duration-base) var(--xzx-ease-out);

    &--inactive {
      background: var(--xzx-progress-inactive-color);
    }
  }

  &__pivot {
    min-width: 2.6em;
    font-size: var(--xzx-progress-pivot-font-size);
    line-height: var(--xzx-progress-pivot-line-height);
    flex-shrink: 0;
    text-align: center;
    padding: var(--xzx-progress-pivot-padding);
    transition: all var(--xzx-duration-base) var(--xzx-ease-out);

    &--inactive {
      color: var(--xzx-progress-inactive-color);
    }
  }
}
