/* Al Basira v5q: the pay page (pay.html, assets/js/v3-pay.js) as one calm screen.
   The navy band names the programme and carries the amount on a cream ticket; one card under it holds the price lines
   (tinted, on the left) and the way to pay (on the right); every other state takes the card's place in the apply.html
   "done" style. Moyasar's form is dressed in the site's fields, fonts and navy button, in light and dark.
   New classes are pq-*; .py-way / .py-ways / .py-panel / .py-spin / .py-confetti / .py-off are kept because v3-pay.js
   hooks onto them. Builds on v3-vis.css (colour scopes .c-*, .ic-tile) and v3-pages.css (.uh-facts). */

.pq-main{min-width:0;display:flex;flex-direction:column;gap:14px}
#payBox{min-width:0}
#payNote:empty{display:none}

/* ---------------------------------------------------------------- the band */
.phero.pq-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:center;border-radius:16px;padding:28px 32px 28px}
.pq-ht{display:flex;flex-direction:column;gap:10px;min-width:0}
.phero.pq-hero h1{font-size:clamp(26px,3.3vw,38px);line-height:1.12}
.phero.pq-hero .arh{font-size:clamp(22px,2.8vw,30px);margin-top:0}
.pq-facts{margin-top:4px}
.pq-facts li{font-size:13.5px;padding:5px 12px 5px 10px}
.pq-side{position:relative;width:230px;display:flex;justify-content:center;align-items:center}
.pq-art{width:220px;height:auto;display:block}
.pq-art .f-cream{fill:#F7F4EE}.pq-art .f-teal{fill:#86D0D8}.pq-art .f-gold{fill:#E2C27F}.pq-art .f-pink{fill:#F29AC0}
.pq-art .f-green{fill:#7FCBA6}.pq-art .f-sky{fill:#8DB6EA}.pq-art .f-navy{fill:#0C2B4B}
.pq-art .s-navy{fill:none;stroke:#0C2B4B;stroke-linecap:round;stroke-linejoin:round}
.pq-art .s-soft{fill:none;stroke:#0C2B4B;stroke-linecap:round;opacity:.28}

/* the ticket: cream in both themes (the band is navy in both), a stub in the programme's colour, the amount big */
.pq-tk{--tk:#0C2B4B;position:relative;width:100%;display:flex;flex-direction:column;gap:4px;padding:16px 20px 16px 36px;border-radius:14px;
  background:#F7F4EE;color:#0C2B4B;box-shadow:0 14px 30px -14px rgba(0,0,0,.55);transform:rotate(-2deg)}
.pq-tk::before{content:"";position:absolute;inset:0 auto 0 0;width:16px;border-radius:14px 0 0 14px;background:var(--tk)}
.pq-tk::after{content:"";position:absolute;top:10px;bottom:10px;left:22px;border-left:2px dashed color-mix(in srgb,var(--tk) 40%,transparent)}
.pq-tk.c-lv1{--tk:#2E7658}.pq-tk.c-lv2{--tk:#1E5596}.pq-tk.c-lv3{--tk:#B8322A}.pq-tk.c-ws{--tk:#856017}
.pq-tk.c-sp{--tk:#5B4E8C}.pq-tk.c-fe{--tk:#1F6F78}.pq-tk.c-pk{--tk:#B54272}
.pq-tk-k{font-family:var(--mono);font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--tk)}
.pq-amt{display:flex;align-items:baseline;gap:6px;line-height:1;color:#0C2B4B}
.pq-amt b{font-size:38px;font-weight:700;letter-spacing:-.01em}
.pq-amt small{font-size:16px;font-weight:600}
.pq-amt svg{align-self:center;flex:none;color:var(--tk)}
.pq-amt svg+b{font-size:26px}
.pq-tk-s{align-self:flex-start;margin-top:4px;font-size:13px;font-weight:600;padding:2px 9px;border-radius:99px;background:color-mix(in srgb,var(--tk) 13%,#F7F4EE);color:var(--tk)}
.pq-deco{position:absolute;width:30px;height:30px;top:-16px;right:-6px}
.pq-deco .f-gold{fill:#E2C27F}
.pq-dot{position:absolute;border-radius:50%;pointer-events:none}
.pq-dot.a{width:10px;height:10px;background:#F29AC0;left:-14px;bottom:4px}
.pq-dot.b{width:7px;height:7px;background:#86D0D8;right:18px;bottom:-14px}

/* ---------------------------------------------------------------- the card: price on the left, paying on the right */
.pq-card{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);border-radius:var(--vis-radius);background:var(--card);
  border:1px solid var(--rule);border-top:5px solid var(--c,var(--ink));box-shadow:var(--shadow);overflow:hidden;min-width:0}
.pq-sum{display:flex;flex-direction:column;gap:12px;padding:22px 22px 20px;background:var(--c-soft,var(--panel));border-inline-end:1px solid var(--rule);min-width:0}
.pq-pay{display:flex;flex-direction:column;gap:14px;padding:22px 24px 20px;min-width:0}
.pq-h{display:flex;align-items:center;gap:10px}
.pq-h h2{margin:0;font-size:19px;line-height:1.2}
.pq-h .ic-tile.sm{width:30px;height:30px;border-radius:9px}

.pq-lines{display:grid;grid-template-columns:minmax(0,1fr) auto;margin:0;font-size:15.5px}
.pq-lines dt,.pq-lines dd{margin:0;padding:8px 0;border-top:1px dashed color-mix(in srgb,var(--c,var(--ink)) 25%,var(--rule))}
.pq-lines dt:first-of-type,.pq-lines dt:first-of-type+dd{border-top:0}
.pq-lines dt{display:flex;align-items:center;gap:7px;color:var(--t1);min-width:0}
.pq-lines dt :is(.ic,.bic){color:var(--c);flex:none}
.pq-lines dd{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;padding-inline-start:12px}
.pq-lines .tot{border-top:2px solid var(--c,var(--ink));padding-top:10px;font-weight:700;font-size:19px;color:var(--ink)}
.py-off{color:var(--lv1);font-weight:600}

.pq-link{align-self:flex-start;display:inline-flex;align-items:center;gap:7px;background:none;border:0;padding:4px 0;margin:0;cursor:pointer;
  font-size:14.5px;font-weight:600;color:var(--c,var(--ink));text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--c,var(--ink)) 35%,transparent);text-underline-offset:4px}
.pq-link:hover{text-decoration-color:currentColor}
.pq-link:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:4px}
.pq-code{max-width:none;margin-top:-4px}
.pq-code .field{flex:1 1 140px;border-radius:10px;background:var(--sheet)}
.pq-code .btn{border-radius:10px;background:var(--card)}
.pq-sum .px-said:empty{display:none}
.pq-pass{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:12px;background:var(--card);border:1px solid var(--rule);cursor:pointer;font-size:14.5px;line-height:1.4}
.pq-pass input{margin-top:3px;accent-color:var(--c);width:17px;height:17px;flex:none}
.pq-pass>span{display:flex;flex-direction:column;gap:2px}

/* Card · Tabby, one segmented choice */
.py-ways{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;padding:4px;border-radius:13px;background:var(--panel);border:1px solid var(--rule)}
.py-way{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 10px;border-radius:10px;cursor:pointer;
  font-weight:600;font-size:15px;color:var(--t1);transition:background .15s,box-shadow .15s,color .15s;min-width:0}
.py-way svg{color:var(--c);flex:none}
.py-way input{position:absolute;opacity:0;pointer-events:none;inset:0}
.py-way:hover{color:var(--ink)}
.py-way.on{background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--c),0 2px 6px -2px rgba(12,43,75,.18)}
.py-way:has(input:focus-visible){outline:2px solid var(--ink);outline-offset:2px}
.py-way.no{cursor:not-allowed;opacity:.5}
.py-way.no:hover{color:var(--t1)}
.pq-why{display:flex;gap:7px;align-items:flex-start;margin:0;font-size:13.5px;line-height:1.4;color:var(--muted)}
.pq-why :is(.ic,.bic){flex:none;margin-top:2px}
#wayWhy:empty{display:none}
#wayWhy{display:flex;flex-direction:column;gap:4px;margin-top:-6px}
.pq-test{display:flex;gap:8px;align-items:flex-start;margin:0;padding:7px 12px;border-radius:10px;background:var(--sky);font-size:13.5px;color:var(--ink)}
.pq-test :is(.ic,.bic){flex:none;margin-top:2px}

.pq-panel{display:flex;flex-direction:column;gap:12px;min-width:0}
.py-panel:empty{display:none}
.pq-loading{display:flex;align-items:center;gap:10px;margin:0;padding:18px 0;color:var(--t1);font-size:15px}
.pq-agree{margin:0;font-size:13.5px;line-height:1.45;color:var(--t1)}
.pq-agree a{color:var(--ink);font-weight:600}
.pq-trust{display:flex;gap:8px;align-items:flex-start;margin:0;padding-top:10px;border-top:1px dashed var(--rule);font-size:13.5px;line-height:1.45;color:var(--muted)}
.pq-trust :is(.ic,.bic){flex:none;margin-top:2px;color:var(--lv1)}
.pq-panel .px-said:empty,.pq-pay>.px-said:empty{display:none}
.pq-acts{display:flex;flex-wrap:wrap;gap:10px}
.btn.pq-go{width:100%;justify-content:center;min-height:48px;border-radius:10px;font-size:16px;background:var(--ink);border-color:var(--ink);color:var(--on-ink)}
.btn.pq-go:hover{filter:brightness(1.15)}

/* a short message inside the card (nothing to pay, paying off, the form not loading) */
.pq-say{display:flex;gap:12px;align-items:flex-start;padding:14px;border-radius:12px;background:var(--c-soft,var(--panel))}
.pq-say>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.pq-say b{font-size:16px;line-height:1.3}
.pq-say p{margin:0;font-size:14.5px;line-height:1.5;color:var(--t1)}
.pq-say .ic-tile{width:38px;height:38px;border-radius:11px}

/* a note above the card (the payment didn't go through, you left Tabby…) */
.pq-warn{display:flex;gap:10px;align-items:flex-start;margin:0;padding:11px 14px;border-radius:12px;background:var(--rose);border:1px solid var(--rose2);font-size:14.5px;line-height:1.5;color:var(--ink)}
.pq-warn>:is(.ic,.bic){color:var(--red);flex:none;margin-top:3px}

/* ---------------------------------------------------------------- every other state: the apply.html "done" card */
.pq-done{--c:var(--ink);position:relative;overflow:hidden;display:flex;gap:18px;align-items:flex-start;padding:22px;border-radius:18px;
  background:var(--c-soft,var(--panel));border:1.5px solid color-mix(in srgb,var(--c) 35%,transparent);max-width:780px}
.pq-done.c-ink{--c-soft:var(--panel)}
.pq-done:focus{outline:none}
.pq-done-b{position:relative;display:flex;flex-direction:column;gap:8px;min-width:0}
.pq-done h2{margin:0;font-size:21px;line-height:1.25}
.pq-done p{margin:0;font-size:15.5px;line-height:1.55;color:var(--t1)}
.pq-done ol{margin:0;padding-inline-start:20px;display:flex;flex-direction:column;gap:6px;color:var(--t1);line-height:1.5}
.pq-done .btn{display:inline-flex;align-items:center;gap:8px;background:var(--c);border-color:var(--c);color:var(--bg);border-radius:10px}
.pq-done .btn.quiet{background:var(--card);color:var(--ink);border-color:color-mix(in srgb,var(--c) 45%,var(--rule));min-height:44px;font-weight:600;font-size:15px}
.pq-done .pq-acts{margin-top:6px}
.pq-done .pq-warn{margin:2px 0}
.pq-nx-h{font-family:var(--mono);font-size:12px!important;letter-spacing:.08em;text-transform:uppercase;color:var(--c)!important;margin-top:4px!important}
.pq-mail{display:flex;gap:8px;align-items:flex-start;font-size:14.5px!important}
.pq-mail :is(.ic,.bic){flex:none;margin-top:3px;color:var(--c)}
.pq-done>.ic-tile{position:relative}

/* waiting: a spinner inside the icon tile */
.py-spin{display:inline-block;width:20px;height:20px;border-radius:50%;flex:none;border:2.5px solid color-mix(in srgb,var(--c,var(--ink)) 25%,transparent);border-top-color:var(--c,var(--ink));animation:pySpin .8s linear infinite}
.ic-tile.solid .py-spin{width:24px;height:24px;border-color:color-mix(in srgb,var(--bg) 35%,transparent);border-top-color:var(--bg)}
@keyframes pySpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.py-spin{animation-duration:2.4s}}

.py-confetti{position:absolute;inset:0;pointer-events:none}
.py-confetti i{position:absolute;width:10px;height:10px;border-radius:3px;opacity:.85}
.py-confetti i:nth-child(1){top:14px;inset-inline-end:28px;background:var(--ws);transform:rotate(18deg)}
.py-confetti i:nth-child(2){top:30px;inset-inline-end:64px;background:var(--lv3);border-radius:50%;width:8px;height:8px}
.py-confetti i:nth-child(3){top:12px;inset-inline-end:104px;background:var(--lv2);transform:rotate(-24deg);width:12px;height:6px}
.py-confetti i:nth-child(4){top:38px;inset-inline-end:22px;background:var(--fe);border-radius:50%;width:7px;height:7px}
.py-confetti i:nth-child(5){top:22px;inset-inline-end:146px;background:var(--sp);transform:rotate(40deg);width:7px;height:12px}
.py-confetti i:nth-child(6){top:8px;inset-inline-end:182px;background:var(--pk);border-radius:50%;width:6px;height:6px}

.pq-help{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:2px 0 0;font-size:14px;color:var(--muted)}
.pq-help :is(.ic,.bic){color:var(--ws);flex:none}
.pq-help a{color:var(--ink)}

/* ---------------------------------------------------------------- Moyasar's form, dressed as our fields */
#mysrHost,#mysrHost *{font-family:var(--sans)!important}
#mysrHost div#mysr>div{max-width:none!important;min-width:0!important;margin:0!important;gap:12px!important;color:var(--ink)!important}
#mysrHost div#mysr form.space-y-6>:not([hidden])~:not([hidden]){margin-top:14px!important}
#mysrHost div#mysr label,#mysrHost div#mysr legend{font-size:13.5px;font-weight:600;color:var(--ink)}
#mysrHost div#mysr .text-xs.font-medium{font-size:13.5px!important}
#mysrHost div#mysr input.shadow-input,#mysrHost div#mysr input.shadow-input-error{background:var(--sheet)!important;color:var(--ink)!important;font-size:15.5px!important;line-height:1.4!important;
  padding:11px 14px!important;box-shadow:0 0 0 1px var(--rule)!important}
#mysrHost div#mysr input.shadow-input-error{box-shadow:0 0 0 1px var(--red)!important}
#mysrHost div#mysr input.shadow-input:focus,#mysrHost div#mysr input.shadow-input-error:focus{box-shadow:0 0 0 1.5px var(--lv2),0 0 0 4px color-mix(in srgb,var(--lv2) 22%,transparent)!important}
#mysrHost div#mysr input::placeholder{color:var(--t3)!important}
#mysrHost div#mysr .rounded-lg{border-radius:10px!important}
#mysrHost div#mysr .rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}
#mysrHost div#mysr .text-error{color:var(--red)!important;font-size:13px!important}
#mysrHost div#mysr .bg-red-100{background:var(--rose)!important;border-color:var(--rose2)!important;color:var(--ink)!important;font-size:13.5px!important;border-radius:10px!important}
#mysrHost div#mysr .text-red-600{color:var(--red)!important}
#mysrHost div#mysr button.bg-primary,#mysrHost div#mysr button[type=submit]{background:var(--ink)!important;color:var(--on-ink)!important;height:48px!important;border-radius:10px!important;font-weight:600!important;font-size:16px!important}
#mysrHost div#mysr button[type=submit]:hover{filter:brightness(1.15)}
#mysrHost div#mysr .pq-agree{margin:12px 0 0!important}
#mysrHost div#mysr .pq-agree+button{margin-top:10px!important}
#mysrHost div#mysr .text-primary-400{color:var(--lv2)!important}
#mysrHost div#mysr .mt-2>a{opacity:.75}
#mysrHost .pq-say{margin:4px 0}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) #mysrHost div#mysr .currency-amount img{filter:brightness(0)!important}
  :root:not([data-theme="light"]) #mysrHost div#mysr .mt-2>a svg{filter:invert(1) hue-rotate(180deg)}
}
:root[data-theme="dark"] #mysrHost div#mysr .currency-amount img{filter:brightness(0)!important}
:root[data-theme="dark"] #mysrHost div#mysr .mt-2>a svg{filter:invert(1) hue-rotate(180deg)}

/* ---------------------------------------------------------------- v5r: Tabby
   The badge is Tabby's own (green pill, black wordmark), unchanged in colour in both themes. The plan is the one Tabby
   returned for this amount, one tile per payment with a pie that fills like Tabby's own checkout snippet. */
.py-way .pq-tabby{width:46px;height:auto;flex:none}
.pq-testtag{position:absolute;top:-9px;inset-inline-end:6px;z-index:1;font-style:normal;font-family:var(--mono);font-size:10.5px;font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;line-height:1.6;padding:0 7px;border-radius:99px;background:var(--ws);color:var(--bg);white-space:nowrap}
.py-ways:has(.pq-testtag){margin-top:6px}
.py-ways.one{grid-auto-columns:minmax(0,1fr)}
.pq-tb{display:flex;flex-direction:column;gap:11px;padding:14px;border-radius:12px;background:var(--c-soft,var(--panel))}
.pq-tbh{display:flex;align-items:center;gap:12px;min-width:0}
.pq-tbh .pq-tabby{width:62px;height:auto;flex:none}
.pq-tbh>div{display:flex;flex-direction:column;gap:1px;min-width:0}
.pq-tbh b{font-size:16.5px;line-height:1.25;color:var(--ink)}
.pq-tbh .small{font-size:13.5px;color:var(--t1);align-self:flex-start}
.pq-tbh .pq-testtag{position:static;margin-inline-start:auto;align-self:flex-start}
.pq-tbline{margin:0;font-weight:600;font-size:15px;line-height:1.4;color:var(--ink)}
.pq-sched{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(86px,1fr));gap:8px}
.pq-sched li{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 10px 9px;border-radius:11px;background:var(--card);border:1px solid var(--rule);min-width:0}
.pq-sched li.now{border-color:color-mix(in srgb,var(--c) 55%,var(--rule));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c) 35%,transparent)}
.pq-sched li i{width:24px;height:24px;border-radius:50%;flex:none;background:conic-gradient(var(--c) var(--p),color-mix(in srgb,var(--c) 16%,transparent) 0)}
.pq-sched b{font-size:15.5px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--ink);white-space:nowrap}
.pq-sched span{display:flex;flex-direction:column;font-size:13px;line-height:1.3;color:var(--t1)}
.pq-sched small{font-size:12px;color:var(--muted)}
.pq-sched b small.cur{font-size:12px;font-weight:600;color:var(--t1)}
.pq-tbfine{margin:0;font-size:13.5px;line-height:1.45;color:var(--t1)}
.pq-learn{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.pq-learn .sr,.pq-pay .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.py-spin.sm{width:14px;height:14px;border-width:2px;vertical-align:-2px;margin-inline-end:7px}
.pq-test-tb{background:color-mix(in srgb,var(--ws) 15%,var(--card));border:1px solid color-mix(in srgb,var(--ws) 35%,transparent)}
.pq-test-tb :is(.ic,.bic){color:var(--ws)}
.pq-ar{display:block;margin-top:4px;font-size:14.5px}
.pq-done .pq-ar-p{font-size:15px;color:var(--t1)}

/* ---------------------------------------------------------------- narrower screens */
@media (max-width:860px){
  .pq-side{width:200px}
  .pq-amt b{font-size:32px}
}
@media (max-width:760px){
  .pq-card{grid-template-columns:minmax(0,1fr)}
  .pq-sum{border-inline-end:0;border-bottom:1px solid var(--rule)}
}
@media (max-width:620px){
  .phero.pq-hero{grid-template-columns:minmax(0,1fr);gap:18px;padding:22px 18px 22px;border-radius:14px}
  .pq-side{width:auto;justify-content:stretch;padding:0 6px 6px}
  .pq-side:not(.pq-has-tk){display:none}
  .pq-tk{transform:rotate(-1deg);flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:12px;padding:12px 16px 12px 34px}
  .pq-tk-k{flex:1 1 100%}
  .pq-amt b{font-size:30px}
  .pq-tk-s{margin:0 0 0 auto;align-self:center}
  .pq-sum,.pq-pay{padding:18px 16px}
  .pq-done{flex-direction:column;padding:18px;gap:14px}
  .pq-done .pq-acts .btn{flex:1 1 100%;justify-content:center}
  .py-confetti i:nth-child(n+3){display:none}
  .py-way{flex-direction:column;gap:3px;font-size:14px;padding:10px 4px 8px}
  .py-way .pq-tabby{width:40px}
  .pq-tbh .pq-tabby{width:54px}
  .pq-tb{padding:12px}
  .pq-sched{gap:6px;grid-template-columns:repeat(auto-fit,minmax(78px,1fr))}
  .pq-sched li{padding:9px 8px 8px}
  .pq-sched b{font-size:14.5px}
}
/* a small drawing at the foot of the price column (a receipt and coins), in the programme's colour */
.pq-sum-art{width:150px;height:auto;margin-top:auto;align-self:center;padding-top:14px}
.pq-sum-art .f-paper{fill:var(--card);stroke:color-mix(in srgb,var(--c) 35%,var(--rule));stroke-width:1.5}
.pq-sum-art .s-line{fill:none;stroke:color-mix(in srgb,var(--c) 40%,transparent);stroke-linecap:round}
.pq-sum-art .f-coin{fill:#E2C27F}.pq-sum-art .s-coin{fill:none;stroke:#856017;opacity:.45}.pq-sum-art .f-coin2{fill:var(--c);opacity:.75}
.pq-sum-art .f-spark{fill:#E2C27F}.pq-sum-art .f-dot{fill:#F29AC0}
.pq-help{flex-wrap:nowrap;align-items:flex-start}
.pq-help :is(.ic,.bic){margin-top:3px}
@media (max-width:760px){.pq-sum-art{display:none}}
