@import "../core/exports";
@import "../core/icons";

@include exports("progress") {
  .mbsc-progress {
    position: relative;
    display: block;
    margin: 0;
    z-index: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  .mbsc-progress progress {
    display: none;
  }

  .mbsc-progress .mbsc-input-wrap {
    position: relative;
    display: block;
  }

  .mbsc-progress .mbsc-input-ic {
    position: absolute;
    height: 2em;
    width: 2em;
    line-height: 2em;
    text-align: center;
  }

  .mbsc-progress-cont {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    -ms-touch-action: pan-y;
    touch-action: pan-y;
  }

  .mbsc-progress-track {
    position: relative;
    display: block;
    box-sizing: border-box;
  }

  .mbsc-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
  }

  .mbsc-rtl .mbsc-progress-bar {
    left: auto;
    right: 0;
  }

  .mbsc-progress-anim .mbsc-progress-bar {
    transition: width .1s ease-in-out;
  }

  .mbsc-progress-value {
    position: absolute;
    top: 50%;
    width: 3em;
    overflow: hidden;
    margin-top: -.5em;
    line-height: 1em;
  }

  .mbsc-progress-value-right .mbsc-progress-value {
    right: 0;
    text-align: right;
  }

  .mbsc-rtl.mbsc-progress-value-right .mbsc-progress-value {
    right: auto;
    left: 0;
    text-align: left;
  }

  .mbsc-progress-value-left .mbsc-progress-value {
    left: 0;
    text-align: left;
  }

  .mbsc-rtl.mbsc-progress-value-left .mbsc-progress-value {
    left: auto;
    right: 0;
    text-align: right;
  }

  .mbsc-progress-step-label {
    position: absolute;
    top: 1em;
    width: 3.5em;
    font-size: .75em;
    text-align: center;
    overflow: hidden;
  }

  .mbsc-ltr .mbsc-progress-step-label {
    margin-left: -1.75em;
  }

  .mbsc-rtl .mbsc-progress-step-label {
    margin-right: -1.75em;
  }

  /* Inline labels */

  .mbsc-label-inline.mbsc-progress.mbsc-control-w {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;

    .mbsc-input-wrap {
      -webkit-box-flex: 1;
      -webkit-flex: 1 auto;
      -moz-box-flex: 1;
      -moz-flex: 1 auto;
      -ms-flex: 1 auto;
      flex: 1 auto;
    }

    .mbsc-label {
      position: static;
      -webkit-box-flex: 0;
      -webkit-flex: 0 auto;
      -moz-box-flex: 0;
      -moz-flex: 0 0 auto;
      -ms-flex: 0 0 auto;
      flex: 0 0 auto;
      font-size: 1em;
      line-height: 2.125em;
      width: 30%;
      max-width: 12.5em;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }
}
