:root {
  --text: #30313d;
  --muted: #6d6e78;
  --subtle: #8b8d97;
  --border: #d9d9df;
  --border-dark: #c7c8ce;
  --blue: #0a7ad9;
  --blue-hover: #086fc7;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 5px rgba(0,0,0,.04);
  --radius: 7px;
}
* { box-sizing: border-box; }
html { background: #f7f7f8; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; background: #f7f7f8; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.checkout-shell { width: 100%; max-width: 400px; min-height: 100vh; margin: 0 auto; padding: 0 16px 28px; background: #fff; }
.merchant-header { height: 62px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ececf0; margin: 0 -16px; padding: 0 16px; }
.merchant { display: flex; align-items: center; min-width: 0; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.merchant-icon { width: 28px; height: 28px; flex: 0 0 28px; margin-right: 9px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.11); color: #777985; }
.merchant-icon svg { width: 15px; height: 15px; }
#merchant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details-toggle { border: 0; background: transparent; padding: 8px 0 8px 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #30313d; text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
.details-toggle svg { width: 10px; transition: transform .18s ease; }
.details-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.details-panel { margin: 0 -16px; padding: 13px 16px; border-bottom: 1px solid #ececf0; background: #fafafa; font-size: 13px; }
.details-panel div { display: flex; align-items: center; justify-content: space-between; }
.checkout-title-wrap { text-align: center; padding: 14px 0 16px; }
.checkout-title-wrap h1 { margin: 0; color: #6c6d75; font-size: 17px; line-height: 1.4; font-weight: 400; }
.loading-view { min-height: 380px; display: grid; place-items: center; }
.spinner { width: 23px; height: 23px; border: 2px solid #e1e2e6; border-top-color: #777984; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #e1a4a4; border-radius: 6px; background: #fff5f5; color: #9f2d2d; font-size: 13px; line-height: 1.4; }
.field-block label, .sub-label { display: block; margin-bottom: 6px; color: #3f4049; font-size: 13px; font-weight: 400; }
.field-block input, select { width: 100%; height: 45px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; outline: none; padding: 0 12px; font-size: 16px; box-shadow: var(--shadow); transition: border-color .14s, box-shadow .14s; }
.field-block input:focus, select:focus, .card-input-group:focus-within { border-color: #7ba7e5; box-shadow: 0 0 0 1px #7ba7e5, 0 1px 2px rgba(0,0,0,.05); }
.field-block input::placeholder, .card-input-group input::placeholder { color: #85868e; opacity: 1; }
.email-block { margin-top: 3px; margin-bottom: 28px; }
.payment-section h2 { margin: 0 0 13px; font-size: 17px; line-height: 1.35; font-weight: 500; color: #30313d; }
.payment-card { border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow); overflow: hidden; background: #fff; }
.payment-row { height: 52px; padding: 0 15px; display: flex; align-items: center; border-bottom: 1px solid #e2e2e6; }
.radio { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; border: 1px solid #212229; display: grid; place-items: center; margin-right: 17px; }
.radio span { width: 6px; height: 6px; border-radius: 50%; background: #111217; }
.card-glyph { width: 17px; height: 12px; flex: 0 0 17px; border-radius: 2px; background: #111217; margin-right: 12px; position: relative; }
.card-glyph span { position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: #fff; opacity: .9; }
.payment-label { font-size: 14px; font-weight: 500; }
.brand-strip { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.brand { width: 24px; height: 16px; display: grid; place-items: center; border: 1px solid #d7d8dc; border-radius: 2px; background: #fff; font-size: 7px; line-height: 1; font-style: normal; font-weight: 800; overflow: hidden; }
.brand.visa { color: #1a3c8f; font-style: italic; }
.brand.mastercard { position: relative; border-color: #ddd; }
.brand.mastercard i, .brand.mastercard b { position: absolute; width: 9px; height: 9px; border-radius: 50%; top: 3px; }
.brand.mastercard i { left: 5px; background: #ea3c2f; }
.brand.mastercard b { right: 5px; background: #f2a622; opacity: .92; }
.brand.jcb { color: #18724a; font-size: 8px; }
.brand.diners { color: #1e62a7; border-color: #bfcbd9; border-radius: 8px; font-size: 10px; }
.card-fields { padding: 14px 15px 16px; }
.sub-label { color: #62636d; }
.card-input-group { border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow); overflow: hidden; transition: border-color .14s, box-shadow .14s; }
.card-input-group input { height: 44px; border: 0; border-radius: 0; outline: 0; background: transparent; padding: 0 12px; font-size: 16px; box-shadow: none !important; }
.number-row { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.number-row input { width: 100%; padding-right: 102px; }
.field-brands { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.card-bottom-row { display: grid; grid-template-columns: 1fr 1fr; }
.card-bottom-row > input { width: 100%; border-right: 1px solid var(--border); }
.cvc-wrap { position: relative; }
.cvc-wrap input { width: 100%; padding-right: 45px; }
.cvc-icon { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 24px; height: 16px; border: 1.3px solid #686a73; border-radius: 3px; display: grid; place-items: end center; padding-bottom: 1px; font-size: 7px; color: #42434a; }
.holder-block { margin-top: 16px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 38px; font-size: 15px; }
.select-wrap svg { pointer-events: none; width: 11px; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); }
.save-copy { display: flex; flex-direction: column; min-width: 0; }
.save-copy strong { font-size: 14px; line-height: 1.35; font-weight: 400; }
.save-copy small { margin-top: 5px; color: #777982; font-size: 12px; line-height: 1.35; }
.pay-button { width: 100%; height: 56px; margin-top: 23px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 400; box-shadow: 0 2px 6px rgba(10,122,217,.2); cursor: pointer; display: grid; place-items: center; position: relative; }
.pay-button:hover { background: var(--blue-hover); }
.pay-button:disabled { cursor: wait; opacity: .72; }
.button-spinner { position: absolute; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.pay-button.loading #pay-label { opacity: 0; }
.checkout-footer { min-height: 57px; display: flex; align-items: center; justify-content: center; gap: 13px; color: #85868d; font-size: 12px; }
.checkout-footer a { color: #777981; text-decoration: none; }
.checkout-footer a:hover { text-decoration: underline; }
.divider { width: 1px; height: 17px; background: #d3d4d8; }
.status-view { min-height: 540px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 18px; }
.status-view h1 { margin: 16px 0 8px; font-size: 20px; font-weight: 600; }
.status-view p { margin: 0 0 16px; max-width: 290px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.status-view > strong { font-size: 22px; }
.status-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; font-weight: 600; }
.status-icon.success { background: #e7f6ed; color: #198754; }
.status-icon.error { background: #fff0f0; color: #b53b3b; }
@media (min-width: 401px) {
  body { padding: 16px 0; }
  .checkout-shell { min-height: calc(100vh - 32px); box-shadow: 0 0 0 1px rgba(0,0,0,.015); }
}
@media (max-width: 400px) {
  body { background: #fff; }
  .checkout-shell { max-width: none; }
}
@media (max-width: 350px) {
  .field-brands .brand:nth-child(4), .payment-row .brand:nth-child(4) { display: none; }
  .number-row input { padding-right: 80px; }
}


/* One-click upsell */
.upsell-card {
  width: min(100%, 420px);
  margin: 0 auto;
  text-align: center;
}

.upsell-heart {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 14px;
}

.upsell-card h1 {
  margin: 0 0 14px;
}

.upsell-copy {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 10px;
}

.upsell-subcopy {
  font-size: 14px;
  line-height: 1.5;
  opacity: .72;
  margin: 0 0 24px;
}

.upsell-decline {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  opacity: .7;
}

.upsell-decline:disabled {
  opacity: .35;
  cursor: default;
}

.upsell-message {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.5;
}


/* =========================================================
   MIRACLE HOPE - ONE CLICK UPSELL
   Visual only. Backend/payment logic untouched.
   ========================================================= */

#upsell-view.upsell-page, #upsell-final-view.upsell-page {
  width: min(100% - 28px, 460px);
  margin: 18px auto 28px;
  padding: 0;
  text-align: initial;
}

.upsell-reference-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 18px;
  box-shadow: 0 10px 32px #233c5c0b;
}

.upsell-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 21px 18px 17px;
  margin: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fbfcfe;
}

.upsell-check {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 1px solid #d4e7fc;
  border-radius: 50%;
  background: #eef6ff;
  color: #087cde;
  font-size: 18px;
}

.upsell-confirmation h1 {
  margin: 0 0 5px;
  color: #30313e;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.2px;
}

.upsell-confirmation p {
  margin: 0;
  color: #777984;
  font-size: 11px;
}

.upsell-reference-intro {
  padding: 19px 22px 22px;
  text-align: center;
}

.upsell-eyebrow {
  margin: 0 0 12px;
  color: #6681a0;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.upsell-reference-intro h2 {
  margin: 0;
  color: #30313e;
  font-size: 27px;
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -.8px;
  text-align: center;
}

.upsell-reference-intro h2 span {
  color: #1479c9;
}

.upsell-reference-copy {
  margin: 13px 0 18px;
  color: #68717c;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.upsell-reference-copy strong {
  color: #353e49;
  font-weight: 600;
}

.upsell-reference-accept {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 16px 36px;
  border: 0;
  border-radius: 10px;
  background: #087cde;
  box-shadow: 0 4px 12px #087cde22;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.upsell-reference-accept:hover {
  background: #0670c9;
}

.upsell-reference-accept:disabled {
  opacity: .65;
  cursor: wait;
}

.upsell-reference-accept .button-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.upsell-reference-status {
  margin: 12px 0 0;
  color: #4d5365;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.upsell-reference-decline {
  display: block;
  margin: 6px auto 0;
  padding: 8px;
  border: 0;
  background: none;
  color: #818995;
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.upsell-reference-decline:disabled {
  opacity: .55;
  cursor: wait;
}

.upsell-reference-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1204 / 984;
  min-height: 0;
  border-top: 1px solid #edf0f4;
  background-image: url("/upsell-reference.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.upsell-reference-footer {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 0 14px;
  color: #85868d;
  font-size: 12px;
}

.upsell-reference-footer a {
  color: #777981;
  text-decoration: none;
}

.upsell-reference-footer a:hover {
  text-decoration: underline;
}

.upsell-reference-footer .divider {
  width: 1px;
  height: 17px;
  background: #d3d4d8;
}

@media (max-width: 350px) {
  #upsell-view.upsell-page, #upsell-final-view.upsell-page {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .upsell-confirmation {
    padding: 16px;
  }

  .upsell-confirmation h1 {
    font-size: 15px;
  }

  .upsell-reference-intro {
    padding: 16px 18px 18px;
  }

  .upsell-reference-intro h2 {
    font-size: 24px;
  }

  .upsell-reference-copy {
    font-size: 13px;
  }
}


/* MIRACLE HOPE TRUST PARTNER */
.upsell-trust-footer {
  text-align: center;
  padding: 20px 14px 0;
  color: #8993a0;
  font-size: 11px;
  line-height: 1.7;
}

.upsell-trust-footer > p {
  margin: 0 0 14px;
}

.upsell-trust-footer strong {
  color: #667487;
  font-weight: 400;
}

.upsell-partner-label {
  margin: 0 0 10px !important;
  color: #718197;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.upsell-partner {
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
}

.upsell-partner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
