$medium-width: 475px;

.wpp-payment-bootstrap-form {
  background: transparent;
  margin-top: 10px;

  .StripeElement {
    box-sizing: border-box;
    height: 40px;
    padding: 10px 12px;
    border-radius: 4px;
    background-color: white;
    -webkit-transition: box-shadow 150ms ease;
    transition: box-shadow 150ms ease;
  }

  .row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    margin-bottom: 0px;
    margin-top: 0px;
  }

  .mb-2, .my-2 {
    margin-bottom: .5rem !important;
  }

  .mb-3, .my-3 {
    margin-bottom: 18px !important;
  }

  .col-md-3, .col-md-4, .col-md-6, .col-md-9, .col-md-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
  }

  .md-form + label {
    position: absolute;
    top: .65rem;
    left: 15px;
    -webkit-transition: .3s ease-out;
    -o-transition: .3s ease-out;
    transition: .3s ease-out;
    cursor: text;
    color: #757575;
    pointer-events: none;
    overflow: hidden;
  }

  .md-form.md-outline,
  .md-form.md-outline {
    &.StripeElement {
      + label {
        font-size: 16px;
        position: absolute !important;
        top: 50%;
        transition-property: color, transform;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        padding-left: 12px;
        -webkit-transition: .3s ease-out;
        -o-transition: .3s ease-out;
        transition: .3s ease-out;
        cursor: text;
        color: #495057;
        font-weight: 300;
        margin: 0;
        pointer-events: none;
      }
    }
  }

  .md-form.md-outline.focused,
  .md-form.md-outline.invalid,
  .md-form.md-outline.StripeElement--complete {
    + label {
      -webkit-transform: translateY(-35px);
      -ms-transform: translateY(-35px);
      transform: translateY(-35px);
      background: #fff !important;
      font-weight: 500;
      padding-right: 5px;
      padding-left: 5px;
      font-size: 12px;
      left: 20px;
      font-weight: 500;
    }
  }

  .md-form.md-outline {
    height: auto;
    position: relative;
    width: 100%;

    &.invalid {
      + label {
        color: #E25950 !important;
      }
    }

    &.focused {
      + label {
        color: #4285f4
      }
    }

    &.StripeElement--complete {
      border-color: #1b9404;
      box-shadow: inset 0 0 0 0.5px #1b9404;
      -webkit-box-shadow: inset 0 0 0 0.5px #1b9404;

      + label {
        color: #1b9404;
      }
    }
  }

  .stripe-input {
    -webkit-transition: all .3s;
    -o-transition: all .3s;
    transition: all .3s;
    outline: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
    border: 1px solid #dadce0;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    background-color: #fff !important;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    height: 40px;
  }

  .stripe-input.focused,
  .stripe-input.invalid {
    border-color: #4285f4;
    -webkit-box-shadow: inset 0 0 0 0.5px #4285f4;
    box-shadow: inset 0 0 0 0.5px #4285f4
  }

  .stripe-input.invalid {
    border-color: #E25950;
    box-shadow: inset 0 0 0 0.5px #E25950;
  }

  [class^="col-md-"] {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .wpp-payment-card {
    top: 50%;
    right: 30px;
    bottom: 0;
    transform: translateY(-50%);
  }

  @media (min-width: $medium-width) {
    .col-md-3 {
      -ms-flex: 0 0 25%;
      flex: 0 0 25%;
      max-width: 25%;
    }

    .col-md-4 {
      -webkit-box-flex: 0;
      -ms-flex: 0 0 33.33%;
      flex: 0 0 33.33%;
      max-width: 33.33%;
    }

    .col-md-6 {
      -webkit-box-flex: 0;
      -ms-flex: 0 0 50%;
      flex: 0 0 50%;
      max-width: 50%;
    }

    .col-md-9 {
      -webkit-box-flex: 0;
      -ms-flex: 0 0 75%;
      flex: 0 0 75%;
      max-width: 75%;
    }

    .col-md-12 {
      -webkit-box-flex: 0;
      -ms-flex: 0 0 100%;
      flex: 0 0 100%;
      max-width: 100%;
    }
  }
}

.small-form {
  .wpp-payment-bootstrap-form {
    [class^="col-md-"] {
      -ms-flex: 0 0 100%;
      flex: 0 0 100%;
      max-width: 100%;
    }
  }
}

.wpp-payment-blocks-payment-method__desc {
  &.stripe_cc {
    p {
      margin-bottom: 1em;
    }
  }
}