@font-face{font-family:Tajawal;src:url('/static/Tajawal-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Tajawal;src:url('/static/Tajawal-Bold.ttf') format('truetype');font-weight:600 800;font-display:swap}
@font-face{font-family:'IBM Plex Arabic';src:url('/static/IBMPlexSansArabic-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'IBM Plex Arabic';src:url('/static/IBMPlexSansArabic-SemiBold.ttf') format('truetype');font-weight:500 800;font-display:swap}
html[data-theme="lavender"]{background:#f1eef6;color-scheme:light}
html[data-theme="graphite"]{background:#11131b;color-scheme:dark}
html[data-theme="violet"]{background:#111119;color-scheme:dark}
.checkout-page{
  color-scheme:light;--bg:#f1eef6;--surface:#fff;--inset:#faf8fd;--raised:#eee9f5;--text:#292331;
  --muted:#71677d;--line:#e2dce9;--accent:#7650be;--accent-hover:#6543a7;--accent-ink:#6745a8;--soft:#f0e9fb;
  --success:#207353;--success-bg:#eaf5ef;--danger:#b23b50;--danger-bg:#fff0f2;--warning:#886018;--warning-bg:#fff7e9;
  --sheet-shadow:#3322400b;--font:Tajawal,'Segoe UI',Tahoma,sans-serif;--scale:1;
  display:flow-root;min-height:100dvh;margin:0;background:var(--bg);color:var(--text);font:400 calc(15px * var(--scale))/1.75 var(--font);
}
[data-theme="graphite"] .checkout-page{
  color-scheme:dark;--bg:#11131b;--surface:#191d29;--inset:#141720;--raised:#252b3a;--text:#f2f3f8;
  --muted:#adb6c8;--line:#343a4b;--accent:#7352d6;--accent-hover:#7a56d7;--accent-ink:#c4b4ff;--soft:#342946;
  --success:#6ddcb5;--success-bg:#16392f;--danger:#ffa1ac;--danger-bg:#3b242e;--warning:#f0c477;--warning-bg:#362d20;
  --sheet-shadow:#0003;
}
[data-theme="violet"] .checkout-page{
  color-scheme:dark;--bg:#111119;--surface:#1b1925;--inset:#211e2e;--raised:#2b2739;--text:#f4f1fa;
  --muted:#b9b2c8;--line:#393346;--accent:#7853c8;--accent-hover:#8964d8;--accent-ink:#cfbdff;--soft:#30263f;
  --success:#79d9b7;--success-bg:#1d342e;--danger:#ffa7b0;--danger-bg:#3a252d;--warning:#e8c88c;--warning-bg:#352e23;
  --sheet-shadow:#0003;
}
[data-font="cairo"] .checkout-page{--font:Cairo,'Segoe UI',Tahoma,sans-serif}
[data-font="plex"] .checkout-page{--font:'IBM Plex Arabic','Segoe UI',Tahoma,sans-serif}
[data-text-size="comfortable"] .checkout-page{--scale:1.067}
[data-text-size="large"] .checkout-page{--scale:1.133}
.checkout-page *{scrollbar-width:thin;scrollbar-color:var(--line) var(--bg)}
.checkout-page ::selection{background:var(--accent);color:#fff}
.checkout-page :is(input,button){font-family:inherit}
.checkout-page :is(a,button,input):focus-visible{outline:2px solid var(--accent-ink);outline-offset:4px}
.checkout-page .payment-sheet{width:min(calc(100% - 32px),460px);max-width:none;padding:0;margin:32px auto;background:var(--surface);border:0;border-radius:16px;box-shadow:0 12px 36px var(--sheet-shadow)}
.checkout-page .sheet-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px 20px}
.checkout-page .sheet-brand{display:flex;align-items:center;flex:none}
.checkout-page .sheet-brand img{display:block;width:112px;height:auto}
.checkout-page .provider-name{display:flex;align-items:center;gap:7px;padding:6px 9px;border-radius:8px;background:var(--inset);color:var(--muted);font-size:calc(13px * var(--scale));line-height:1.5}
.checkout-page svg{display:block;flex:none;width:19px;height:19px}
.checkout-page .provider-name svg{width:18px;height:18px}
.checkout-page .sheet-content{padding:0 24px}
.checkout-page .payment-steps{display:flex;align-items:center;gap:12px;padding-bottom:18px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.checkout-page .payment-step{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:calc(12px * var(--scale));line-height:1.5;white-space:nowrap}
.checkout-page .step-number{display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:50%;font-size:calc(11px * var(--scale));font-variant-numeric:tabular-nums;flex:none}
.checkout-page .step-line{height:1px;flex:1;min-width:10px;background:var(--line)}
.checkout-page .payment-step.is-current{color:var(--accent-ink)}
.checkout-page .is-current .step-number{background:var(--accent);color:#fff;border-color:var(--accent)}
.checkout-page .payment-step.is-done{color:var(--success)}
.checkout-page .is-done .step-number{background:var(--success-bg);border-color:var(--success);color:var(--success)}
.checkout-page .sandbox-notice{display:flex;align-items:baseline;gap:7px;margin:0 0 22px;color:var(--warning);font-size:calc(12px * var(--scale));line-height:1.7}
.checkout-page .notice-dot{height:5px;width:5px;border-radius:50%;background:currentColor;flex:none;align-self:center}
.checkout-page .notice{background:var(--warning-bg);color:var(--warning);border:0;border-radius:10px;padding:12px 14px;font-size:calc(13px * var(--scale));margin-bottom:18px}
.checkout-page .account-intro{text-align:center;margin:4px 0 26px}
.checkout-page h1{font:600 calc(22px * var(--scale))/1.65 var(--font);margin:0 0 5px;text-wrap:balance}
.checkout-page .account-intro p{color:var(--muted);font-size:calc(14px * var(--scale));line-height:1.8;margin:0}
.checkout-page h2{font:700 calc(19px * var(--scale))/1.6 var(--font);margin:18px 0 16px}
.checkout-page .amount-heading{font:700 calc(19px * var(--scale))/1.6 var(--font);margin:18px 0 16px}
.checkout-page label{color:var(--muted);font-size:calc(13px * var(--scale));font-weight:400;line-height:1.8;margin-bottom:8px}
.checkout-page input{height:calc(52px * var(--scale));min-height:52px;background:var(--inset);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:12px 14px;font:400 calc(16px * var(--scale))/1.5 var(--font);caret-color:var(--accent)}
.checkout-page input::placeholder{color:var(--muted);opacity:1}
.checkout-page input:focus{border-color:var(--accent-ink)}
.checkout-page #username::placeholder{direction:rtl;text-align:right}
.checkout-page button,.checkout-page .button{min-height:48px;padding:10px 16px;border:1px solid transparent;border-radius:10px;background:var(--accent);color:#fff;font:600 calc(15px * var(--scale))/1.6 var(--font);box-shadow:none;transition:background .15s ease-out}
.checkout-page button:hover:not(:disabled),.checkout-page .button:hover{background:var(--accent-hover)}
.checkout-page button:disabled{opacity:.55;cursor:not-allowed}
.checkout-page .wide{display:flex;width:100%;margin-top:22px}
.checkout-page .text-button{background:transparent;color:var(--muted);border:0;min-height:44px;padding:6px 0;font-size:calc(13px * var(--scale));font-weight:400}
.checkout-page .text-button:hover:not(:disabled){background:transparent;color:var(--accent-ink)}
.checkout-page .error{background:var(--danger-bg);color:var(--danger);border:0;border-radius:10px;padding:12px 14px;margin:0 0 18px;font-size:calc(14px * var(--scale));overflow-wrap:anywhere}
.checkout-page .hint{font-size:calc(12px * var(--scale));color:var(--muted);line-height:1.85;margin:10px 0 0}
.checkout-page .provider-hint{text-align:center;font-size:calc(12px * var(--scale));color:var(--muted);line-height:1.85;margin:12px 0 0}
.checkout-page[data-handoff="direct"] .payment-steps,.checkout-page[data-handoff="direct"] #account-section{display:none}
.checkout-page[data-handoff="direct"]:has(#handoff-progress:not([hidden]) #handoff-spinner:not([hidden])) .sandbox-notice{display:none}
.checkout-page .handoff-progress{text-align:center;padding:36px 0 28px;min-height:210px}
.checkout-page .handoff-progress p{font-size:calc(14px * var(--scale));line-height:1.8;color:var(--muted);margin:8px 0 0}
.checkout-page .handoff-spinner{display:block;width:32px;height:32px;margin:0 auto 24px;border:3px solid var(--soft);border-block-start-color:var(--accent);border-radius:50%;animation:paymera-progress 1s linear infinite}
.checkout-page[data-transfer] .payment-sheet{width:min(calc(100% - 40px),360px);margin:0 auto;padding:0;background:transparent;border-radius:0;box-shadow:none}
.checkout-page[data-transfer]{display:flex;min-height:100dvh;align-items:center;justify-content:center;padding:32px 0;box-sizing:border-box}
.checkout-page[data-transfer] .sheet-header{justify-content:center;padding:0 0 28px}
.checkout-page[data-transfer] .provider-name,.checkout-page[data-transfer] .payment-steps,.checkout-page[data-transfer] .sandbox-notice{display:none}
.checkout-page[data-transfer] .sheet-content{padding:0}
.checkout-page[data-transfer] .handoff-progress{padding:0;min-height:0}
.checkout-page[data-transfer] .handoff-progress h1{font-size:calc(18px * var(--scale));line-height:1.7;margin:0}
.checkout-page[data-transfer] .handoff-progress p{font-size:calc(14px * var(--scale));margin-top:6px}
.checkout-page[data-transfer] .handoff-spinner{width:20px;height:20px;border-width:2px;margin-bottom:18px}
.checkout-page[data-transfer="waiting"] .sheet-footer{display:none}
.checkout-page[data-transfer="error"] .sheet-footer{padding-inline:0;margin-inline:0;margin-top:26px}
@keyframes paymera-progress{to{transform:rotate(1turn)}}
.checkout-page .account-confirmation{display:flex;flex-direction:column;align-items:center;text-align:center}
.checkout-page .found-check{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;color:var(--success);background:var(--success-bg);margin-bottom:10px}
.checkout-page .found-label{color:var(--success);font-size:calc(13px * var(--scale));margin:0 0 4px}
.checkout-page #found-user{display:block;color:var(--text);font-size:calc(25px * var(--scale));font-weight:600;line-height:1.5;overflow-wrap:anywhere;max-width:100%}
.checkout-page .account-confirmation .text-button{margin-top:4px}
.checkout-page .confirmed-account{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.checkout-page .account-ready{display:flex;align-items:center;gap:7px;font-size:calc(13px * var(--scale));color:var(--muted);margin:0;min-width:0}
.checkout-page .account-ready svg{color:var(--success);width:18px;height:18px}
.checkout-page .account-ready strong{color:var(--text);font-weight:600;overflow-wrap:anywhere;margin:0}
.checkout-page .confirmed-account .text-button{flex:none;white-space:nowrap}
.checkout-page .receipt-head{text-align:center;margin:22px 0 0}
.checkout-page .receipt-symbol{display:grid;place-items:center;margin:0 auto 12px;width:42px;height:42px;background:var(--soft);color:var(--accent-ink);border-radius:50%}
.checkout-page .receipt-symbol svg{width:22px;height:22px}
.checkout-page .receipt h1{font-size:calc(20px * var(--scale));margin:0 0 7px}
.checkout-page #receipt-heading:focus{outline:none}
.checkout-page .state-message{color:var(--muted);font-size:calc(14px * var(--scale));font-weight:400;line-height:1.8;margin:0}
.checkout-page .receipt-total{text-align:center;display:flex;flex-direction:column;gap:2px;margin:20px 0 18px}
.checkout-page #receipt-amount{font-size:calc(32px * var(--scale));font-weight:600;line-height:1.5;font-variant-numeric:tabular-nums}
.checkout-page #receipt-unit{font-size:calc(12px * var(--scale));color:var(--muted)}
.checkout-page .receipt dl{margin:0;padding:0}
.checkout-page .receipt dl>div{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--line);font-size:calc(14px * var(--scale))}
.checkout-page .receipt dt{color:var(--muted);font-size:calc(13px * var(--scale));flex:none}
.checkout-page .receipt dd{color:var(--text);font-size:calc(14px * var(--scale));text-align:end;min-width:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.checkout-page .receipt #receipt-id{font-size:calc(11px * var(--scale));line-height:1.8;max-width:25ch}
.checkout-page .actions{display:flex;flex-direction:column;gap:10px;margin-top:22px}
.checkout-page .actions>*{width:100%}
.checkout-page .secondary{background:transparent;color:var(--accent-ink);border-color:var(--line)}
.checkout-page .secondary:hover:not(:disabled){background:var(--inset)}
.checkout-page [data-state="accepted"] .receipt-symbol{color:var(--success);background:var(--success-bg)}
.checkout-page [data-state="review"] .receipt-symbol,.checkout-page [data-state="unknown"] .receipt-symbol{color:var(--warning);background:var(--warning-bg)}
.checkout-page [data-state="failed"] .receipt-symbol,.checkout-page [data-state="canceled"] .receipt-symbol{color:var(--danger);background:var(--danger-bg)}
.checkout-page .sheet-footer{display:flex;flex-direction:row;justify-content:space-between;gap:16px;padding:14px 24px;margin:26px -24px 0;border-top:1px solid var(--line);font-size:calc(12px * var(--scale));line-height:1.8}
.checkout-page .sheet-footer a{color:var(--muted);text-decoration:none}
.checkout-page .sheet-footer a:hover{color:var(--accent-ink);text-decoration:underline}
/* The native hidden shell prevents the full sheet painting before deferred JS.
   Keep fast handoffs neutral; reveal the branded progress only for a slow wait. */
.checkout-page[data-boot="silent"]{background:#fff;color-scheme:light}
.checkout-page .boot-fallback{visibility:hidden;text-align:center;padding:24px;color:var(--text);animation:paymera-boot-fallback 0s linear 6s forwards}
@keyframes paymera-boot-fallback{to{visibility:visible}}
@media(max-width:500px){
  .checkout-page .payment-sheet{width:calc(100% - 24px);margin:16px auto}
  .checkout-page .sheet-header{padding:20px 20px 18px}
  .checkout-page .sheet-content{padding:0 20px}
  .checkout-page .sheet-footer{padding-inline:20px;margin-inline:-20px}
}
@media(max-width:350px){
  .checkout-page .sheet-header{padding-inline:16px}
  .checkout-page .sheet-content{padding-inline:16px}
  .checkout-page .payment-steps{gap:6px}
  .checkout-page .payment-step{gap:5px}
  .checkout-page .confirmed-account{flex-wrap:wrap}
  .checkout-page .sheet-footer{padding-inline:16px;margin-inline:-16px}
}
@media(prefers-reduced-motion:reduce){.checkout-page *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* This delayed fallback changes visibility only; it has no visual motion. */
@media(prefers-reduced-motion:reduce){.checkout-page .boot-fallback{animation:paymera-boot-fallback 0s linear 6s forwards!important}}
