@import "../core/exports";
@import "./input.windows.colors";
@import "./input";

@include exports("input.windows") {
  .mbsc-windows {
    &.mbsc-input {
      padding: .5em 1em 1em;
    }

    &.mbsc-input input,
    &.mbsc-input textarea,
    &.mbsc-select input {
      height: 2em;
      padding: 0 .3125em;
      font-size: 1em;
      background: transparent;
    }

    &.mbsc-ltr.mbsc-select input {
      padding-right: 1.75em;
    }

    &.mbsc-rtl.mbsc-select input {
      padding-left: 1.75em;
    }

    &.mbsc-input textarea {
      padding-top: .125em;
      padding-bottom: .125em;
    }

    .mbsc-input-ic {
      top: 0;
      margin-top: 0;
    }

    .mbsc-err-msg {
      position: absolute;
      padding-top: .333334em;
    }

    /* Textbox, textarea, select */
    &.mbsc-input.mbsc-ic-left input,
    &.mbsc-input.mbsc-ic-left textarea {
      padding-left: 2.25em;
    }

    &.mbsc-rtl.mbsc-input.mbsc-ic-left input,
    &.mbsc-rtl.mbsc-input.mbsc-ic-left textarea {
      padding-right: 2.25em;
      padding-left: .3125em;
    }

    &.mbsc-ltr.mbsc-input.mbsc-ic-right input,
    &.mbsc-ltr.mbsc-input.mbsc-ic-right textarea {
      padding-right: 2.25em;
    }

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

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

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

    &.mbsc-input .mbsc-label {
      padding-bottom: .3125em;
      font-size: .8125em;
    }

    &.mbsc-select .mbsc-select-ic {
      display: block;
      position: absolute;
      top: .5em;
    }

    &.mbsc-ltr.mbsc-select .mbsc-select-ic {
      right: .5em;
    }

    &.mbsc-rtl.mbsc-select .mbsc-select-ic {
      left: .5em;
    }

    &.mbsc-ic-right .mbsc-select-ic {
      display: none;
    }

    /* Inline labels */
    &.mbsc-label-inline.mbsc-input .mbsc-label {
      line-height: 2em;
      padding-bottom: 0;
    }

    /* Floating labels */
    &.mbsc-label-floating.mbsc-input {
      padding-top: 1.625em;

      .mbsc-label {
        font-size: 1em;
        position: absolute;
        top: 2.0625em;
      }

      &.mbsc-label-floating-active {
        .mbsc-label {
          -webkit-transform: translateY(-1.5em) scale(.75);
          transform: translateY(-1.5em) scale(.75);
        }
      }
    }

    /* Left to right */
    &.mbsc-ltr.mbsc-label-floating.mbsc-input {
      .mbsc-label {
        left: 1.375em;
      }

      &.mbsc-label-floating-active .mbsc-label {
        left: 1em;
      }

      &.mbsc-ic-left .mbsc-label {
        left: 3.375em;
      }

      &.mbsc-label-floating-active.mbsc-ic-left .mbsc-label {
        left: 1em;
      }
    }

    /* Right to left */
    &.mbsc-rtl.mbsc-label-floating.mbsc-input {
      .mbsc-label {
        right: 1.375em;
      }

      &.mbsc-label-floating-active .mbsc-label {
        right: 1em;
      }

      &.mbsc-ic-left .mbsc-label {
        right: 3.375em;
      }

      &.mbsc-label-floating-active.mbsc-ic-left .mbsc-label {
        right: 1em;
      }
    }
  }

  @include mbsc-windows-input(windows, $mbsc-windows-colors);
}