@import '../icon/icon.scss';

.nut-theme-dark {
  .nut-progress {
    &-text {
      .nut-icon-checked {
        color: rgba(38, 191, 38, 1) !important;
      }
    }
  }
}

.nut-progress {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;

  .nut-progress-text {
    color: $progress-text-color;
  }

  &-outer {
    flex: auto;
    border-radius: $progress-border-radius;

    .nut-progress-text {
      color: $progress-text-inner-color;
    }

    .nut-progress-active:before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: $progress-border-radius;
      animation: progressActive 2s ease-in-out infinite;
    }
  }

  &-small {
    height: $progress-small-height;

    .nut-progress-text {
      font-size: $progress-small-font-size;
      padding: $progress-small-padding;
    }
  }

  &-base {
    height: $progress-base-height;

    .nut-progress-text {
      font-size: $progress-base-font-size;
      padding: $progress-base-padding;
    }
  }

  &-large {
    height: $progress-large-height;

    .nut-progress-text {
      font-size: $progress-large-font-size;
      padding: $progress-large-padding;
    }
  }

  &-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s;
    border-radius: $progress-border-radius;
  }

  &-text {
    display: flex;
    padding: $progress-text-padding;
    font-size: $progress-text-font-size;
    line-height: 1;
    min-width: 35px;
  }

  &-insidetext {
    position: absolute;
    top: $progress-insidetext-position-top;
    bottom: $progress-insidetext-position-bottom;
    display: flex;
    align-items: center;
    min-width: 0px;
    transition: all 0.4s;
    transform: translate(-50%);
    border-radius: $progress-insidetext-border-radius;
  }

  @keyframes progressActive {
    0% {
      background: rgba(255, 255, 255, 0.1);
      width: 0;
    }

    20% {
      background: rgba(255, 255, 255, 0.5);
      width: 0;
    }

    to {
      background: rgba(255, 255, 255, 0);
      width: 100%;
    }
  }
}
