@import '../common.module.scss';
@import '../variables.scss';

.CheckoutPage {
  @include paper;
  display: flex;
  justify-content: center;
  padding: 15px;
  margin: 20px 0;
  position: relative;

  .checkoutMain {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .inputZone {
    width: 60%;
    padding-right: 20px;
    max-width: 440px;
  }

  .cartZone {
    width: 40%;
    padding-left: 20px;
  }

  .signInBlock {
    display: flex;
    margin: 20px 0 20px 0;

    .signInBtn {
      margin-right: 15px;
    }
  }

  .emailBlock {
    width: 60%;
  }

  .pageTitle {
    margin: 15px 0;
    font-size: 32px;
  }

  .input {
    margin-bottom: 20px;
  }

  .delimiter {
    width: 100%;
    border-bottom: 2px solid #eee;
    margin: 20px 0px;
  }

  .subHeader {
    font-size: 20px;
    font-weight: 400;
    margin: 20px 0px;
    text-transform: uppercase;
    color: #888;
  }

  .orderBtnWrapper {
    margin-top: 30px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .detailsRow {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #bbb;
    margin: 15px 0;
  }

  .totalText {
    font-size: 24px;
    font-weight: 500;
  }
}

.placedOrderContent {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;

  :global(.MuiSvgIcon-root) {
    font-size: 31px;
  }

  :global(.MuiAlert-message) {
    font-size: 21px;
    font-weight: 500;
  }
}

.checkoutFrame {
  width: 100%;
  height: 600px;
}

.loadBox {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  background-color: rgba(0, 0, 0, 0.4);
}

.cartListItem {
  .actionsBlock {
    position: absolute;
    right: 0;
  }
}

.checkout {
  margin: 40px 0;
}

@media screen and (max-width: $mobileBreakpoint) {
  .CheckoutPage {
    flex-direction: column;

    .inputZone,
    .cartZone {
      width: 100%;
      padding: 0;
    }

    .pageTitle {
      order: 0;
    }

    .cartZone {
      order: 1;
    }

    .inputZone {
      order: 2;
    }
  }
}
