@import '../helpers/helpers';

.checkout-action {
  margin-top: 5px;
  padding-bottom: 20px;
  border-bottom: 1px solid $gray;

  & .btn-checkout {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    margin-bottom: 20px;

    .icon {
      padding-left: 5px;
    }
  }

  & .form-row__col-btn {
    padding-right: 0;
    padding-left: 0;

    & .paypal-button-container {
      min-width: inherit;
      max-width: 100%;

      & .paypal-button {
        padding-top: 0;
      }

      & .paypal-button-text {
        padding-left: 3px;
        font-size: .875rem;
        font-weight: 500;
      }
    }
  }

  &__wrapper {
    order: -2;

    &.large {
      order: inherit;

      .checkout-action {
        margin-top: 20px;
      }
    }

    &.mounted {
      display: none;
    }
  }

  &__large {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: $gray-bg;
    border: 1px solid $border-grey;
    margin-bottom: 30px;


    & .checkout-action {
      &__section {
        @include make-col(12);

        &:last-of-type {
          padding-right: 0;
        }
      }
    }
  }

  &__section {
    &.checkout-widget__basket-block {
      margin-top: 0;
      padding-top: 0;
      border: 0;

      & .pay-pal_container {
        padding-top: 0;
        border: 0;
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .checkout-action {
    .pay-pal_wrap {
      .paypal-button-container {
        max-width: 100%;
      }
    }
  }
}

@include media-breakpoint-up(lg) {
  .checkout-action {
    &__wrapper {
      order: inherit;

      &.large {
        order: -2;
        margin-top: 20px;
      }

      &.mounted {
        display: block;
        padding-top: 15px;
        background: $white;

        .checkout-action {
          border-bottom: 0;
        }
      }
    }

    &__large {
      flex-direction: row;
      justify-content: center;
      padding: 35px;

      & .checkout-action {
        &__section {
          @include make-col(6);

          &:first-of-type {
            padding-right: 15px;
          }

          &:last-of-type {
            padding-left: 15px;
          }
        }
      }

      .btn-checkout {
        margin-bottom: 0;
      }
    }

    .btn-checkout {
      margin-bottom: 10px;
    }
  }
}
