: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; }
}
