@import "../core/exports";
@import "../core/icons";
@import "./progress.material.colors";
@import "./progress";

@include exports("progress.material") {
  .mbsc-material {
    &.mbsc-progress {
      padding: .75em 1em;
    }

    &.mbsc-progress .mbsc-input-wrap {
      padding: 0;
    }

    &.mbsc-progress .mbsc-input-ic {
      top: .3125em;
      margin: 0;
    }

    &.mbsc-ltr.mbsc-progress.mbsc-ic-left .mbsc-input-wrap,
    &.mbsc-rtl.mbsc-progress.mbsc-ic-right .mbsc-input-wrap {
      padding-left: 2.25em;
    }

    &.mbsc-ltr.mbsc-progress.mbsc-ic-right .mbsc-input-wrap,
    &.mbsc-rtl.mbsc-progress.mbsc-ic-left .mbsc-input-wrap {
      padding-right: 2.25em;
    }

    &.mbsc-ltr.mbsc-progress.mbsc-ic-left .mbsc-left-ic,
    &.mbsc-rtl.mbsc-progress.mbsc-ic-right .mbsc-right-ic {
      right: auto;
      left: -0.375em;
    }

    &.mbsc-ltr.mbsc-progress.mbsc-ic-right .mbsc-right-ic,
    &.mbsc-rtl.mbsc-progress.mbsc-ic-left .mbsc-left-ic {
      left: auto;
      right: -0.375em;
    }

    &.mbsc-progress .mbsc-label {
      font-size: .75em;
    }

    .mbsc-progress-cont {
      padding: 1.25em 0;
    }

    .mbsc-progress-track {
      height: .125em;
    }

    .mbsc-progress-value {
      font-size: .75em;
      width: 4em;
    }

    &.mbsc-ltr.mbsc-progress.mbsc-progress-value-right .mbsc-input-wrap,
    &.mbsc-rtl.mbsc-progress.mbsc-progress-value-left .mbsc-input-wrap {
      padding-right: 3.25em;
    }

    &.mbsc-ltr.mbsc-progress.mbsc-progress-value-left .mbsc-input-wrap,
    &.mbsc-rtl.mbsc-progress.mbsc-progress-value-right .mbsc-input-wrap {
      padding-left: 3.25em;
    }

    &.mbsc-ltr.mbsc-progress-value-left.mbsc-ic-left .mbsc-input-wrap,
    &.mbsc-rtl.mbsc-progress-value-right.mbsc-ic-right .mbsc-input-wrap {
      padding-left: 5.5em;
    }

    &.mbsc-ltr.mbsc-progress-value-right.mbsc-ic-right .mbsc-input-wrap,
    &.mbsc-rtl.mbsc-progress-value-left.mbsc-ic-left .mbsc-input-wrap {
      padding-right: 5.5em;
    }

    &.mbsc-ltr.mbsc-progress-value-left.mbsc-ic-left .mbsc-progress-value,
    &.mbsc-rtl.mbsc-progress-value-right.mbsc-ic-right .mbsc-progress-value {
      left: 2.25em;
      right: auto;
    }

    &.mbsc-ltr.mbsc-progress-value-right.mbsc-ic-right .mbsc-progress-value,
    &.mbsc-rtl.mbsc-progress-value-left.mbsc-ic-left .mbsc-progress-value {
      left: auto;
      right: 2.25em;
    }

    /* Inline labels */
    .mbsc-label-inline.mbsc-progress.mbsc-control-w .mbsc-label {
      line-height: 2.625em;
    }

    /* Progress color presets */
    .mbsc-progress-primary .mbsc-progress-bar {
      background: $mbsc-material-primary;
    }

    .mbsc-progress-secondary .mbsc-progress-bar {
      background: $mbsc-material-secondary;
    }

    .mbsc-progress-success .mbsc-progress-bar {
      background: $mbsc-material-success;
    }

    .mbsc-progress-danger .mbsc-progress-bar {
      background: $mbsc-material-danger;
    }

    .mbsc-progress-warning .mbsc-progress-bar {
      background: $mbsc-material-warning;
    }

    .mbsc-progress-info .mbsc-progress-bar {
      background: $mbsc-material-info;
    }
  }

  @include mbsc-material-progress(material, (background: $mbsc-material-background, text: $mbsc-material-text, accent: $mbsc-material-accent));
}
