@use 'sass:color';
@use 'variables' as *;
@use '../button/variables' as btn;

@include export-module('progress-button-theme') {

  /*! Progress Button Theme */
  .e-progress-btn {
    .e-spinner-pane .e-spinner-inner svg {
      fill: $progress-btn-color;
      stroke: $progress-btn-color;

      .e-path-circle {
        @if $skin-name == 'bootstrap4' {
          stroke-width: 1px;
        }
        @else if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
          stroke-width: 3px;
        }
      }

      .e-path-arc {
        stroke: btn.$btn-color;
        @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
          stroke-width: 3px;
        }
      }
    }

    &.e-primary,
    &.e-primary.e-outline:hover,
    &.e-primary.e-outline:focus,
    &.e-primary.e-flat:hover,
    &.e-primary.e-flat:focus {
      .e-spinner-pane .e-spinner-inner svg {
        fill: btn.$btn-primary-color;
        stroke: btn.$btn-primary-color;

        .e-path-circle {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            stroke: color.adjust(btn.$btn-primary-color, $alpha: -$progress-btn-circle-opacity);
          }
          @else if $skin-name == 'tailwind' {
            stroke: color.adjust($progress-btn-primary-color, $alpha: -$progress-btn-circle-opacity);
          }
        }

        .e-path-arc {
          stroke: btn.$btn-primary-color;
        }
      }

      &.e-flat {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-flat-primary-color;
          stroke: btn.$btn-flat-primary-color;

          .e-path-circle {
            @if $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust($btn-flat-primary-path-arc, $alpha: -$progress-btn-circle-opacity);
            }
            @else if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap4' or $skin-name == 'bootstrap'{
              stroke: color.adjust(btn.$btn-flat-primary-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' or $skin-name == 'bootstrap5' or $skin-name == 'bootstrap5.3' or $skin-name == 'Material3' {
              stroke: $btn-flat-primary-path-arc;
            }
            @else {
              stroke: btn.$btn-flat-primary-color;
            }
          }
        }
      }
    }

    &.e-primary.e-outline:hover,
    &.e-primary.e-outline:focus {
      @if $skin-name == 'Material3' {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-primary-bgcolor;
          stroke: btn.$btn-primary-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-primary-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-primary-color;
          }
        }
      }
    }

    &.e-success,
    &.e-success.e-outline:hover,
    &.e-success.e-outline:focus,
    &.e-success.e-flat:hover,
    &.e-success.e-flat:focus {
      .e-spinner-pane .e-spinner-inner svg {
        fill: btn.$btn-success-color;
        stroke: btn.$btn-success-color;

        .e-path-circle {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            stroke: color.adjust(btn.$btn-success-color, $alpha: -$progress-btn-circle-opacity);
          }
          @else if $skin-name == 'tailwind' {
            stroke: color.adjust($progress-btn-success-color, $alpha: -$progress-btn-circle-opacity);
          }
        }

        .e-path-arc {
          stroke: btn.$btn-success-color;
        }
      }

      &.e-flat {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-flat-success-color;
          stroke: btn.$btn-flat-success-color;

          .e-path-circle {
            @if $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust($btn-flat-primary-path-arc, $alpha: -$progress-btn-circle-opacity);
            }
            @else {
              @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
                stroke: color.adjust(btn.$btn-flat-success-color, $alpha: -$progress-btn-circle-opacity);
              }
            }
          }

          .e-path-arc {
            @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
              stroke: $btn-flat-primary-path-arc;
            }
            @else {
              stroke: btn.$btn-flat-success-color;
            }
          }
        }
      }
    }

    &.e-success.e-outline:hover,
    &.e-success.e-outline:focus {
      @if $skin-name == 'Material3' {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-success-bgcolor;
          stroke: btn.$btn-success-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-success-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-success-color;
          }
        }
      }
    }

    &.e-info,
    &.e-info.e-outline:hover,
    &.e-info.e-outline:focus,
    &.e-info.e-flat:hover,
    &.e-info.e-flat:focus {
      .e-spinner-pane .e-spinner-inner svg {
        fill: btn.$btn-info-color;
        stroke: btn.$btn-info-color;

        .e-path-circle {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            stroke: color.adjust(btn.$btn-info-color, $alpha: -$progress-btn-circle-opacity);
          }
          @else if $skin-name == 'tailwind' {
            stroke: color.adjust($progress-btn-info-color, $alpha: -$progress-btn-circle-opacity);
          }
          @if $skin-name == 'fluent2' {
            stroke: color.adjust(#242424, $alpha: -$progress-btn-circle-opacity);
          }
        }

        .e-path-arc {
          stroke: btn.$btn-info-color;
        }
      }

      &.e-flat {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-flat-info-color;
          stroke: btn.$btn-flat-info-color;

          .e-path-circle {
            @if $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust($btn-flat-primary-path-arc, $alpha: -$progress-btn-circle-opacity);
            }
            @else if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-flat-info-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
              stroke: $btn-flat-primary-path-arc;
            }
            @else {
              stroke: btn.$btn-flat-info-color;
            }
          }
        }
      }
    }

    &.e-info.e-outline:hover,
    &.e-info.e-outline:focus {
      @if $skin-name == 'Material3' {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-info-bgcolor;
          stroke: btn.$btn-info-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-info-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-info-color;
          }
        }
      }
    }

    &.e-warning,
    &.e-warning.e-outline:hover,
    &.e-warning.e-outline:focus,
    &.e-warning.e-flat:hover,
    &.e-warning.e-flat:focus {
      .e-spinner-pane .e-spinner-inner svg {
        fill: btn.$btn-warning-color;
        stroke: btn.$btn-warning-color;

        .e-path-circle {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            stroke: color.adjust(btn.$btn-warning-color, $alpha: -$progress-btn-circle-opacity);
          }
          @else if $skin-name == 'tailwind' {
            stroke: color.adjust($progress-btn-warning-color, $alpha: -$progress-btn-circle-opacity);
          }
        }

        .e-path-arc {
          stroke: btn.$btn-warning-color;
        }
      }

      &.e-flat {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-flat-warning-color;
          stroke: btn.$btn-flat-warning-color;

          .e-path-circle {
            @if $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust($btn-flat-primary-path-arc, $alpha: -$progress-btn-circle-opacity);
            }
            @else {
              stroke: btn.$btn-flat-warning-color;
            }
          }

          .e-path-arc {
            @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
              stroke: $btn-flat-primary-path-arc;
            }
            @else {
              stroke: btn.$btn-flat-warning-color;
            }
          }
        }
      }
    }

    &.e-warning.e-outline:hover,
    &.e-warning.e-outline:focus {
      @if $skin-name == 'Material3' {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-warning-bgcolor;
          stroke: btn.$btn-warning-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-warning-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-warning-color;
          }
        }
      }
    }

    &.e-danger,
    &.e-danger.e-outline:hover,
    &.e-danger.e-outline:focus,
    &.e-danger.e-flat:hover,
    &.e-danger.e-flat:focus {
      .e-spinner-pane .e-spinner-inner svg {
        fill: btn.$btn-danger-color;
        stroke: btn.$btn-danger-color;

        .e-path-circle {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            stroke: color.adjust(btn.$btn-danger-color, $alpha: -$progress-btn-circle-opacity);
          }
          @else if $skin-name == 'tailwind' {
            stroke: color.adjust($progress-btn-danger-color, $alpha: -$progress-btn-circle-opacity);
          }
        }

        .e-path-arc {
          stroke: btn.$btn-danger-color;
        }
      }

      &.e-flat {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-flat-danger-color;
          stroke: btn.$btn-flat-danger-color;

          .e-path-circle {
            @if $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust($btn-flat-primary-path-arc, $alpha: -$progress-btn-circle-opacity);
            }
            @else if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-flat-danger-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
              stroke: $btn-flat-primary-path-arc;
            }
            @else {
              stroke: btn.$btn-flat-danger-color;
            }
          }
        }
      }
    }

    &.e-danger.e-outline:hover,
    &.e-danger.e-outline:focus {
      @if $skin-name == 'Material3' {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-danger-bgcolor;
          stroke: btn.$btn-danger-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-danger-color, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-danger-color;
          }
        }
      }
    }

    &.e-outline,
    &.e-flat {
      &.e-primary {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-primary-bgcolor;
          stroke: btn.$btn-primary-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-primary-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
            @else if $skin-name == 'tailwind' {
              stroke: color.adjust($progress-btn-primary-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-primary-bgcolor;
          }
        }
      }

      &.e-success {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-success-bgcolor;
          stroke: btn.$btn-success-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-success-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
          }
          .e-path-arc {
            stroke: btn.$btn-success-bgcolor;
          }
        }
      }

      &.e-info {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-info-bgcolor;
          stroke: btn.$btn-info-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-info-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
            @else if $skin-name == 'tailwind' {
              stroke: color.adjust($progress-btn-info-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-info-bgcolor;
          }
        }
      }

      &.e-warning {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-warning-bgcolor;
          stroke: btn.$btn-warning-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-warning-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-warning-bgcolor;
          }
        }
      }

      &.e-danger {
        .e-spinner-pane .e-spinner-inner svg {
          fill: btn.$btn-danger-bgcolor;
          stroke: btn.$btn-danger-bgcolor;

          .e-path-circle {
            @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
              stroke: color.adjust(btn.$btn-danger-bgcolor, $alpha: -$progress-btn-circle-opacity);
            }
          }

          .e-path-arc {
            stroke: btn.$btn-danger-bgcolor;
          }
        }
      }
    }

    &.e-link {
      .e-spinner-pane .e-spinner-inner svg {
        fill: btn.$btn-link-color;
        stroke: btn.$btn-link-color;

        .e-path-circle {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            stroke: color.adjust(btn.$btn-link-color, $alpha: -$progress-btn-circle-opacity);
          }
          @else if $skin-name == 'tailwind' {
            stroke: color.adjust($progress-btn-link-color, $alpha: -$progress-btn-circle-opacity);
          }
        }

        .e-path-arc {
          stroke: btn.$btn-link-color;
        }
      }
    }
  }

  .e-progress {
    @if $skin-name == 'bootstrap5.3'  {
      background: currentColor;
    }
    @else {
      background: $progress-btn-bgcolor-normal;
    }
  }

  *.e-primary,
  *.e-success,
  *.e-danger {
    .e-progress {
      @if $skin-name == 'bootstrap5.3'  {
        background: currentColor;
      }
      @else {
        background: $progress-btn-bgcolor;
      }
    }
  }

  *.e-info {
    .e-progress {
      @if $skin-name == 'bootstrap5.3'  {
        background: currentColor;
      }
      @else if $skin-name != 'fluent2' {
        background: $progress-btn-bgcolor;
      }
    }
  }

  *.e-flat {
    &.e-primary {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust($progress-btn-flat-primary-progress-color, $alpha: -.8);
        }
      }
    }

    &.e-success {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust($progress-btn-flat-success-progress-color, $alpha: -.8);
        }
      }
    }

    &.e-info {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust($progress-btn-flat-info-progress-color, $alpha: -.8);
        }
      }
    }

    &.e-warning {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust($progress-btn-flat-warning-progress-color, $alpha: -.8);
        }
      }
    }

    &.e-danger {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust($progress-btn-flat-danger-progress-color, $alpha: -.8);
        }
      }
    }
  }

  *.e-outline:not(:focus) {
    &.e-primary {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
          background: color.adjust(btn.$btn-primary-bgcolor, $alpha: -.8);
        }
        @else if $skin-name == 'tailwind' {
          background: color.adjust($progress-btn-primary-bgcolor, $alpha: -.8);
        }
      }
    }

    &.e-success {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust(btn.$btn-success-bgcolor, $alpha: -.8);
        }
      }
    }

    &.e-info {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
          background: color.adjust(btn.$btn-info-bgcolor, $alpha: -.8);
        }
        @else if $skin-name == 'tailwind' {
          background: color.adjust($progress-btn-info-bgcolor, $alpha: -.8);
        }
      }
    }

    &.e-warning {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust(btn.$btn-warning-bgcolor, $alpha: -.8);
        }
      }
    }

    &.e-danger {
      .e-progress {
        @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
          background: color.adjust(btn.$btn-danger-bgcolor, $alpha: -.8);
        }
      }
    }
  }
  
  @if $skin-name == 'Material3' {
    *.e-flat,
    *.e-flat:not(:focus) {
      &.e-primary {
        .e-progress {
          background: $progress-btn-flat-primary-progress-color;
        }
      }

      &.e-success {
        .e-progress {
          background: $progress-btn-flat-success-progress-color;
        }
      }

      &.e-info {
        .e-progress {
          background: $progress-btn-flat-info-progress-color;
        }
      }

      &.e-warning {
        .e-progress {
          background: $progress-btn-flat-warning-progress-color;
        }
      }

      &.e-danger {
        .e-progress {
          background: $progress-btn-flat-danger-progress-color;
        }
      }
    }
  }

  *.e-flat:not(:focus) {
    @if $skin-name == 'bootstrap5' or $skin-name == 'bootstrap5.3' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
      &.e-primary {
        .e-progress {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            background: color.adjust(btn.$btn-primary-bgcolor, $alpha: -.8);
          }
          @else if $skin-name == 'tailwind' {
            background: color.adjust($progress-btn-primary-bgcolor, $alpha: -.8);
          }
        }
      }

      &.e-success {
        .e-progress {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
            background: color.adjust(btn.$btn-success-bgcolor, $alpha: -.8);
          }
        }
      }

      &.e-info {
        .e-progress {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'FluentUI' {
            background: color.adjust(btn.$btn-info-bgcolor, $alpha: -.8);
          }
          @else if $skin-name == 'tailwind' {
            background: color.adjust($progress-btn-info-bgcolor, $alpha: -.8);
          }
        }
      }

      &.e-warning {
        .e-progress {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
            background: color.adjust(btn.$btn-warning-bgcolor, $alpha: -.8);
          }
        }
      }

      &.e-danger {
        .e-progress {
          @if $skin-name == 'material' or $skin-name == 'fabric' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'FluentUI' {
            background: color.adjust(btn.$btn-danger-bgcolor, $alpha: -.8);
          }
        }
      }
    }
  }
}

