.tpr-fields {
  font-size: var(--wp--preset--font-size--large);
  font-family: inherit;
  font-weight: inherit;
}

.tpr-line {
  display: flex;
  margin-bottom: 10px;
}

.tpr-line-reverse {
  display: flex;
  margin-bottom: 10px;
  flex-direction: row-reverse;
  align-items: center;
}

.tpr-line div {
  width: calc(100% - 32px);
}

.tpr-line-combo {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tpr-line-combo div {
  width: 30%;
}

.tpr-fields input {
  border-radius: 5px;
  line-height: 1.4;
  height: 40px;
  font: inherit;
  padding: 0px 14px;
}

.tpr-fields input.tpr-invalid {
  border: 2px solid var(--wc-red);
  background-color: #fff0f0;
}

.tpr-fields span.required {
  color: var(--wc-red);
}

.tpr-card-field {
  width: 100%;
}

.tpr-small-field {
  width: calc(100% - 32px);
}

.tpr-field-error {
  color: var(--wc-red);
  font-size: 0.875em;
  margin-top: 4px;
  display: inline;
  font-size: var(--wp--preset--font-size--normal);
  text-wrap-mode: nowrap;
}

.tpr-logo {
  width: 50px;
  padding-right: 10px;
}

.tpr-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpr-spinner {
  margin-left: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: rgb(142, 180, 71) rgb(142, 180, 71) transparent transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

.tpr-spinner::after,
.tpr-spinner::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent transparent #ff3d00 #ff3d00;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-sizing: border-box;
  animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}

.tpr-spinner::before {
  width: 14px;
  height: 14px;
  border-color: rgb(142, 180, 71) rgb(142, 180, 71) transparent transparent;
  animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

#tpr-container iframe {
  min-height: 300px;
  min-width: 650px;
}

.consumer-authentication {
  position: relative;
  transform: translate(50%, -110%);
  background: #fff;
  border-radius: 12px;
  width: min(420px, 95vw);
  height: min(620px, 95vh);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.gpay-card-info-container {
  min-width: 100px;
  width: 100%;
  font-weight: bold;
  border-radius: 3px;
}

.gpay-button {
  width: 100% !important;
}

apple-pay-button {
  background-color: black;
  border: none;
  color: white;
  cursor: pointer;
  font-synthesis: none;
  justify-content: center;
  position: relative;
  min-height: 35px;
  min-width: 100px;
  width: 100%;
  border-radius: 3px;
  padding-top: 5px;
  font-weight: bold;
  -moz-font-feature-settings: kern;
  -moz-osx-font-smoothing: "grayscale";
  -webkit-font-smoothing: antialiased;
  margin-right: 3px;
}

.tpr-pay-outer-methods {
  display: flex;
  justify-content: space-between;
}

.tpr-pay-method-card {
  padding: 3px;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0px;
}

.tpr-pay-method-mobilepay {
  color: white;
  padding: 3px;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  display: none;
  justify-content: center;
  align-items: center;
  margin: 10px 0px;
  border-color: #8696ff;
  background-color: #5a78ff;
}

.tpr-pay-method-reset {
  width: 60%;
  background-color: var(--wp--preset--color--base);
  color: var(--wp--preset--color--contrast);
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: normal;
  border: 1px solid;
  padding: 0px;
  border-radius: 3px;
  text-align: center;
  cursor: pointer;
  padding-bottom: 3px;
}

.tpr-pay-method-reset-text {
  font-size: var(--wp--preset--font-size--medium);
  margin-right: 10px;
}

.tpr-pay-method-card-text {
  margin: 3px;
  font-size: var(--wp--preset--font-size--medium);
  font-weight: bold;
}

.tpr-wallet-cards-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  flex-shrink: 1;
}

.tpr-wallet-card-logo {
  width: auto;
  height: 40px !important;
  float: left;
  padding-right: 10px;
}

.tpr-wallet-card-number {
  font-size: var(--wp--preset--font-size--normal);
  margin: 0px;
  font-weight: bold;
}

.tpr-wallet-card-expiry {
  font-size: var(--wp--preset--font-size--small);
  margin: 0px;
  line-height: 18px;
}

.tpr-wallet-card {
  padding: 5px;
  width: calc(50% - 16px);
  cursor: pointer;
  box-sizing: border-box;
}

.tpr-wallet-card-selected {
  border: 2px solid var(--wc-green);
  background-color: #f0fff0;
}

.tpr-wallet-card > * {
  pointer-events: none;
}

/* MobilePay lightbox styles from Transpayrent documentation */
.payment-initialization {
  opacity: 1;
  margin: auto;
  margin-top: 20px;
  border: 0px;
  z-index: 10001;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.payment-initialization:not(:empty) {
  display: block; /* Show when it has content */
}
.payment-initialization.payment-method-202 {
  width: 375px;
  height: 600px;
}
/* Mobile full-screen optimization for payment initialization */
@media (max-width: 768px) {
  .payment-initialization {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
  }
  .payment-initialization.payment-method-202 {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
  }
}
/* Grey overlay backdrop for MobilePay */
.mobilepay-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: none;
}
.mobilepay-overlay.active {
  display: block;
}
/* MobilePay loader styles */
.mobilepay-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 10001;
  min-width: 200px;
  display: none;
}
.mobilepay-loader.active {
  display: block;
}
