:root {
  --apex-finance-bg: #101012;
  --apex-finance-surface: #171719;
  --apex-finance-line: #343033;
  --apex-finance-copy: #f3efeb;
  --apex-finance-muted: #aaa39f;
  --apex-finance-red: #e3333d;
  --apex-finance-green: #8eb478;
}

.apex-mobicred-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  justify-self: stretch;
  box-sizing: border-box;
  width: 100%;
  margin: 10px 0 2px;
  padding: 9px 10px;
  border: 1px solid var(--apex-finance-line);
  border-radius: 4px;
  background: var(--apex-finance-surface);
  color: var(--apex-finance-copy);
  font-size: 11px;
  line-height: 1.25;
}

.apex-mobicred-card__brand {
  grid-column: 1 / -1;
  color: var(--apex-finance-red);
  font-weight: 800;
}

.apex-mobicred-card > span:not(.apex-mobicred-card__brand) {
  display: grid;
  gap: 2px;
  justify-content: start;
  white-space: nowrap;
}

.apex-mobicred-card b {
  color: var(--apex-finance-muted);
  font-weight: 600;
}

.apex-mobicred-card em {
  align-self: flex-end;
  color: var(--apex-finance-muted);
  font-size: 8px;
  font-style: normal;
}

.apex-mobicred-card .woocommerce-Price-amount {
  color: var(--apex-finance-copy);
  font: inherit;
  font-weight: 700;
}

.apex-mobicred-card small {
  grid-column: 2 / -1;
  color: var(--apex-finance-muted);
  font-size: 11px;
  line-height: 1.35;
}

.apex-mobicred-plan {
  margin: 14px 0 22px;
  padding: 18px;
  border: 1px solid var(--apex-finance-line);
  border-radius: 6px;
  background: var(--apex-finance-bg);
  color: var(--apex-finance-copy);
}

.apex-mobicred-plan__heading {
  display: grid;
  gap: 4px;
}

.apex-mobicred-plan__heading span {
  color: var(--apex-finance-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.apex-mobicred-plan__heading strong {
  color: var(--apex-finance-copy);
  font-size: 18px;
  line-height: 1.25;
}

.apex-mobicred-plan__terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  border-top: 1px solid var(--apex-finance-line);
  border-bottom: 1px solid var(--apex-finance-line);
}

.apex-mobicred-plan__terms > div {
  display: grid;
  gap: 3px;
  padding: 14px 12px;
}

.apex-mobicred-plan__terms > div + div {
  border-left: 1px solid var(--apex-finance-line);
}

.apex-mobicred-plan__terms span,
.apex-mobicred-plan__terms small {
  color: var(--apex-finance-muted);
  font-size: 11px;
}

.apex-mobicred-plan__terms strong {
  color: var(--apex-finance-copy);
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.1;
}

.apex-mobicred-plan__status {
  margin: 12px 0 0;
  color: var(--apex-finance-copy);
  font-size: 13px;
  line-height: 1.5;
}

.apex-mobicred-plan__legal {
  margin: 12px 0 0;
  color: var(--apex-finance-muted);
  font-size: 11px;
  line-height: 1.55;
}

.apex-mobicred-plan__legal a {
  color: var(--apex-finance-copy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--apex-finance-red);
  text-underline-offset: 3px;
}

.apex-payfast-checkout-trust {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(340px, 1.2fr);
  gap: 18px 28px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--apex-finance-line);
  border-top-color: var(--apex-finance-red);
  border-radius: 6px;
  background: var(--apex-finance-bg);
  color: var(--apex-finance-copy);
}

.apex-payfast-checkout-trust__lead {
  display: grid;
  gap: 4px;
}

.apex-payfast-checkout-trust__lead span {
  color: var(--apex-finance-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.apex-payfast-checkout-trust__lead strong {
  color: var(--apex-finance-copy);
  font-size: 18px;
  line-height: 1.3;
}

.apex-payfast-checkout-trust__methods {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.apex-payfast-checkout-trust__methods b {
  padding: 7px 9px;
  border: 1px solid var(--apex-finance-line);
  border-radius: 3px;
  background: var(--apex-finance-surface);
  color: var(--apex-finance-copy);
  font-size: 11px;
  font-weight: 700;
}

.apex-payfast-checkout-trust > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--apex-finance-muted);
  font-size: 13px;
  line-height: 1.55;
}

body.woocommerce-checkout #payment li.payment_method_payfast > label::after,
body.woocommerce-checkout #payment li.payment_method_class_yoco_wc_payment_gateway > label::after {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 9px;
  padding: 2px 7px;
  border: 1px solid var(--apex-finance-line);
  border-radius: 3px;
  color: var(--apex-finance-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

body.woocommerce-checkout #payment li.payment_method_payfast > label::after {
  content: "PRIMARY";
  border-color: color-mix(in srgb, var(--apex-finance-red) 60%, var(--apex-finance-line));
  color: var(--apex-finance-red);
}

body.woocommerce-checkout #payment li.payment_method_payfast > label img {
  width: auto;
  max-width: 96px;
  max-height: 34px;
  margin: 8px 8px 0 0;
  padding: 6px 8px;
  border: 1px solid #d8d6d3;
  border-radius: 3px;
  background: #f7f7f4;
  box-sizing: border-box;
  vertical-align: middle;
}

body.woocommerce-checkout #payment li.payment_method_class_yoco_wc_payment_gateway > label::after {
  content: "SECONDARY";
}

body.woocommerce-checkout #payment li.payment_method_payfast .payment_box,
body.woocommerce-checkout #payment li.payment_method_class_yoco_wc_payment_gateway .payment_box {
  color: var(--apex-finance-copy);
}

.apex-checkout-commitment--payfast {
  color: var(--apex-finance-muted) !important;
}

@media (max-width: 720px) {
  .apex-mobicred-card {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .apex-mobicred-card__brand,
  .apex-mobicred-card small {
    grid-column: 1 / -1;
  }

  .apex-mobicred-plan {
    padding: 15px;
  }

  .apex-mobicred-plan__terms {
    grid-template-columns: 1fr;
  }

  .apex-mobicred-plan__terms > div {
    grid-template-columns: 70px 1fr;
    align-items: baseline;
    padding: 11px 4px;
  }

  .apex-mobicred-plan__terms > div + div {
    border-top: 1px solid var(--apex-finance-line);
    border-left: 0;
  }

  .apex-mobicred-plan__terms small {
    grid-column: 2;
  }

  .apex-payfast-checkout-trust {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .apex-payfast-checkout-trust__methods {
    justify-content: flex-start;
  }

  .apex-payfast-checkout-trust > p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apex-mobicred-plan *,
  .apex-payfast-checkout-trust * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