@if $skin-name != 'fluent2' {
  .e-progress-btn.e-outline .e-spinner-pane .e-spinner-inner svg {
    fill: btn.$btn-outline-color;
    stroke: btn.$btn-outline-color;
  }
  
  .e-progress-btn.e-outline:focus .e-spinner-pane .e-spinner-inner svg {
    fill: btn.$btn-color;
    stroke: btn.$btn-color;
  }
  
  .e-progress-btn.e-outline.e-success .e-spinner-pane .e-spinner-inner svg .e-path-arc {
    stroke: btn.$btn-outline-color;
  }
}

@if $skin-name == 'fluent2' {
  .e-primary.e-outline .e-progress,
  .e-primary.e-flat .e-progress {
    background: rgba(15, 108, 189, .5) !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-success.e-outline .e-progress,
  .e-success.e-flat .e-progress {
    background: rgba(16, 124, 16, .5) !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-danger.e-outline .e-progress,
  .e-danger.e-flat .e-progress {
    background: rgba(197, 15, 31, .5) !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-warning.e-outline .e-progress,
  .e-warning.e-flat .e-progress {
    background: rgba(247, 99, 12, .5) !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-info.e-outline .e-progress,
  .e-info.e-flat .e-progress {
    background: rgba(49, 175, 204, .5) !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-progress-btn.e-warning .e-spinner-pane .e-spinner-inner .e-spin-fluent2 .e-path-circle {
    stroke: color.adjust(#242424, $alpha: -$progress-btn-circle-opacity) !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-progress-btn.e-warning.e-flat:focus .e-spinner-pane .e-spinner-inner .e-spin-fluent2 .e-path-circle {
    stroke: $brand-160 !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-progress-btn.e-outline {
    &.e-success:focus .e-spinner-pane .e-spinner-inner svg .e-path-arc {
      stroke: $success-bg-color;
    }
    &.e-primary:focus .e-spinner-pane .e-spinner-inner svg .e-path-arc {
      stroke: $primary-bg-color;
    }
    &.e-danger:focus .e-spinner-pane .e-spinner-inner svg .e-path-arc {
      stroke: $danger-bg-color;
    }
    &.e-warning:focus .e-spinner-pane .e-spinner-inner svg .e-path-arc {
      stroke: $warning-bg-color;
    }
    &.e-info:focus .e-spinner-pane .e-spinner-inner svg .e-path-arc {
      stroke: $info-bg-color;
    }
  }

  .e-progress-btn .e-spinner-pane .e-spinner-inner .e-spin-fluent2 .e-path-circle {
    stroke: $progress-btn-spinner-color !important; /* stylelint-disable-line declaration-no-important */
  }
}

@if $skin-name == 'tailwind3' {
  .e-progress,
  .e-primary .e-progress,
  .e-success .e-progress,
  .e-warning .e-progress,
  .e-info .e-progress,
  .e-danger .e-progress,
  .e-primary.e-outline .e-progress,
  .e-primary.e-flat .e-progress,
  .e-success.e-outline .e-progress,
  .e-success.e-flat .e-progress,
  .e-danger.e-outline .e-progress,
  .e-danger.e-flat .e-progress,
  .e-warning.e-outline .e-progress,
  .e-warning.e-flat .e-progress,
  .e-info.e-outline .e-progress,
  .e-info.e-flat .e-progress {
    opacity: .2 !important; /* stylelint-disable-line declaration-no-important */
  }

  .e-progress {
    background: $secondary-text-color-focus;
  }

  .e-primary .e-progress {
    background: $primary-text;
  }

  .e-success .e-progress {
    background: $success-text;
  }

  .e-warning .e-progress {
    background: $warning-text;
  }

  .e-info .e-progress {
    background: $info-text;
  }

  .e-danger .e-progress {
    background: $danger-text;
  }

  .e-primary.e-outline .e-progress,
  .e-primary.e-flat .e-progress {
    background: $primary-bg-color;
  }

  .e-success.e-outline .e-progress,
  .e-success.e-flat .e-progress {
    background: $success-bg-color;
  }

  .e-danger.e-outline .e-progress,
  .e-danger.e-flat .e-progress {
    background: $danger-bg-color;
  }

  .e-warning.e-outline .e-progress,
  .e-warning.e-flat .e-progress {
    background: $warning-bg-color;
  }

  .e-info.e-outline .e-progress,
  .e-info.e-flat .e-progress {
    background: $info-bg-color;
  }
}
